[wildfly-dev] Windows Batch Scripts

James Livingston jlivings at redhat.com
Sun Jun 2 18:33:26 EDT 2013


On Fri, 2013-05-31 at 11:53 -0500, Brian Stansberry wrote:
> AIUI, to install as a service, it's
> 
> prunsrv.exe install path\to\[standalone|domain].bat

If only it was that simple. The one I have for EAP 6 (I'd assume it
would work for WilfFly too) is:

prunsrv.exe install JBossEAP6 --DisplayName="JBoss EAP 6"
--LogLevel=INFO --LogPath="%JBOSS_HOME%\standalone\log"
--LogPrefix=service --StdOutput=auto --StdError=auto --StartMode=exe
--StartImage=cmd.exe --StartPath="%JBOSS_HOME%\bin" ++StartParams="/c
\"set NOPAUSE=Y ^^^&^^^& standalone.bat\"" --StopMode=exe
--StopImage=cmd.exe --StopPath="%JBOSS_HOME%\bin"  ++StopParams="/c
jboss-cli.bat --controller=localhost:9999 --connect --command=:shutdown"


That's just the simplified version which doesn't deal with domain mode,
needing credentials because it's running as a different user and so
on :(


> I confess I haven't tried this. I've never seen any other Windows 
> startup scripts besides standalone/domain.bat.

https://bugzilla.redhat.com/show_bug.cgi?id=900708 has the current
iteration of a script to set this up that various people have been
working on for EAP 6, and assuming it works for WF as-is, could probably
be added.


-- 
James "Doc" Livingston
JBoss Support Engineering Group



More information about the wildfly-dev mailing list