|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Mar 2011
Posts: 28
|
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? |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Feb 2007
Posts: 546
|
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Mar 2011
Posts: 28
|
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?
|
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
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 Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#5 |
|
Junior Member
|
try issproc, google it. It was made for Inno Setup but works for nsis too... no wmi required :-)
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|