How to Run a Command Prompt Scheduled Task Window Minimized

You may be pretty savvy with your computer and have written a few batch files to run routine tasks by scheduling them.  The one annoying thing with this approach is that the command prompt window will flash on the screen when the scheduled task runs.  There is a quick fix for this though.  First, create a shortcut to the batch file, and then right-click on it and select Properties. Next, on the Shortcut tab, go to the Run dropdown box and change the value from Normal to Minimized.

Next go to Scheduled Tasks and either create or edit an existing task.  In the Run box, you'll point to the shortcut, not the actual batch file. However, you cannot point via the Browse button, as this will just ultimately point the the batch file, even if you selected the shortcut.  Instead, you must enter "drive:\path\Shortcut to filename.lnk."  Some caveats: 1) The quotes must be used if you left the default name of "Shortcut to..." intact rather than renaming, or if your custom name contains spaces. 2) You must put the .lnk at the end of the file name or else the task will not point to the shortcut.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.