how to set path environment variable

4

I want to compile a code in software which is needed to call visual c++;My Os is windows cp professional; I've installed visual studio professional v10.but it still shows an error message indicating "check if bin directory of your visual c++ is included in the path environment variable", where this action must be done?


I added that Path but now it says " Check that Visual C++ has been installed correctly" how I gotta check? I executed a program in Visual C++ and it s working nicely.

user44509

Posted 2010-08-11T14:20:59.683

Reputation: 403

Duplicate question, for answer, see: http://superuser.com/questions/163891/environment-variables-windows7/163898#163898

– Tamara Wijsman – 2010-08-11T14:27:10.330

Those instructions are not very good. – paradroid – 2010-08-11T14:28:07.670

Nothing wrong with those instructions, although I didn't know of setx. – Tamara Wijsman – 2010-08-11T14:42:56.733

I think it is hard to edit long environmental variables in that GUI and it also seems a bit perverse! – paradroid – 2010-08-11T14:50:42.933

Run => %windir%\System32\rundll32.exe sysdm.cpl,EditEnvironmentVariables – Andrew – 2017-08-25T14:44:52.147

Answers

3

Go to

System Properties (press windows key + pause/break)
Advanced
Environment Variables
System variables

Add the required path there

bryan

Posted 2010-08-11T14:20:59.683

Reputation: 7 848

4

In a CMD prompt, type:

path

To add to your user account path:

setx path "%path%;C:\foo"

For the system path:

setx path "%path%;C:\foo" -m

paradroid

Posted 2010-08-11T14:20:59.683

Reputation: 20 970

I added that Path but now it says " Check that Visual C++ has been installed correctly" how I gotta check? I executed a program in Visual C++ and it s working nicely. – user44509 – 2010-08-11T16:04:35.617

%PATH% contains both user and machine components of the environment variable PATH. Running e.g. the command setx path "%path%;C:\foo" -m will effectively merge the two which is undesirable in most cases. Aside from that it will also overwrite the unexpanded paths with expanded ditto (%SYSTEMROOT%\System32 becomes e.g. C:\Windows\System32). – mandrake – 2012-05-31T08:26:07.010

@mandrake: Yes, you're right. It would be better to echo %PATH% | clip to get the path into the clipboard, edit it in Notepad and then use the full unexpanded path (with no duplicates) in the command above instead. – paradroid – 2012-05-31T09:20:09.820

1

Your visual studio installation should have added a menu item for under Tools for the VS 2008 command prompt - this will usually set the appropriate environment for you.

chris

Posted 2010-08-11T14:20:59.683

Reputation: 8 607