问题描述
对于我的 NSIS 卸载程序,我想检查进程是否正在运行.FindProcDLL 不能在 Windows 7 x64 下工作,所以我尝试了 nsProcess.
For my NSIS uninstaller, I want to check if a process is running. FindProcDLL is not working under Windows 7 x64, so I tried nsProcess.
我从网站下载了 1.6 版:http://nsis.sourceforge.net/NsProcess_plugin一个>
I've downloaded the version 1.6 from the website: http://nsis.sourceforge.net/NsProcess_plugin
如果我在 Example 文件夹中启动 nsProcessTest.nsi,我会收到以下错误:
If I start the nsProcessTest.nsi in the Example folder, I get the following errors:
Section: "Find process" ->(FindProcess)
!insertmacro: nsProcess::FindProcess
Invalid command: nsProcess::_FindProcess
Error in macro nsProcess::FindProcess on macroline 1
Error in script "C:\Users\Sebastian\Desktop\nsProcess_1_6\Example\nsProcessTest.nsi" on line 14 -- aborting creation process
这是示例脚本的第 14 行:
This is line 14 of the example script:
${nsProcess::FindProcess} "Calc.exe" $R0
有人知道怎么回事吗?如何检查进程是否正在使用 NSIS 运行?
Do somebody know what is wrong? How can I check if a process is running with NSIS?
推荐答案
NSIS 未找到该插件,因此请确保将其文件复制到正确的文件夹中.
NSIS does not find the plug-in, so make sure you copied its files to the correct folder.
NSIS 2.x:
NSIS/
├── Include/
│ └── nsProcess.nsh
└── Plugins/
└── nsProcess.dll
NSIS 3.x:
NSIS/
├── Include/
│ └── nsProcess.nsh
└── Plugins/
├── x86-ansi/
│ └── nsProcess.dll
└── x86-unicode/
└── nsProcess.dll
Plugins\x86-unicode
里面的文件被nsProcessW.dll
重命名为nsProcess.dll
(怪作者把它弄得太复杂了!)
The file inside Plugins\x86-unicode
is nsProcessW.dll
renamed to nsProcess.dll
(blame the author for making it overly complicated!)
更一般地说,请参阅 NSIS Wiki 上的如何安装插件?.
More generally, refer to How can I install a plugin? on the NSIS Wiki.
这篇关于NSIS - 检查进程是否存在(nsProcess 不工作)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!