Browse Source

hotfix

pull/514/head 6.5.2
Dmitry Nefedov 1 year ago
parent
commit
fd55424fbb
  1. 27
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  2. 29
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

27
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -180,6 +180,16 @@ public static string GetString(uint strId)
# Detect the OS build version
switch ((Get-CimInstance -ClassName CIM_OperatingSystem).BuildNumber)
{
{$_ -lt 22000}
{
Write-Warning -Message $Localization.UnsupportedOSBuild
Start-Process -FilePath "https://t.me/sophia_chat"
Start-Process -FilePath "https://discord.gg/sSryhaEv79"
Start-Process -FilePath "https://github.com/farag2/Sophia-Script-for-Windows#system-requirements"
exit
}
{$_ -eq 22000}
{
if (Test-Path -Path "$env:LOCALAPPDATA\PCHealthCheck\PCHealthCheck.exe")
@ -277,7 +287,7 @@ public static string GetString(uint strId)
exit
}
{($_ -ge 22621) -and ($_ -le 22624)}
{$_ -eq 22621}
{
if ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -lt 1928)
{
@ -313,16 +323,6 @@ public static string GetString(uint strId)
exit
}
}
{$_ -lt 22000}
{
Write-Warning -Message $Localization.UnsupportedOSBuild
Start-Process -FilePath "https://t.me/sophia_chat"
Start-Process -FilePath "https://discord.gg/sSryhaEv79"
Start-Process -FilePath "https://github.com/farag2/Sophia-Script-for-Windows#system-requirements"
exit
}
}
# Check the language mode
@ -2297,6 +2297,11 @@ function BrowsingHistory
$Show
)
if ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -lt 1928)
{
return
}
switch ($PSCmdlet.ParameterSetName)
{
"Hide"

29
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -176,6 +176,16 @@ public static string GetString(uint strId)
# Detect the OS build version
switch ((Get-CimInstance -ClassName CIM_OperatingSystem).BuildNumber)
{
{$_ -lt 22000}
{
Write-Warning -Message $Localization.UnsupportedOSBuild
Start-Process -FilePath "https://t.me/sophia_chat"
Start-Process -FilePath "https://discord.gg/sSryhaEv79"
Start-Process -FilePath "https://github.com/farag2/Sophia-Script-for-Windows#system-requirements"
exit
}
{$_ -eq 22000}
{
if (Test-Path -Path "$env:LOCALAPPDATA\PCHealthCheck\PCHealthCheck.exe")
@ -273,7 +283,7 @@ public static string GetString(uint strId)
exit
}
{($_ -ge 22621) -and ($_ -le 22624)}
{$_ -eq 22621}
{
if ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -lt 1928)
{
@ -309,16 +319,6 @@ public static string GetString(uint strId)
exit
}
}
{$_ -lt 22000}
{
Write-Warning -Message $Localization.UnsupportedOSBuild
Start-Process -FilePath "https://t.me/sophia_chat"
Start-Process -FilePath "https://discord.gg/sSryhaEv79"
Start-Process -FilePath "https://github.com/farag2/Sophia-Script-for-Windows#system-requirements"
exit
}
}
# Check the language mode
@ -2301,6 +2301,11 @@ function BrowsingHistory
$Show
)
if ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -lt 1928)
{
return
}
switch ($PSCmdlet.ParameterSetName)
{
"Hide"
@ -10906,7 +10911,7 @@ function UninstallUWPApps
$AppxPackages += Get-AppxPackage -Name Disney.37853FC22B2CE -AllUsers:$AllUsers
}
$PackagesIds = [Windows.Management.Deployment.PackageManager, Windows.Web, ContentType = WindowsRuntime]::new().FindPackages() | Select-Object -Property DisplayName -ExpandProperty Id | Select-Object -Property Name, DisplayName
$PackagesIds = [Windows.Management.Deployment.PackageManager]::new().FindPackages() | Select-Object -Property DisplayName -ExpandProperty Id | Select-Object -Property Name, DisplayName
foreach ($AppxPackage in $AppxPackages)
{

Loading…
Cancel
Save