Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 21st March 2011, 14:15   #1
juliarg
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?
juliarg is offline   Reply With Quote
Old 21st March 2011, 14:43   #2
jpderuiter
Major Dude
 
Join Date: Feb 2007
Posts: 546
http://forums.winamp.com/showthread.php?t=322583
jpderuiter is offline   Reply With Quote
Old 22nd March 2011, 10:06   #3
juliarg
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?
juliarg is offline   Reply With Quote
Old 22nd March 2011, 20:38   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
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
Afrow UK is offline   Reply With Quote
Old 11th April 2011, 10:19   #5
razvar
Junior Member
 
Join Date: Feb 2006
Location: Bucharest, Romania
Posts: 6
Send a message via Yahoo to razvar
try issproc, google it. It was made for Inno Setup but works for nsis too... no wmi required :-)
razvar is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump