I am trying to install Tomcat as a service on Windows 10 via command line using Inno Setup but I am running into problems currently this is my syntax.
[Run]
Filename: net.exe; Flags: runascurrentuser; parameters: "user elt_user TrackFox38# /add"
; installs tomcat makes it run as a service NOTE THAT IN INNO THIS IS A SINGLE LINE
Filename: {src}\..\apache-tomcat-7.0.69\bin\service.bat; Flags: runascurrentuser; parameters: "tomcat7 //IS//Tomcat7 --DisplayName='Apache_Tomcat_7' ^ --Install='C:\Program Files\Tomcat\bin\tomcat7.exe' --Jvm=auto ^ --StartMode=jvm --StopMode=jvm ^ --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start ^ --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop"
The weird thing is that it works when I manually paste it into command line. At first I thought it was a permissions issue but the fact that the net.exe
command works and Tomcat doesn't calls that into question. Also I have privileges required set to admin and the app needs admin privileges to start the installer so I don't think its a user issue. I'm new to Inno Setup and a bit stuck here.
Debug output:
[09:18:54.770] Filename: C:\program\Output\..\apache-tomcat- 7.0.69\bin\service.bat
[09:18:54.771] Parameters: tomcat7 //IS//Tomcat7 --DisplayName='Apache_Tomcat_7' ^ --Install='C:\Program Files\Tomcat\bin\tomcat7.exe' --Jvm=auto ^ --StartMode=jvm --StopMode=jvm ^ --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start ^ --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop
[09:18:54.867] Process exit code: 0