Command Prompt AutoRun

Automatically run a program when opening a command prompt

From Tim Sneath's blog:

Monday, September 18, 2006 6:27 PM by Josh Einstein
I think I remember there being a way to get all command prompts to run the vsvars batch file so that the command prompt is actually usable. Do you remember what this is? I think it was a registry setting...

  1. re: Windows Vista Secret #1: Open Command Prompt Here

Monday, September 18, 2006 7:22 PM by tims
Josh, you're correct - it's a registry setting.

In HKLM\Software\Microsoft\Command Processor, add a new String value named AutoRun. Set the contents to the batch file you'd like to run (e.g. d:\tools\mycustomvsvars.cmd).