Run a Batch File Invisibly

Running a batch file invisibly can come in handy, especially if you manage computers for other users. It allows you to perform a task without the user knowing anything about it.

Its very simple. Instead of telling the batch file to run, you tell a Visual Basic script to launch the batch file; and Visual Basic has the ability to launch things invisibly.

Follow this demo and you’ll be up and running in just a few seconds

You’ll create two files: the vbs script and a sample batch file


Open Notepad, and paste this content, then save the file as invisible.vbs to the Desktop

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\Documents and Settings\%username%\Desktop\1.bat" & Chr(34), 0
Set WshShell = Nothing


Open Notepad again, and paste this content, then save the file as 1.bat to the Desktop:

echo hello > "C:\Documents and Settings\%username%\Desktop\1.txt"


Now double click on invisible.vbs. You should see a 1.txt file get magically (invisibly) created on the Desktop.

That’s it! Modify to your liking!