Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running a server from a command prompt. I don't want the command prompt to be visible because other people in my house keep closing it, which shuts down the server. I need some extra scripting to hide it while keeping it running. An ideal solution would allow me to access the hidden prompt and then hide it again as needed.

Here is the code I'm currently using:

IF /I "%PROCESSOR_ARCHITECTURE:~-2%"=="64"  java -Xms1024M -Xmx2048M -jar "%~dp0craftbukkit- 0.0.1-snapshot.jar"
IF /I "%PROCESSOR_ARCHITECTURE:~-2%"=="86"  java -Xincgc -Xmx1024M -jar "%~dp0craftbukkit-0.0.1-snapshot.jar"
share|improve this question

migrated from Oct 25 '11 at 15:56

This question came from our site for professional and enthusiast programmers.

Use the start-command to seperate a process you want to run from the terminal the batch file is running in.

But you will not be able to get the terminal back - if you need it for reading messages, pipe these to some file or use some software which allows you to hide windows.

share|improve this answer

Assuming that the command prompt isn't part of the server but is just the standard command prompt, then you should be able to avoid it altogether by getting rid of the batch file and using JavaW instead of Java to start your server.

So just execute the relevant command, either from the Run on the start menu, or from a command prompt you open manually.

So if you've got a 64 bit CPU it should be javaw -Xms1024M -Xmx2048M -jar "%~dp0craftbukkit- 0.0.1-snapshot.jar".
Otherwise it should be javaw -Xincgc -Xmx1024M -jar "%~dp0craftbukkit-0.0.1-snapshot.jar".

share|improve this answer
well the batch file starts the server and in the cmd window it loads all achievments and loads the world so idk if the cmd is part of the server but ill try this – user1012659 Oct 25 '11 at 12:37
that didnt work :/ – user1012659 Oct 25 '11 at 14:18

There are a couple of tricks but I think any of them would either make it too easy for others to access or to annoying for you to access. I think your best bet would be to install something like Power Menu and after you start window minimize it to the system tray. Easy to call and doesn't get in anyone's way so it is less likely to get closed by others.

share|improve this answer

I don't think you can hide it unless you write a small program that runs your server and minimises to the system tray.

How about:

@Echo Off
share|improve this answer

You must log in to answer this question.