Jump to content

EnvGet("PATH") inserts a semicolon at the end

Recommended Posts

Sorry - it's working as expected now.

I'm CERTAIN i checked both of these in the registry:


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

and saw no semicolon, but I've been messing with %PATH% so I'm sure it was my fault.

Anyway, thank you.

Link to comment
Share on other sites

Although the problem has been clarified in the meantime, here is an example of output using CMD and EnvGet.

#include <Constants.au3>
Global $PID = Run(@ComSpec & " /c echo %PATH%", @SystemDir, @SW_HIDE, $STDOUT_CHILD)
Global $SLine
While True
    $SLine &= StdoutRead($PID)
    If @error Then ExitLoop
ConsoleWrite("CMD    : Path= " & $SLine)
ConsoleWrite("EnvGet : Path= " & EnvGet("PATH") & @CRLF)


"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...