Environment Variable - Spaces

Welcome Forums General PowerShell Q&A Environment Variable - Spaces

This topic contains 0 replies, has 1 voice, and was last updated by  Forums Archives 7 years, 5 months ago.

  • Author
  • #5468

    Topics: 1562
    Replies: 0
    Points: 0
    Rank: Member

    by lasty12 at 2013-01-24 03:22:15

    Hi All

    One of the programs we install requires environment variables created manually.

    [code2=powershell]setx PATH "$env:path; c:\variables\example\bin" -m
    setx example "$env:example c:\variables\example" -m
    setx arb "$env:wsenvfile c:\arb\arb.txt" -m[/code2]

    I have managed the above with the following, but am getting spaces before the "C:\..." e.g. "_c:\"

    Can anyone suggest how to get rid of the space?

    Thanks in advance

    by Infradeploy at 2013-01-24 05:02:49

    environment is a psdrive in powershell where you can add and modify items:
    http://technet.microsoft.com/en-us/libr ... 30964.aspx

The topic ‘Environment Variable - Spaces’ is closed to new replies.