我正在尝试检索游戏的安装目录,我已经在注册表中找到了它,所以我尝试使用以下代码
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查询值,我是否遗漏了什么?
https://stackoverflow.com/questions/52067177
复制相似问题