Archive: Nopey and service installation


Nopey and service installation
Dear list,

I'm rather new to NSIS so I hope that this question is not too stupid!

I tried to set up a function which should install a service using Nopey but unfortunately the code doesn't work. I tried this:


Function installService
GetTempFileName $R0
File /oname=$R0 "c:\programme\nsis\plugins\nopey\nopey.exe"
nsExec::ExecToStack '"$R0" info video'
Pop $0 # return value/error/timeout
Pop $1 # printed text, up to ${NSIS_MAX_STRLEN}
MessageBox MB_OK "$R0 $0 $1"

MessageBox MB_YESNO "Do you want to install the Server service?" IDYES perform
cleanup
perform:
nsExec::ExecToStack '"$R0" service install "Server2" "$INSTDIR\myserver.exe"'
Pop $0 # return value/error/timeout
Pop $1 # printed text, up to ${NSIS_MAX_STRLEN}
MessageBox MB_OK "$0 $1"

nsExec::ExecToStack '"$R0" service start "Server2"'
Pop $0 # return value/error/timeout
Pop $1 # printed text, up to ${NSIS_MAX_STRLEN}
MessageBox MB_OK "$0 $1"
cleanup:
DeleteFile $R0
return
FunctionEnd


which is more or less a copy from the Nopey example. But even the info video throwed an error message.
Can someone help me out on this?

Thanks in advance

and

regs,

Stephan


There are better methods available (search the NSIS Archive) without using such a tool.