Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 8th November 2012, 04:35   #1
ilaiyaraja
Member
 
Join Date: Sep 2012
Posts: 81
How to install application as windows service using NSIS script?

I have written nsis script for my java project. I have successfully created a exe file using this nsis script. Final step of my installation process is installing my application as windows service using a batch file. I have installed successfully through command line using following code

"c:\program Files\program Files\test\bin\prunsrv.exe" //IS//servicename --Startup=auto --Jvm="Auto" --Classpath="%CLASSPATH%" --StartMode=jvm --StartClass=com.class.name --StartParams start --StopMode=jvm --StopClass=com.class.name --StopParams stop

same commands I have executed through nsis script is not working well. I have tried the following code

Exec '"$INSTDIR\bin\prunsrv.exe" //IS//servicename --Startup=auto --Jvm="Auto" --Classpath="%CLASSPATH%" --StartMode=jvm --StartClass=com.class.name --StartParams start --StopMode=jvm --StopClass=com.class.name --StopParams stop'

$INSTDIR refer to this directory c:\program Files\test.

How to install application as windows service through NSIS script?
ilaiyaraja is offline   Reply With Quote
Old 8th November 2012, 07:05   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,321
In the future, if you are going to ask the same question here and on stackoverflow (why?) please provide a link or something so other people can read the answer on SO, otherwise this is just a useless thread since you already got your answer...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
java, nsis

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