The batch file contains a series of commands executed by the command line interpreter. You can run a batch file invisible (hidden) without any software.
In this post, we will see the two methods to make a batch file run
Make a Batch File Run Invisible
Let's create a batch file.
- Type the following command in the Notepad
- Save the file as example.bat. Make sure you’ve selected "All Files" in the "Save as type" option.
Using the following steps, you can create a VBScript file which will make this batch file hidden.
- Type the following commands in the Notepad.
- Replace the batch file path with yours. Save the file as hidden.vbs. Ensure you’ve selected "All Files" while saving the file.
- Open the Command Prompt (Shortcut: open Run Command (Windows key + R) and type cmd).
- Change the directory in the Command Prompt to the location where you saved the hidden file.
- Now, type hidden.vbs.
set w = CreateObject("WScript.Shell")
W.Run chr(34) & "C:UsersRajDocumentsexample.bat" & chr(34), 0
set w= Nothing
That's all. The batch file should run invisible and it will open the notepad.
- You can use the same example.bat file for this method too. But, add the "Cls"(without quotes) at the last of the example.bat file.
- Open the Command Prompt.
- Change the directory to the location where you saved the batch file.
- Type the following command
Start /b example.bat
Now, the batch file runs completely hidden and opens the notepad.
Run Batch File in Minimized Window
Alternatively, if you want to run the batch file in minimized window, you can use the following command in Command Prompt
Start /min example.bat
This will run the example.bat in a minimized screen.
I hope that the information in this post is useful to you. If you find the information in this post useful, share this post with your friends.