I can't get anything to work if I use %comspec%. In order to use %..%, I thought you had to create a SZ_EXPAND key, which you can't normally do through REGEDIT.
I don't think you need to CD anywhere. The shell will start the CMD process with the default drive and directory you click on. Anyway you can execute multiple commands by enclosing the whole thing in quotes. Quote the whole thing since it is one parameter for cmd.exe / /_______________________________ / \ cmd.exe /k " "D:\Pro...\vsvars.bat" & cd %1 " \____________________/ \ Qoute this since it has spaces [HKEY_CLASSES_ROOT\Directory\shell\net\command] @="cmd.exe /k \" \"D:\\Program Files\\Microsoft Visual Studio .NET\\Common7\\Tools\\vsvars32.bat\" & cd \"%1\" \"" Cheers...David You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.