NSIS在Win 7 x64中检测到32位进程

时间:2011-03-18 14:49:06

标签: process nsis

我的NSIS安装程序有一个相当常见的任务 - 在安装之前查看Firefox是否正在运行,并要求用户关闭它。但我还没有找到适用于Windows 7 x64的插件。我测试了Processes,FindProcDll,nsProcess - 它们都无法检测到32位的firefox。我很感激任何想法在哪里看。

更新:实际上,我无法使用任何这些插件检测到64位的Firefox。

2 个答案:

答案 0 :(得分:0)

nsProcess对我来说效果很好。它似乎也是您列出的插件的最新更新,所以这就是我测试那个插件的原因。我正在使用Win 7 x64并在任务管理器中确认Firefox显示为“firefox.exe * 32”

!include nsProcess.nsh
...
${nsProcess::FindProcess} "firefox.exe" $R0
${If} $R0 == "0"
    # it's running
${EndIf}

可能的退货代码:

0    Success
603  Process was not currently running
604  Unable to identify system type
605  Unsupported OS
606  Unable to load NTDLL.DLL
607  Unable to get procedure address from NTDLL.DLL
608  NtQuerySystemInformation failed
609  Unable to load KERNEL32.DLL
610  Unable to get procedure address from KERNEL32.DLL
611  CreateToolhelp32Snapshot failed

答案 1 :(得分:0)

FindProcDLL在32位和64位系统上运行良好。

我试图找到32位进程和64位进程,两者都很好。