Is $ENV:Path the System version of $path or the User version of $Path ?


on windows 7 system have 2 versions of environment variable $path; 1 under "user variables" , 1 under "system variables" in system properties/environment variables dialog box.

is value of $env:path supposed user or system version of $path ?

it's both, in way.  $env:path give process version of variable, initialized appending user path system path.

you can see 3 using system.environment class:

[system.environment]::getenvironmentvariable('path', 'machine') [system.environment]::getenvironmentvariable('path', 'user') [system.environment]::getenvironmentvariable('path', 'process')



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

2008 Windows Deployment Server Properties Error

Can no longer user MS Update - Files required to use Microsoft Update are no longer registered

How do a find data in one file, search for it in another file and if not found, write a custom message to another file