PATH variable optimizer and cleaner

You will maybe run into the problem that your PATH variable length is higher than 2048 characters, which is allowed maxium.

If this occurs your PATH setting will stop working and you need some automatic tool to optimize and clean your path by removing unused records and optimizing/shortening used records.

Download the tool to do this here:

It is a command line tool and if you type for help:

cleanpath --help

You will get this:

cleanpath 1.0.0
Copyright (C) 2022 cleanpath
-m, --machine (Default: false) Target machine path
-c, --change (Default: false) Change path
-l, --list (Default: false) List path
-f, --full (Default: false) List full path
-y, --yes (Default: false) Respond yes to confirmation
--help Display this help screen.
--version Display version information.

To optimize your global (computer account) PATH variable type:

cleanpath -m -c -y

To optimize your user’s PATH variable type:

cleanpath -m -c -y

Continue Reading

How to delete locked folder in Windows

  • Windows + R (Run) and type resmon.exe for ResourceMonitor
  • Go to CPU section > Associated handles and in search box type your folder name (part of)
  • You will see now which process is holding this folder and preventing it from deletion and in this case it is from TortoiseGit app. In order to disable this cache go to Tortoise Git > Settings > Icon Overlays and set Cache to None
Continue Reading

Remove read-only attributes from WD (Western Digital) disk

  1. Right-click START and choose “Command Prompt” (run as administrator)
  2. Type “diskpart” and press Enter.
  3. Type “list volume” and press Enter.
  4. Type “select volume #”, where # is the number of the drive that’s giving you the “write-protected” error. You might be able to identify the drive by its size – your internal drives such as C, etc, are usually listed first also.
  5. Type “attributes disk clear readonly” and press Enter.
Continue Reading

Disable zoom with mouse wheel in Firefox

  1. Open Firefox. 
  2. In the address bar type in about:config and press Enter.
  3. Click I’ll be careful, I promise
  4. Type mousewheel.with_control.action in the Search bar at the top of the about:config page. 
  5. Double-click mousewheel.with_control.action from the Preference Name column. 
  6. Enter the number 0 in the dialog box. 
  7. (cmd_fullZoomReduce -> empty string)
  8. browser.gesture.pinch.out (cmd_fullZoomEnlarge -> empty string)
  1. Click OK

In order to disable multi-touch pinch zoom-in and zoom-out repeat the procedure as previous one and set: & browser.gesture.pinch.out to false.
Alternatively you could try setting zoom.maxPercent & zoom.minPercent to 100 …

Continue Reading

Create self-signed SSL using OpenSsl

Download OpenSsl installer first:

Generate private key first:
[YOUR_OPENSSL_BIN_PATH]\openssl.exe genrsa -out [YOUR_OUTPUT_PATH]\ 2048

Generate CSR request (set all data but set at the end empty password and company name):
[YOUR_OPENSSL_BIN_PATH]\openssl.exe req -new -nodes -key [YOUR_OUTPUT_PATH]\ -out d:\Utils\Certificates\

Generate certificate that is valid 10 years, or 3652 days
[YOUR_OPENSSL_BIN_PATH]\openssl.exe x509 -req -days 3652 -in [YOUR_OUTPUT_PATH]\ -signkey [YOUR_OUTPUT_PATH]\ -out [YOUR_OUTPUT_PATH]\

Set port 995 for incoming email and port 465 for outgoing email – put them into firewall (Inbound and Outbound rules) in Advanced Firewall settings

Continue Reading

Solving PHPMailer and GMail connection failed issue

Strange behaviour – it just stopped working 10 days ago and after a long search found a solution in specifying additional parameters in SSL connection, so working example should be like this:

  $mail = new PHPMailer();
  $mail->SMTPDebug = 2;
  $mail->SMTPAuth = true;
  $mail->SMTPSecure = 'ssl';
  $mail->SMTPOptions = array
    'ssl' => array
      'verify_peer' => false,
      'verify_peer_name' => false,
      'allow_self_signed' => true
  $mail->Host = "";
  $mail->Port = 465;
  $mail->Username = GOOGLE_SMTP_USERNAME;
  $mail->Password = GOOGLE_SMTP_PASSWORD;
  $mail->Subject = "Test";
  $mail->Body = "hello";
    echo "Mailer Error: " . $mail->ErrorInfo;
    echo "Message has been sent";
catch (phpmailerException $e) 
  $errors[] = $e->errorMessage();
catch (Exception $e) 
  $errors[] = $e->getMessage(); 


Continue Reading

How to save 55$ for undelete software

You probably accidentally deleted some important files more then once. It is especially sensitive when it comes to photos from your family trip and when you deleting by instinct with SHIFT+Delete (avoiding Recycle Bin). I did that today and I needed some simple data recovery software. I remembered that there is File Scavenger who can restore accidentally deleted files and I installed it. Scanned the drive, found my photos and when I wanted to recover them I found out that I need to buy the licence for 55$. I didn’t like that so I decided to find free solution and found Recuva, free alternative for the same job. You don’t need commercial version and free version is just fine. It does the job perfectly!


Continue Reading

Mscorsvw.exe high CPU usage on Windows Server 2012

I sometimes really hate Windows. When you do obligatory updates sometimes it takes hours for operating system to settle down and stop using CPU and memory like crazy.

One of these processes are mscorsvw.exe and ngen.exe which do some .NET assemblies optimization. I read about a lot of angry posts about these processes and that it takes hours “to optimize” and during these hours your server and services on it are suffering (and you need to be clever when finding explanations to your clients).

Follow these steps:

  1. Navigate to the following location in Windows Explorer: C:\Windows\Microsoft.NET\Framework\v4.0.30319
  2. Run an elevated command prompt and change the current directory to the following directory
  3. Type ngen.exe executequeueditems, and press ENTER
  4. Wait until you receive the following message at the command prompt: All compilation targets are up to date.

This annoying processes stopped but now TiWorker.exe is taking his time and eating the CPU and Memory and it looks like it will take 3-4 hours. Yikes! I really hate Windows programmers for this hidden background CPU and Memory eaters.

Continue Reading

Can not connect to Remote Desktop Connection in Windows Server 2012R2

I faced today strange problem that I could not connect to Windows server through Remote Desktop Connection. When I click “Connect” it disconnect me immediately. Restarting the server didn’t helped.

Here is the simple trick how you can connect…

  1. Open RDC dialog and click on Show Options
  2. Go to Advanced tab  and choose under If server authentication fails option Connect and don’t warn me
  3. You are now successfully connected after pressing the Connect button

Glad to hear if this saved you day. You can Tweet this solution so help someone else.

Continue Reading