update
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
## Get contents of SYSTEM PATH environment variable
|
||||
$CURRENT_PATH = (Get-Itemproperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name Path).Path
|
||||
$REG_ENVVAR = 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment'
|
||||
$CURRENT_PATH = (Get-Itemproperty -Path $REG_ENVVAR -Name Path).Path
|
||||
$NEW_PATH = $null
|
||||
$REMOVE_PATH =$null
|
||||
|
||||
@@ -18,8 +19,6 @@ Foreach ( $path in $CURRENT_PATH.Split(";") )
|
||||
}
|
||||
}
|
||||
|
||||
Write-Output "New Path:`n`r${NEW_PATH}"
|
||||
|
||||
Write-Output "Removed Paths:`n`r${REMOVE_PATH}"
|
||||
|
||||
#Set-ItemProperty -Path $REG_ENVVAR -Name Path -Value $NEW_PATH
|
||||
Set-ItemProperty -Path $REG_ENVVAR -Name Path -Value $NEW_PATH
|
||||
Reference in New Issue
Block a user