Kevin Carbonaro 0 Posted June 14 (edited) I am trying to automatically uninstall utorrent, however it's own uninstaller is leaving registry stuff behind, one of them being its entry in the add/remove list in Windows. Automate will still detect it as being installed even though it is not there anymore. My script does the following: Shell Enhanced: taskkill /IM utorrent.exe /F Shell Enahnced: "c:\users\%ComputerUsername%\appdata\roaming\utorrent\utorrent.exe" /UNINSTALL /S The registry key I need to remove is under HKCU: HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\uTorrent On the physical machine running cmd as admin I tested successfully reg delete and Powershell, however the same commands in a labtech script will not delete the key and its sub-keys. The Powershell as admin script command I tried:Remove-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\uTorrent -Recurse The Registry Delete Key command I tried:reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\uTorrent /F Any ideas of how I can remove the registry key? Attached the current status of the script in case you need to test. Uninstall uTorrent.xml Edited June 20 by Kevin Carbonaro attached script Quote Share this post Link to post Share on other sites
DarrenWhite99 397 Posted June 16 Use the regular functions, not their “As Admin” counterparts. Quote Share this post Link to post Share on other sites
Kevin Carbonaro 0 Posted June 17 I am almost sure I tried those as well, but will again in case I missed something and let you know the outcome. Thanks Quote Share this post Link to post Share on other sites
Kevin Carbonaro 0 Posted June 20 (edited) I tried the normal ones but did not work either, however managed to get it working using the Registry Delete Key. The uninstall/removal process is as follows: Notice the trailing backslash at the end of the Delete Registry line. Once I added that, the key was deleted successfully. Edited June 20 by Kevin Carbonaro Quote Share this post Link to post Share on other sites