【发布时间】:2019-02-05 05:31:41
【问题描述】:
我需要检查是否安装了 Microsoft filter pack 2.0 应用程序。我找到了this 的答案,但在我的情况下,我没有应用程序名称,而是注册表中名为{95140000-2000-0409-1000-0000000FF1CE} 的程序的名称目录,这是我检测已安装应用程序的代码:
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${FILTER_PACK_KEY}" "UninstallString"
IfErrors FilterPackNotFound FilterPackFound
【问题讨论】:
-
你定义了 FILTER_PACK_KEY 吗?问题是什么,是没有检测到还是误报?
-
@Anders 是的,我有一个密钥,但它没有检测到任何内容,并且此代码在 messageBox 中返回空字符串:
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\95140000-2000-0409-1000-0000000FF1CE" "InstallDate" MessageBox MB_OK "NSIS is installed at: $0" -
这种情况也不行:
"Software\Microsoft\Windows\CurrentVersion\Uninstall\{95140000-2000-0409-1000-0000000FF1CE}" -
这个 filterpack 是 64 位的吗?
-
@Anders 是的,它是 64 位的!