10

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.

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

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

This is line 14 of the example script:

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

Do somebody know what is wrong? How can I check if a process is running with NSIS?

Struct
  • 950
  • 2
  • 14
  • 41
  • For the compilation error did you put nsProcess.nsh in include directory of NSIS installed folder? Same for nsProcess.dll file? I'm using nsProcess FindProcess and KIllProcess under Win7 x64 without any issues. – hypheni Apr 13 '16 at 07:26

1 Answers1

19

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

The file inside Plugins\x86-unicode is nsProcessW.dll renamed to nsProcess.dll (blame the author for making it overly complicated!)

More generally, refer to How can I install a plugin? on the NSIS Wiki.

idleberg
  • 12,634
  • 7
  • 43
  • 70