[ClearEnvironment] Fix registry comments

This commit is contained in:
Alexander Karatarakis 2018-01-27 22:08:07 -08:00
parent c835db39e8
commit 6c0f3a8859

View File

@ -1,8 +1,8 @@
# Capture environment variables for the System and User. Also add some special/built-in variables.
# These will be used to synthesize a clean environment
$specialEnvironmentMap = @{ "SystemDrive"=$env:SystemDrive; "SystemRoot"=$env:SystemRoot; "UserProfile"=$env:UserProfile } # These are built-in and not set in the registry
$machineEnvironmentMap = [Environment]::GetEnvironmentVariables('Machine') # HKEY_CURRENT_USER\Environment
$userEnvironmentMap = [Environment]::GetEnvironmentVariables('User') # HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
$machineEnvironmentMap = [Environment]::GetEnvironmentVariables('Machine') # HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
$userEnvironmentMap = [Environment]::GetEnvironmentVariables('User') # HKEY_CURRENT_USER\Environment
# Identify the keySet of environment variable names
$nameSet = ($specialEnvironmentMap.Keys + $machineEnvironmentMap.Keys + $userEnvironmentMap.Keys) | Sort-Object | Select-Object -Unique