我正在尝试检索游戏的安装目录,我已经在注册表中找到了它,所以我尝试使用以下代码
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\Steam App XXXXX','InstallLocation', Dirpath) then
;rest of the code;
但它总是返回false,即使有这样的值。
我尝试在HKLM中使用另一个值,但它也返回false,所以问题似乎是我不能从HKEY_LOCAL_MACHINE查询值,我是否遗漏了什么?
发布于 2018-08-29 07:08:28
在找出我的真正问题(无法访问HKLM)后,我能够在StackOverflow Inno Setup RegKeyExists on 64 bit systems中找到答案
很抱歉在发帖前没有做完所有的家庭作业
https://stackoverflow.com/questions/52067177
复制相似问题