miraz.zaidi
18th April 2013 14:10 UTC
How to get DeleteRegKey to work
Hi!
This question probably have been asked many times, I checked all the previous discussions but couldn't find anything useful.
I want to delete some registry keys when I uninstall my app, but its not deleting.
DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\MyCompanyName\MyAppName\IsAlreadyInstalled"
I have RequestExecutionLevel admin
SetRegView 32
How to make it work ?
MSG
18th April 2013 15:06 UTC
1) Are you sure IsAlreadyInstalled is really a key? It sounds like the name of a regstring to me. The key would then be etc\MyCompanyName\MyAppName.
2) HKCU is unique for each user. Are you sure it exists in the admin's HKCU hive, and not the user's?
Anders
18th April 2013 20:52 UTC
App paths under HKCU is Win7+, older versions only use HKLM.
The correct path is "...\CurrentVersion\App Paths\myprogram.exe"
IsAlreadyInstalled is not a valid value name, the documented values are listed here...