How to run a scheduled .bat file in the background / silently

Hi,

            if you use it once it was created more than once and you know or control the name of the file then you may run it silently/hidden using simple vbscript file. Just paste following script into text editor and save it with ".vbs" extension:

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.run "%comspec% /c C:\myfile.bat",0
Set WshShell = Nothing

Don’t forget to replace C:\myfile.bat with the actual directory and file, and to run vbscript you need Windows Script 5.6 installed on you computer (assuming you have windows). Check this site http://www.microsoft.com/downloads/details.aspx?FamilyId=C717D943-7E4B-4622-86EB-95A22B832CAA&displaylang=en and add only .vbs to task scheduler.

 

Advertisements
This entry was posted in Computers and Internet. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s