|
|
|
@ -925,7 +925,7 @@ public extern static string BrandingFormatString(string sFormat); |
|
|
|
$Windows_Long_Second_Item = $Windows_Long.split(" ")[1] |
|
|
|
# Windows 11 |
|
|
|
$Windows_Long = ($Windows_Long_First_Item, $Windows_Long_Second_Item) -join " " |
|
|
|
# 24H2 |
|
|
|
# e.g. 24H2 |
|
|
|
$DisplayVersion = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name DisplayVersion |
|
|
|
|
|
|
|
Write-Warning -Message ($Localization.UnsupportedOSBuild -f $Windows_Long, $DisplayVersion) |
|
|
|
@ -979,7 +979,17 @@ public extern static string BrandingFormatString(string sFormat); |
|
|
|
{$_ -lt 26100} |
|
|
|
{ |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Warning -Message ($Localization.UnsupportedOSBuild -f [WinAPI.Winbrand]::BrandingFormatString("%WINDOWS_LONG%")) |
|
|
|
|
|
|
|
# Windows 11 Pro |
|
|
|
$Windows_Long = [WinAPI.Winbrand]::BrandingFormatString("%WINDOWS_LONG%") |
|
|
|
$Windows_Long_First_Item = $Windows_Long.split(" ")[0] |
|
|
|
$Windows_Long_Second_Item = $Windows_Long.split(" ")[1] |
|
|
|
# Windows 11 |
|
|
|
$Windows_Long = ($Windows_Long_First_Item, $Windows_Long_Second_Item) -join " " |
|
|
|
# e.g. 24H2 |
|
|
|
$DisplayVersion = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name DisplayVersion |
|
|
|
|
|
|
|
Write-Warning -Message ($Localization.UnsupportedOSBuild -f $Windows_Long, $DisplayVersion) |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
|
|
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose |
|
|
|
@ -1099,7 +1109,7 @@ public extern static string BrandingFormatString(string sFormat); |
|
|
|
if ($Warning) |
|
|
|
{ |
|
|
|
# Get the name of a preset (e.g Sophia.ps1) regardless it was named |
|
|
|
# $_.File has no EndsWith() method |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
[string]$PresetName = ((Get-PSCallStack).Position | Where-Object -FilterScript {$_.File}).File | Where-Object -FilterScript {$_.EndsWith(".ps1")} |
|
|
|
Write-Verbose -Message ($Localization.CustomizationWarning -f "`"$PresetName`"") -Verbose |
|
|
|
|
|
|
|
@ -1307,6 +1317,7 @@ function DiagTrackService |
|
|
|
if (-not ("WinAPI.GetStrings" -as [type])) |
|
|
|
{ |
|
|
|
# Get the name of a preset (e.g Sophia.ps1) regardless it was named |
|
|
|
# $_.File has no EndsWith() method |
|
|
|
$PresetName = Split-Path -Path (((Get-PSCallStack).Position | Where-Object -FilterScript {$_.File}).File | Where-Object -FilterScript {$_.EndsWith(".ps1")}) -Leaf |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|