How to Force Uninstall a Program That Won’t Uninstall

Issue:

You installed a program. Now you want to uninstall it. You open up the Apps & Features (in Windows 10), click on the program name, click Uninstall button and you get an error. The program cannot be uninstalled.

Solution:

Method 1:

Use Windows Installer CleanUp Utility (given by Microsoft) to uninstall the program.

Method 2:
  1. Type regedit in Cortana and click on the program.
  2. Find the program name. For example JetBrains.
  3. Continue finding the program by pressing F3 until you find it under the sub-folder HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall or the sub-folder Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall (you verify this path by looking at the path under the top menu and looking at the DisplayName in the right panel).
  4. Copy the value of the key UninstallString.
  5. Type run in Cortana and click on Run application.
  6. Paste the value of the key UninstallString and click OK.
  7. If you still get the error then just delete the sub-folder under the sub-folder HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall or the sub-folder Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall.
  8. Restart your computer.

Turning Hyper-V On and Off

Issue: Hyper-V cannot work in parallel with Android Studio emulator.

Solution:

Use below steps to temporarily turn it off to launch Android Studio emulator:
  1. Open a Command or PowerShell as Admin
  2. Execute below command to turn Hyper-V off
bcdedit /set hypervisorlaunchtype off

3. Restart your computer.

To turn Hyper-V on again, use below steps:
  1. Open a Command or PowerShell as Admin
  2. Execute below command to turn Hyper-V off
bcdedit /set hypervisorlaunchtype auto start

3. Restart your computer.

How to delete the Windows.old folder

Motivation:

After a major update Windows 10 leaves a folder named Windows.old in the system drive. You may remove it to save disk space and prevent potential harmful exploits.

Solution

Method 1:

  1. Click in Windows’ search field, type Cleanup, then click Disk Cleanup.
  2. Click the “Clean up system files” button.
  3. Wait a bit while Windows scans for files, then scroll down the list until you see “Previous Windows installation(s)“.
  4. Check the box next to the entry.
  5. Click OK.

Method 2:

  1. Open a command prompt (cmd.exe) as Admin
  2. Execute 3 below commands:
takeown /f C:\Windows.old /r /d y
icacls C:\Windows.old /grant administrators:F /t
rmdir C:\Windows.old /s /q

takeown: takes ownership of a folder.

icacls: grants permissions to a user against a folder

rmdir: deletes a folder

3. If some files still cannot be deleted then please restart your computer and re-excecute the above 3 commands.

4. If some files still cannot be deleted after the restart then please execute 3 below commands:

icacls C:\Windows.old /T /Q /C /RESET
icacls C:\Windows.old /grant admin:F /t
rmdir C:\Windows.old /s /q

admin: your current logged in username.

5. If some files still cannot be deleted then please click Cortona icon, type msconfig, click on System Configuration link, click Boot tab, select Safe boot check box,  select Minimal option, click OK, restart your computer and then execute the 3 commands in the 2nd step and the 3 commands in the 4th step.