Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 6th July 2007, 16:17   #1
Durando
Junior Member
 
Join Date: Jul 2007
Posts: 3
Why Doesn't This Script Work for me

This script is doing two things first of all it is searching for a specific registry key to get the install path and also making sure that the program this addon is inteded for is installed, this part of the script works without problems.

The Second part is using the Processes plugin to see if this program is running, if the program is found to be running $R0 should return 1 and halt on the message i have created for some reason it does not and I cant figure out why. I'm hoping its a simple error on my part that one of you will beable to find and help me correct.

Function .onInit
ReadRegStr $R1 HKLM "SOFTWARE\Program Manufacturer\Program To Search For\" "InstallPath"

StrCmp $R1 "" ProgNotFound ProgFound

ProgNotFound:
MessageBox MB_OK|MB_ICONEXCLAMATION "The Program this installer needs is not installed on this computer. You must install it to continue with this installation."
Quit

ProgFound:
loop:
Processes::FindProcess "Prog"
StrCmp $R0 1 0 done

MessageBox MB_OK|MB_ICONEXCLAMATION "The Program this installer needs is running on this computer. You must close it to continue with this installation."
Quit

done:
FunctionEnd
Durando is offline   Reply With Quote
Old 6th July 2007, 16:28   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
It seems that it doesn't find the process, did you try to debug your script with a message box to see what $R0 contains in that stage?
What is the loop label about?

You may want to give a try to FCT plugin as well,

http://nsis.sourceforge.net/FCT_plug-in

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine 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