Hiding a command window

We have a command a program that launches via .bat file, we keep the command window up to run a clean up process after it is closed.

Is there any way to hide the command window while the app is being used? so that the users do not close it?
dafricanoAsked:
Who is Participating?
 
Seaton007Commented:
You could also accomplish the same thing with a single VBScript file.

Here is an example:
Set objShell = CreateObject("WScript.Shell")
objShell.Run "cmd", 0

Open in new window

This example opens a command prompt (cmd.exe) in a hidden window.  Just copy the code into a text file and replace "cmd" with whatever you are wanting to run and then save it as a .vbs file and run it.
0
 
xDUCKxCommented:
Check this post.  3 posts down.  It takes 3 batch files to accomplish this:

http://www.computing.net/answers/dos/run-batch-file-invisiblestealth/14270.html
0
 
telczj9Commented:
Alternatively this option will not hide it but minimize it.

Right now wherever you are starting your bat file you will want to precede it with

start /min <your-batch-script.bat>

Cheers!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.