Hiding a command window

Posted on 2012-08-29
Last Modified: 2014-08-08
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?
Question by:dafricano
    LVL 13

    Assisted Solution

    Check this post.  3 posts down.  It takes 3 batch files to accomplish this:
    LVL 12

    Accepted Solution

    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.
    LVL 3

    Assisted Solution

    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>


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
    This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
    Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now