[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2408
  • Last Modified:

Run CMD java service minimized

On a Windows 2003 server we're running a scheduled java service. Every minute or so a CMD window pops up and the service is executed. Is it possible to run this CMD window minimized so it doesn't get in the way when working on the server?
0
R7AF
Asked:
R7AF
1 Solution
 
Farhan KaziSystems EngineerCommented:
You can use 'START' command with /MIN switch.
Syntax:
               START /MIN <script.cmd or command name>
Like:
               START /MIN C:\MyScript.cmd

For more info:
Click Start -> Run -> Cmd.exe -> OK
START /?
0
 
avatar-eCommented:
Or you could use one of my mini apps:

http://servicios.ried.cl/varios/hidder.exe
Runs hidder2.exe, hidden (you could rename this, for example "service_java.exe" will run "service_java2.exe", acting as the real exe, but hidden)

http://servicios.ried.cl/varios/minnofocus.exe
Same as hidder but runs "minnofocus2.exe" minimized with no focus

http://servicios.ried.cl/varios/nofocus.exe
Same as hidder but runs "nofocus2.exe" with no focus

http://servicios.ried.cl/varios/nullapp.exe
Does not run anything, just a null .exe
0
 
avatar-eCommented:
Of course you need to rename the service file, sometimes with java applications there will be a launcher and other exes.

Try to find the correct exe (1 or more) to hide, for example if in the java folder there is a: ping.exe maybe that executable produces the unwanted console window, rename to ping2.exe and copy hidden.exe as ping.exe, etc.
0
 
yasserdCommented:
Hi,

Make a shortcut to the service and sechedule it.

Right click that shortcut and choose Properties>Shortcut then change" Run" from "Normal window" to "Minimized"

Regards
0
 
rcclaffeCommented:
Instead of using java.exe, run it with javaw.exe - that's window free, and cleaner than all the short-cut and properties work-arounds approaches
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now