我正在开发 NSIS 安装程序,并尝试在卸载之前检查某个应用程序是否正在运行。所以,我使用kernel32::CreateMutexA
调用。这是块:
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "cmd.exe") i .r1 ?e'
Pop $R0
StrCmp $R0 0 +3
MessageBox MB_USERICON "The application is already running."
Abort
我把它放进un.onInit
. 麻烦的是,这个过程(cmd.exe
这里)永远不会被检测到。
我错过了什么?
德克萨斯州。