1. Home
  2. Windows Tips
  3. Run invisible batch scripts on windows 10

How to run invisible batch scripts on Windows 10

When you run a batch file, you get one of two things; a persistent Command Prompt window that will remain visible until the script is done or until you tap a key to dismiss it, or you will see a fleeting glimpse of a command prompt window appear and disappear. On slower systems, this appearance by Command Prompt might not be so fleeting. Regardless, if you’d like to run invisible batch scripts so that no window appears, not even for a split second, we recommend using a free open-source tool called RunApp.

RunApp is a very light tool that was developed for just this purpose

Run invisible batch scripts

First, make sure you have the batch script ready, and then download RunApp. Before you can use this app, you’re going to have to create a configuration file for it. This file, for our purpose, is easy to create but the app is also capable of running additional arguments. If you’re interested in passing arguments to the script that’s running, read the Github page for the app where it details how you can do that.

To create the configuration file, open a new Notepad file and enter the following. Replace the ‘MyBatchFile.bat’ with the complete path to the script that you want to run invisibly. DO NOT enclose the path in double-quotes even if it has a space in it.

Syntax

:style:hidden

MyBatchFile.bat

Example

:style:hidden

C:\Users\fatiw\Desktop\exit VLC.bat

Save the file with the name config.arg and save it to the same folder that the RunApp.exe file is in. This is important. If the configuration file is saved somewhere else, RunApp will not be able to find it and run the script.

Now that you’ve created the configuration file, you can run the runapp.exe file. It will silently run the script and you won’t see so much as a shadow of the command prompt window.

This is great for scripts that do not require user input. If you happen to have a script that asks the user for input, then there really isn’t any point running it invisibly. If the user is unable to see the prompt and enter a response, the script won’t be able to do anything. To that end, we recommend keeping this for just scripts that can run without any user intervention needed.

The great thing about this method is that you can use the Runapp.exe file with a scheduled task and run invisible batch scripts with them.