Posted By: Anonymous
I am trying to add
C:xamppphp to my system
PATH environment variable in Windows.
I have already added it using the Environment Variables dialog box.
But when I type into my console:
it doesn’t show the new
PATH=D:Program FilesAutodeskMaya2008bin;C:Ruby192bin;C:WINDOWSsystem32;C:WINDOWS; C:WINDOWSSystem32Wbem;C:PROGRA~1DISKEE~2DISKEE~1;c:Program FilesMicrosoft SQL Server90Toolsbinn;C:Program FilesQuickTimeQTSystem;D:Program FilesTortoiseSVNbin ;D:Program FilesBazaar;C:Program FilesAndroidandroid-sdktools;D:Program Files Microsoft Visual StudioCommonToolsWinNT;D:Program FilesMicrosoft Visual StudioCommon MSDev98Bin;D:Program FilesMicrosoft Visual StudioCommonTools;D:Program Files Microsoft Visual StudioVC98bin
I have two questions:
- Why did this happen? Is there something I did wrong?
- Also, how do I add directories to my
PATHvariable using the console (and programmatically, with a batch file)?
This only modifies the registry. An existing process won’t use these values. A new process will do so if it is started after this change and doesn’t inherit the old environment from its parent.
You didn’t specify how you started the console session. The best way to ensure this is to exit the command shell and run it again. It should then inherit the updated PATH environment variable.