How to make a Windows Command Prompt (aka DOS window) automatically run a batch file at start?


/ Published in: Other

A tip to automatically run a batch file when start a Windows Command Prompt (aka DOS window)


Copy this code and paste it in your HTML
  1. [Assume the console is to be started by clicking a shortcut to cmd.exe]
  2.  
  3. 1. Right click the shortcut, and select Properties
  4. 2. On the Command Prompt Properties dialog, select the Shortcut tab.
  5. 3. On the Shortcut tab, locate a field labed Target:. add " /u /k path-to-bat " after "...cmd.exe", where path-to-bat here should be replaced by the path to the batch file to be automatically executed.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.