[英]Cannot uninstall my tool after adding entry to the 'Uninstall' registry key
I'm developing a simple win32 tool. 我正在开发一个简单的win32工具。 I'd the tool to be easily uninstalled by the user so I've added a subkey to: 我希望该工具可以很容易地被用户卸载,因此我向以下项添加了一个子项:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
called MyTool
and added all the necessary keys such as: DisplayName
, UninstallString
, DisplayVersion
, DisplayIcon
名为MyTool
并添加了所有必需的键,例如: DisplayName
, UninstallString
, DisplayVersion
, DisplayIcon
So far so good. 到现在为止还挺好。 I can see that during the install process of my tool, the new subkey was added and everything is as expected. 我可以看到在我的工具的安装过程中,添加了新的子项,并且一切都按预期进行。
When I come to uninstall my tool and press uninstall I get the following error: 当我卸载工具并按卸载时,出现以下错误:
You do not have sufficient access to uninstall MyTool. Please contact your system administrator
My process is 32 bit. 我的过程是32位。 However, Wow6432Node
related topic is irrelevant since I've encounter this issue both in 32 & 64 bit systems. 但是, Wow6432Node
相关主题无关紧要,因为我在32位和64位系统中都遇到了此问题。
Did I do something wrong with the way I've added the registry subkey? 添加注册表子项的方式是否有问题?
This is the kind of time wasting bugs that is are so stupid. 这种浪费时间的错误是如此愚蠢。
The issue was, believe it or not, the path separator used in key's value: UninstallString
. 不管您相信与否,问题是密钥的值中使用的路径分隔符 : UninstallString
。
"C:/Program Files (x86)/MyTool/my_tool.exe" /uninstall"
"C:\Program Files (x86)\MyTool\my_tool.exe" /uninstall
Regardless of whether or not it is my fault as a developer, why would windows error out in this case? 不管是我作为开发人员的错,为什么Windows在这种情况下都会出错?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.