The Artima Developer Community
Sponsored Link

C# Answers Forum
vsvars32.bat ineffective - what's up?

3 replies on 1 page. Most recent reply: Mar 24, 2003 3:24 PM by Richard Muller

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
Richard Muller

Posts: 10
Nickname: rlmuller
Registered: Mar, 2003

vsvars32.bat ineffective - what's up? Posted: Mar 23, 2003 10:10 PM
Reply to this message Reply
Advertisement
Hi All,

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?

TIA,
Richard Muller


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: vsvars32.bat ineffective - what's up? Posted: Mar 24, 2003 2:00 PM
Reply to this message Reply
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"

Richard Muller

Posts: 10
Nickname: rlmuller
Registered: Mar, 2003

Re: vsvars32.bat ineffective - what's up? Posted: Mar 24, 2003 3:22 PM
Reply to this message Reply
Hi Chip,

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.

Great job!
Regards,
Richard

Richard Muller

Posts: 10
Nickname: rlmuller
Registered: Mar, 2003

Re: vsvars32.bat ineffective - what's up? Posted: Mar 24, 2003 3:24 PM
Reply to this message Reply
Sorry, Matt. My salutation of "Chip" was copied from the other site.

RLM

Flat View: This topic has 3 replies on 1 page
Topic: tangent Previous Topic   Next Topic Topic: Access Win32 const DRIVE_FIXED - How to?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use