NSIS - check if a process exists (nsProcess is not working)

For my NSIS uninstaller, I want to check if the process is running. FindProcDLL does not work under Windows 7 x64, so I tried nsProcess.

I downloaded version 1.6 from the website: http://nsis.sourceforge.net/NsProcess_plugin

If I run 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 

This is line 14 of the sample script:

 ${nsProcess::FindProcess} "Calc.exe" $R0 

Does anyone know what is wrong? How to check if a process works with NSIS?

+5
source share
1 answer

NSIS cannot find the plug-in, so make sure you copy 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 

Inside Plugins\x86-unicode is the nsProcessW.dll file, renamed nsProcess.dll (blame the author for excessive complexity!)

More generally, refer to How to install the plugin? at the NSIS Wiki.

+6
source

Source: https://habr.com/ru/post/1247004/


All Articles