This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Appending to Windows PATH variable
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Nov 24, 2015
07:54 PM
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.
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.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Nov 30, 2015
04:44 AM
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")
}
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")
}