Solved

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

Posted on 2013-11-04
4,933 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 21

Accepted Solution

mcsween earned 500 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

### Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Simple Linear Regression
Progress

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

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