Go Premium for a chance to win a PS4. Enter to Win

x
Solved

# How to run bat/cmd batch file silently without opening console window

Posted on 2013-11-04
Medium Priority
5,522 Views
I hope someone can help me out here I have a bat file located on the network share and I'm trying to run it with the task scheduler. What I'm looking for is a way to run this file silently without displaying a console window. I have tried  cmd.exe /c start \\Network path to the batch file but that did not work I get the error from task scheduler. Is there a other clean way to get this accomplished. Also I'm deploying  this task through GPO not sure if that makes any difference.

Thanks
0
Question by:btny
1 Comment

LVL 22

Accepted Solution

mcsween earned 2000 total points
ID: 39622531
cmd /c \\path\to\batch\file.bat will run it then close after.

When you call the start command you would have to use that to call another cmd.exe process (which wouldn't make sense) as the batch file cannot be started natively (it isn't a program; it's the list of commands to run within the program.)

To run silently you will need to use powershell or vbscript.  A vbscript example is below.

Set wShell = CreateObject("WScript.Shell" )
wShell.Run chr(34) & "\\network\path\to\batch\file.bat" & Chr(34), 0

0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Six Sigma Control Plans
###### Suggested Courses
Course of the Month11 days, 14 hours left to enroll

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

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