[英]NSIS - check if process exists (nsProcess not working)
For my NSIS uninstaller, I want to check if a process is running. 对于我的NSIS卸载程序,我想检查进程是否正在运行。 FindProcDLL is not working under Windows 7 x64, so I tried nsProcess. FindProcDLL在Windows 7 x64下无法运行,所以我尝试了nsProcess。
I've downloaded the version 1.6 from the website: http://nsis.sourceforge.net/NsProcess_plugin 我从网站上下载了1.6版本: http : //nsis.sourceforge.net/NsProcess_plugin
If I start the nsProcessTest.nsi in the Example folder, I get the following errors: 如果我在Example文件夹中启动nsProcessTest.nsi,我会收到以下错误:
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
This is line 14 of the example script: 这是示例脚本的第14行:
${nsProcess::FindProcess} "Calc.exe" $R0
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找不到插件,因此请确保将其文件复制到正确的文件夹中。
NSIS 2.x: NSIS 2.x:
NSIS/
├── Include/
│ └── nsProcess.nsh
└── Plugins/
└── nsProcess.dll
NSIS 3.x: NSIS 3.x:
NSIS/
├── Include/
│ └── nsProcess.nsh
└── Plugins/
├── x86-ansi/
│ └── nsProcess.dll
└── x86-unicode/
└── nsProcess.dll
The file inside Plugins\\x86-unicode
is nsProcessW.dll
renamed to nsProcess.dll
(blame the author for making it overly complicated!) Plugins\\x86-unicode
的文件是nsProcessW.dll
重命名为nsProcess.dll
(责怪作者过于复杂!)
More generally, refer to How can I install a plugin? 更一般地,请参阅如何安装插件? on the NSIS Wiki. 在NSIS Wiki上。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.