Old 24th May 2010, 13:34   #1
RajeevNSIS
Junior Member
 
Join Date: May 2010
Posts: 2
not able to call funtion in NSIS

Hi
i am new to NSIS , I am trying to call a function form un.OnInit.But it is giving some error that function should start with "un." .Even after that i am not able to call it.
Function un.onInit

Call FindProcessRun

FunctionEnd

Function i am calling is like:

Function un.FindProcessRun
${FindProcess} "NokiaWDE.exe,WebSDKSimulator.exe" $0
${If} $0 <> 0
MessageBox MB_OK "The application you are trying to install is running.Close it and try again."
Abort
FunctionEnd


Pls let me help how to solve this problem.

Thax...
RajeevNSIS is offline   Reply With Quote
Old 24th May 2010, 15:33   #2
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
code:
Call un.FindProcessRun


This particular function might be better as a macro.. then you wouldn't have the installer vs uninstaller function naming issue either.
Animaether is offline   Reply With Quote
Old 25th May 2010, 04:19   #3
RajeevNSIS
Junior Member
 
Join Date: May 2010
Posts: 2
Thanks Animaether,

After applying the changes suggested by you , i am getting one more error like:
Error in macro FindProcess:

${FindProcess} "NokiaWDE.exe , WebSDKSimulator.exe" $0

I think ${FindProcess} is giving a error .FindProcess is a macro which i have defined like:

!macro FindProcess ProcessList BoolReturn
Push '${ProcessList}'
Call FindProcess
Pop ${BoolReturn}
!macroend

Please suggest a solution.

Thax
RajeevNSIS is offline   Reply With Quote
Old 25th May 2010, 09:00   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
!insertmacro FindProcess

Also make sure the macro is defined before you use it in the script.

Edit: You still seem to have it wrong. Instead of putting that code in a function, put the code in a macro. You're just calling the function in a macro which is exactly the same as before.

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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