diff --git a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 index 8712b16f..4c4ab6e3 100644 --- a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 @@ -10209,7 +10209,7 @@ function RKNBypass } "Disable" { - Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -Force + Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -Force -ErrorAction Ignore } } } @@ -15482,7 +15482,7 @@ function Errors "$([WinAPI.GetStr]::GetString(4130))" = $ErrorInFile $Localization.ErrorsMessage = $_.Exception.Message } - } | Sort-Object -Property Line | Format-Table -AutoSize -Wrap | Out-String).Trim() + } | Sort-Object -Property $Localization.ErrorsLine | Format-Table -AutoSize -Wrap | Out-String).Trim() } Write-Information -MessageData "" -InformationAction Continue diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 index 6887fd96..cd1abbc0 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 @@ -8507,7 +8507,7 @@ function RKNBypass } "Disable" { - Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -Force + Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -Force -ErrorAction Ignore } } } @@ -11836,7 +11836,7 @@ function Errors "$([WinAPI.GetStr]::GetString(4130))" = $ErrorInFile $Localization.ErrorsMessage = $_.Exception.Message } - } | Sort-Object -Property Line | Format-Table -AutoSize -Wrap | Out-String).Trim() + } | Sort-Object -Property $Localization.ErrorsLine | Format-Table -AutoSize -Wrap | Out-String).Trim() } Write-Information -MessageData "" -InformationAction Continue diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 index 0675b6a8..eb3504d8 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 @@ -9132,7 +9132,7 @@ function RKNBypass } "Disable" { - Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -Force + Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -Force -ErrorAction Ignore } } } @@ -13006,7 +13006,7 @@ function Errors "$([WinAPI.GetStr]::GetString(4130))" = $ErrorInFile $Localization.ErrorsMessage = $_.Exception.Message } - } | Sort-Object -Property Line | Format-Table -AutoSize -Wrap | Out-String).Trim() + } | Sort-Object -Property $Localization.ErrorsLine | Format-Table -AutoSize -Wrap | Out-String).Trim() } Write-Information -MessageData "" -InformationAction Continue diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 index ef013661..944161fd 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 @@ -10213,7 +10213,7 @@ function RKNBypass } "Disable" { - Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -Force + Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -Force -ErrorAction Ignore } } } @@ -15506,7 +15506,7 @@ function Errors "$([WinAPI.GetStr]::GetString(4130))" = $ErrorInFile $Localization.ErrorsMessage = $_.Exception.Message } - } | Sort-Object -Property Line | Format-Table -AutoSize -Wrap | Out-String).Trim() + } | Sort-Object -Property $Localization.ErrorsLine | Format-Table -AutoSize -Wrap | Out-String).Trim() } Write-Information -MessageData "" -InformationAction Continue diff --git a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 index 07583352..6318ee23 100644 --- a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 @@ -3396,6 +3396,7 @@ function TaskbarChat "Hide" { New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name TaskbarMn -PropertyType DWord -Value 0 -Force + # Save string to run it as "NT SERVICE\TrustedInstaller" # Prevent Microsoft Teams from installing for new users $Task = "New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications -Name ConfigureChatAutoInstall -Value 0 -Type Dword -Force" @@ -3403,6 +3404,7 @@ function TaskbarChat "Show" { New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name TaskbarMn -PropertyType DWord -Value 1 -Force + # Save string to run it as "NT SERVICE\TrustedInstaller" # Remove block from installing Microsoft Teams for new users $Task = "Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications -Name ConfigureChatAutoInstall -Value 1 -Type Dword -Force" @@ -9997,7 +9999,7 @@ function RKNBypass } "Disable" { - Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -Force + Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -Force -ErrorAction Ignore } } } @@ -15157,7 +15159,7 @@ function Errors "$([WinAPI.GetStr]::GetString(4130))" = $ErrorInFile $Localization.ErrorsMessage = $_.Exception.Message } - } | Sort-Object -Property Line | Format-Table -AutoSize -Wrap | Out-String).Trim() + } | Sort-Object -Property $Localization.ErrorsLine | Format-Table -AutoSize -Wrap | Out-String).Trim() } Write-Information -MessageData "" -InformationAction Continue diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 index 3f4b5a7d..79f85b43 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 @@ -3397,6 +3397,7 @@ function TaskbarChat "Hide" { New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name TaskbarMn -PropertyType DWord -Value 0 -Force + # Save string to run it as "NT SERVICE\TrustedInstaller" # Prevent Microsoft Teams from installing for new users $Task = "New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications -Name ConfigureChatAutoInstall -Value 0 -Type Dword -Force" @@ -3404,6 +3405,7 @@ function TaskbarChat "Show" { New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name TaskbarMn -PropertyType DWord -Value 1 -Force + # Save string to run it as "NT SERVICE\TrustedInstaller" # Remove block from installing Microsoft Teams for new users $Task = "Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications -Name ConfigureChatAutoInstall -Value 1 -Type Dword -Force" @@ -9998,7 +10000,7 @@ function RKNBypass } "Disable" { - Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -Force + Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL -Force -ErrorAction Ignore } } } @@ -15177,7 +15179,7 @@ function Errors "$([WinAPI.GetStr]::GetString(4130))" = $ErrorInFile $Localization.ErrorsMessage = $_.Exception.Message } - } | Sort-Object -Property Line | Format-Table -AutoSize -Wrap | Out-String).Trim() + } | Sort-Object -Property $Localization.ErrorsLine | Format-Table -AutoSize -Wrap | Out-String).Trim() } Write-Information -MessageData "" -InformationAction Continue