|
|
@ -5153,7 +5153,7 @@ function StorageSenseFrequency |
|
|
|
Hibernation -Disable |
|
|
|
|
|
|
|
.NOTES |
|
|
|
Do not recommend turning it off on laptops |
|
|
|
It isn't recommended to turn off for laptops |
|
|
|
|
|
|
|
.NOTES |
|
|
|
Current user |
|
|
@ -6796,6 +6796,10 @@ function IPv6Component |
|
|
|
$PreferIPv4overIPv6 |
|
|
|
) |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
# Extract the localized "Please wait..." string from shell32.dll |
|
|
|
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose |
|
|
|
|
|
|
|
try |
|
|
|
{ |
|
|
|
# Check the internet connection |
|
|
@ -9759,7 +9763,7 @@ function Export-Associations |
|
|
|
if (Test-Path -Path "HKCU:\Software\Classes\$($_.ProgId)\Shell\Open\Command") |
|
|
|
{ |
|
|
|
|
|
|
|
if ([Microsoft.Win32.Registry]::GetValue("HKEY_CURRENT_USER\Software\Classes\$($_.ProgId)\shell\Open\Command", "DelegateExecute", $null)) |
|
|
|
if ([Microsoft.Win32.Registry]::GetValue("HKEY_CURRENT_USER\Software\Classes\$($_.ProgId)\shell\open\command", "DelegateExecute", $null)) |
|
|
|
{ |
|
|
|
$ProgramPath, $Icon = "" |
|
|
|
} |
|
|
@ -9770,7 +9774,7 @@ function Export-Associations |
|
|
|
if (Test-Path -Path "Registry::HKEY_CLASSES_ROOT\$($_.ProgId)") |
|
|
|
{ |
|
|
|
# ProgrammPath |
|
|
|
if ([Microsoft.Win32.Registry]::GetValue("HKEY_CURRENT_USER\Software\Classes\$($_.ProgId)\shell\Open\Command", "", $null)) |
|
|
|
if ([Microsoft.Win32.Registry]::GetValue("HKEY_CURRENT_USER\Software\Classes\$($_.ProgId)\shell\open\command", "", $null)) |
|
|
|
{ |
|
|
|
$PartProgramPath = (Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Classes\$($_.ProgId)\Shell\Open\Command" -Name "(default)").Trim() |
|
|
|
$Program = $PartProgramPath.Substring(0, ($PartProgramPath.IndexOf(".exe") + 4)).Trim('"') |
|
|
@ -9852,7 +9856,7 @@ function Export-Associations |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
elseif ([Microsoft.Win32.Registry]::GetValue("HKEY_CURRENT_USER\Software\Classes\$($_.ProgId)\shell\Open\Command", "", $null)) |
|
|
|
elseif ([Microsoft.Win32.Registry]::GetValue("HKEY_CURRENT_USER\Software\Classes\$($_.ProgId)\shell\open\command", "", $null)) |
|
|
|
{ |
|
|
|
$IconPartPath = (Get-ItemPropertyValue -Path "HKCU:\Software\Classes\$($_.ProgId)\shell\open\command" -Name "(default)").Trim() |
|
|
|
$IconPath = $IconPartPath.Substring(0, $IconPartPath.IndexOf(".exe") + 4).Trim('"') |
|
|
@ -12381,7 +12385,7 @@ function CleanupTask |
|
|
|
# Checking if notifications and Action Center are disabled |
|
|
|
# Due to "Set-StrictMode -Version Latest" we have to use GetValue() |
|
|
|
$UserNotificationCenter = [Microsoft.Win32.Registry]::GetValue("HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer", "DisableNotificationCenter", $null) |
|
|
|
$MachineNotificationCenter = [Microsoft.Win32.Registry]::GetValue("HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Explorer", "DisableNotificationCenter", $false) |
|
|
|
$MachineNotificationCenter = [Microsoft.Win32.Registry]::GetValue("HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Explorer", "DisableNotificationCenter", $null) |
|
|
|
if (($UserNotificationCenter -eq 1) -or ($MachineNotificationCenter -eq 1)) |
|
|
|
{ |
|
|
|
Write-Verbose -Message ($Localization.ActionCenter -f $MyInvocation.Line.Trim()) -Verbose |
|
|
@ -12393,8 +12397,8 @@ function CleanupTask |
|
|
|
|
|
|
|
# Checking if Windows Script Host is disabled |
|
|
|
# Due to "Set-StrictMode -Version Latest" we have to use GetValue() |
|
|
|
$UserScriptHost = [Microsoft.Win32.Registry]::GetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings", "Enabled", $false) |
|
|
|
$MachineScriptHost = [Microsoft.Win32.Registry]::GetValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Script Host\Settings", "Enabled", $false) |
|
|
|
$UserScriptHost = [Microsoft.Win32.Registry]::GetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings", "Enabled", $null) |
|
|
|
$MachineScriptHost = [Microsoft.Win32.Registry]::GetValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Script Host\Settings", "Enabled", $null) |
|
|
|
if (($UserScriptHost -eq 0) -or ($MachineScriptHost -eq 0)) |
|
|
|
{ |
|
|
|
Write-Verbose -Message ($Localization.WindowsScriptHost -f $MyInvocation.Line.Trim()) -Verbose |
|
|
@ -12818,8 +12822,8 @@ function SoftwareDistributionTask |
|
|
|
{ |
|
|
|
# Checking if Windows Script Host is disabled |
|
|
|
# Due to "Set-StrictMode -Version Latest" we have to use GetValue() |
|
|
|
$UserScriptHost = [Microsoft.Win32.Registry]::GetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings", "Enabled", $false) |
|
|
|
$MachineScriptHost = [Microsoft.Win32.Registry]::GetValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Script Host\Settings", "Enabled", $false) |
|
|
|
$UserScriptHost = [Microsoft.Win32.Registry]::GetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings", "Enabled", $null) |
|
|
|
$MachineScriptHost = [Microsoft.Win32.Registry]::GetValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Script Host\Settings", "Enabled", $null) |
|
|
|
if (($UserScriptHost -eq 0) -or ($MachineScriptHost -eq 0)) |
|
|
|
{ |
|
|
|
Write-Verbose -Message ($Localization.WindowsScriptHost -f $MyInvocation.Line.Trim()) -Verbose |
|
|
@ -13122,8 +13126,8 @@ function TempTask |
|
|
|
{ |
|
|
|
# Checking if Windows Script Host is disabled |
|
|
|
# Due to "Set-StrictMode -Version Latest" we have to use GetValue() |
|
|
|
$UserScriptHost = [Microsoft.Win32.Registry]::GetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings", "Enabled", $false) |
|
|
|
$MachineScriptHost = [Microsoft.Win32.Registry]::GetValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Script Host\Settings", "Enabled", $false) |
|
|
|
$UserScriptHost = [Microsoft.Win32.Registry]::GetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings", "Enabled", $null) |
|
|
|
$MachineScriptHost = [Microsoft.Win32.Registry]::GetValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Script Host\Settings", "Enabled", $null) |
|
|
|
if (($UserScriptHost -eq 0) -or ($MachineScriptHost -eq 0)) |
|
|
|
{ |
|
|
|
Write-Verbose -Message ($Localization.WindowsScriptHost -f $MyInvocation.Line.Trim()) -Verbose |
|
|
|