Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
farag2 committed Sep 24, 2023
1 parent 8595c44 commit 52c5312
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -3396,13 +3396,15 @@ 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"
}
"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"
Expand Down Expand Up @@ -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
}
}
}
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3397,13 +3397,15 @@ 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"
}
"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"
Expand Down Expand Up @@ -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
}
}
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 52c5312

Please sign in to comment.