I wanted to be able to run csc.exe and use VS symbols within a newly opened Command window without having to run vsvars32.bat each time.
I double-clicked vsvars32.bat from a Windows Explorer window, then opened a Command window and entered the command csc. I got the error message: 'csc' is not recognized as an internal or external command ...
I appended the command C:\PROGRA~1\MICROS~1.NET\Common7\Tools\vsvars32.bat to C:\Windows\System32\AutoExec.NT. After rebooting, I got the same error when executing csc in a new Command window.
To test the command I had added to I pasted C:\PROGRA~1\MICROS~1.NET\Common7\Tools\vsvars32.bat in the window and executed it. Then csc was successful.
My recollection is that under Visual Studio 6.0 within Windows 2000 Pro, I just ran vcvars.bat in a command window and had environment variables set in a way that defined them in every subsequent command window.
What?s a straight-forward way of using vsvars32.bat to populate the environment?
There is a "Visual Studio .Net Tools" sub-menu of the Visual Studio menu that is installed; it contains a "Visual Studio .Net Command Prompt" item. You can copy that shortcut somewhere (like to your QuickLaunch toolbar, for example), or you can look at its properties and see that it is simply running "%comspec% /k [vspath]\vsvars32.bat"
Many thanks for your help. I had gotten the command you provided (in the form %comspec% /k "C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\vsvars32.bat") from another forum: http://www.tek-tips.com/viewthread.cfm?SQID=507406&SPID=732&page=1. It worked fine as a shortct on the Start menu.
I was just going to post it here. However, you provided the "perfect" answer. I "knew" there had to be simple answer to my question. I "just" didn't know what the answer was :-).
BTW, as you say, the command in that shortcut is precisely equal to the command cited above.