Jump to content

How to hide Command window when batch file runs


Recommended Posts

Posted

On WinXPSP3, fully patched.

 

I would like to execute a small batch file by executing a quicklaunch

toolbar shortcut whose target is a .cmd file on the C:\ drive. Everything

works as intended, but I don't want the command window appearing on the

desktop and remaining open until the launched app. closes. Is there

something that I can add to the script to allow this to execute in the

background, without the command window launching on the desktop?

 

The content of the file is something like this:

 

echo off

(net start service 1)&&(net start service 2)&&(net start service 3)

"C:\Program Files\Product Directory\exec\app.exe"

 

--

V2

  • Replies 4
  • Created
  • Last Reply
Guest Terry R.
Posted

Re: How to hide Command window when batch file runs

 

The date and time was 10/23/2008 6:17 AM, and on a whim, v2win pounded

out on the keyboard:

> On WinXPSP3, fully patched.

>

> I would like to execute a small batch file by executing a quicklaunch

> toolbar shortcut whose target is a .cmd file on the C:\ drive. Everything

> works as intended, but I don't want the command window appearing on the

> desktop and remaining open until the launched app. closes. Is there

> something that I can add to the script to allow this to execute in the

> background, without the command window launching on the desktop?

>

> The content of the file is something like this:

>

> echo off

> (net start service 1)&&(net start service 2)&&(net start service 3)

> "C:\Program Files\Product Directory\exec\app.exe"

>

 

Right click on the shortcut and select Properties. Drop down the "Run"

selector and choose Minimized. That should do what you want, although

you still see it in the Taskbar.

 

--

Terry R.

 

***Reply Note***

Anti-spam measures are included in my email address.

Delete NOSPAM from the email address after clicking Reply.

Guest John John (MVP)
Posted

Re: How to hide Command window when batch file runs

 

http://www.ericphelps.com/batch/samples/invisible.txt

 

John

 

v2win wrote:

> On WinXPSP3, fully patched.

>

> I would like to execute a small batch file by executing a quicklaunch

> toolbar shortcut whose target is a .cmd file on the C:\ drive. Everything

> works as intended, but I don't want the command window appearing on the

> desktop and remaining open until the launched app. closes. Is there

> something that I can add to the script to allow this to execute in the

> background, without the command window launching on the desktop?

>

> The content of the file is something like this:

>

> echo off

> (net start service 1)&&(net start service 2)&&(net start service 3)

> "C:\Program Files\Product Directory\exec\app.exe"

>

Posted

Re: How to hide Command window when batch file runs

 

This is a great little program that will do what you want.

 

Hidden Start - run apps in the background

http://www.ntwind.com/software/utilities/hstart.html

 

 

ju.c

 

 

"v2win" <v2win@discussions.microsoft.com> wrote in message news:E985754C-3502-4732-BA08-4F8109C93C27@microsoft.com...

> On WinXPSP3, fully patched.

>

> I would like to execute a small batch file by executing a quicklaunch

> toolbar shortcut whose target is a .cmd file on the C:\ drive. Everything

> works as intended, but I don't want the command window appearing on the

> desktop and remaining open until the launched app. closes. Is there

> something that I can add to the script to allow this to execute in the

> background, without the command window launching on the desktop?

>

> The content of the file is something like this:

>

> echo off

> (net start service 1)&&(net start service 2)&&(net start service 3)

> "C:\Program Files\Product Directory\exec\app.exe"

>

> --

> V2

Guest Ramesh Srinivasan, MS-MVP
Posted

Re: How to hide Command window when batch file runs

 

How to run .BAT files invisibly, without displaying the Command Prompt

window - The Winhelponline Blog:

http://www.winhelponline.com/blog/run-bat-files-invisibly-without-displaying-command-prompt/

 

--

Regards,

 

Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]

The Winhelponline Blog http://www.winhelponline.com/blog

 

 

"v2win" <v2win@discussions.microsoft.com> wrote in message

news:E985754C-3502-4732-BA08-4F8109C93C27@microsoft.com...

> On WinXPSP3, fully patched.

>

> I would like to execute a small batch file by executing a quicklaunch

> toolbar shortcut whose target is a .cmd file on the C:\ drive. Everything

> works as intended, but I don't want the command window appearing on the

> desktop and remaining open until the launched app. closes. Is there

> something that I can add to the script to allow this to execute in the

> background, without the command window launching on the desktop?

>

> The content of the file is something like this:

>

> echo off

> (net start service 1)&&(net start service 2)&&(net start service 3)

> "C:\Program Files\Product Directory\exec\app.exe"

>

> --

> V2


×
×
  • Create New...