Archive: Can't get nsProcess and Processes plugins to work in Win 7 x64


Can't get nsProcess and Processes plugins to work in Win 7 x64
Hi,
I need to detect a running firefox before installation in Win 7 x64. I tried both nsProcess and Processes plugins, but failed to get an expected return value.

The code I tried was the following ($5 contains the process name):

${nsProcess::FindProcess} "firefox.exe" $R0
StrCmp $R0 0 0 notdetected

After this, R0 contained rubbish.

Processes::FindProcess "firefox"
StrCmp $R0 1 0 notdetected

After this, R0 was empty.

Anything I could do next?


http://forums.winamp.com/showthread.php?t=322583


Thanks for the link! It turns out I have to use WMI. Is there already a NSIS macro for detecting a process via WMI without killing it?


Probably not. You can write the code yourself using the System plug-in or write a DLL. MSDN has lots of samples of querying WMI in C.

Stu


try issproc, google it. It was made for Inno Setup but works for nsis too... no wmi required :-)