How to Start Windows run.bat without a Console Window (Hidden)

As generated, the run.bat file to start various TransSECS deployments runs with a console window for debugging. For final deployment you can remove this console window by changing the batch file by using a start /b in the command line which starts java.

For example, a batch file might be generated as:

@echo off 
rem Ensure there is a jre on the path. Copy the jre provided or install a jvm
set path=C:\Users\Public\ErgoTech\TransSECSServers\MIStudioSuite\jre\bin\;%path%
set classpath=./;./WasherRuntime.jar
rem -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8100,suspend=n
 
java deploy.ToolName.EquipmentController
@echo on 

Change the line:

java deploy.ToolName.EquipmentController

to:

start /b javaw deploy.ToolName.EquipmentController

The script below has this change and will run “hidden”.

@echo off 
rem Ensure there is a jre on the path. Copy the jre provided or install a jvm
set path=C:\Users\Public\ErgoTech\TransSECSServers\MIStudioSuite\jre\bin\;%path%
set classpath=./;./WasherRuntime.jar
rem -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8100,suspend=n
 
start /b javaw deploy.ToolName.EquipmentController
@echo on 

Note: When you start the batch file this way, you will not have a console window to shut down the application to make changes or to restart. You will need to find the java process in the Windows Task Manager associated with this runtime and right click to End All Processes.