• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 427
  • Last Modified:

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?
0
dafricano
Asked:
dafricano
3 Solutions
 
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
 
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
 
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

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

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