Archive: not able to call funtion in NSIS


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...


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.

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


!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