Loading
Appending to Windows PATH variable
Hello,

 

I've searched for an answer to this inquiry but came up empty.

 

Any links explaining how to append a directory path to a Windows 7 PATH environment variable

 

using a Basic MSI project?

 

Thank You.

  • PS: (Check for path (in this case, C:\xampp\php) and add it to the system PATH, all users, system-wide)

     

    Store in Binary table, Deferred Execution in System Context..

     

    $PATH = [Environment]::GetEnvironmentVariable("PATH")

     

    $xampp_path = "C:\xampp\php"

     

    if( $PATH -notlike "*"+$xampp_path+"*" ){

     

    [Environment]::SetEnvironmentVariable("PATH", "$PATH;$xampp_path", "Machine")

     

    }
    Expand Post

Loading
Appending to Windows PATH variable