diff --git a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 index cca87d59..ddb0530b 100644 --- a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 @@ -64,8 +64,10 @@ function Checks { # Check whether the OS minor build version is 1335 minimum # https://docs.microsoft.com/en-us/windows/release-health/windows11-release-information - $Version = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR - Write-Warning -Message ($Localization.UpdateWarning -f $Version.CurrentBuild, $Version) + $CurrentBuild = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name CurrentBuild + $UBR = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR + + Write-Warning -Message ($Localization.UpdateWarning -f $CurrentBuild.CurrentBuild, $UBR.UBR) Start-Process -FilePath "https://t.me/sophia_chat" @@ -97,8 +99,10 @@ function Checks { # Check whether the OS minor build version is 1335 minimum # https://docs.microsoft.com/en-us/windows/release-health/windows11-release-information - $Version = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR - Write-Warning -Message ($Localization.UpdateWarning -f $Version.CurrentBuild, $Version) + $CurrentBuild = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name CurrentBuild + $UBR = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR + + Write-Warning -Message ($Localization.UpdateWarning -f $CurrentBuild.CurrentBuild, $UBR.UBR) Start-Process -FilePath "https://t.me/sophia_chat" 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 ae18183e..a10f208c 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 @@ -64,8 +64,10 @@ function Checks { # Check whether the OS minor build version is 1335 minimum # https://docs.microsoft.com/en-us/windows/release-health/windows11-release-information - $Version = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR - Write-Warning -Message ($Localization.UpdateWarning -f $Version.CurrentBuild, $Version) + $CurrentBuild = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name CurrentBuild + $UBR = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR + + Write-Warning -Message ($Localization.UpdateWarning -f $CurrentBuild.CurrentBuild, $UBR.UBR) Start-Process -FilePath "https://t.me/sophia_chat" @@ -97,8 +99,10 @@ function Checks { # Check whether the OS minor build version is 1335 minimum # https://docs.microsoft.com/en-us/windows/release-health/windows11-release-information - $Version = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR - Write-Warning -Message ($Localization.UpdateWarning -f $Version.CurrentBuild, $Version) + $CurrentBuild = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name CurrentBuild + $UBR = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR + + Write-Warning -Message ($Localization.UpdateWarning -f $CurrentBuild.CurrentBuild, $UBR.UBR) Start-Process -FilePath "https://t.me/sophia_chat"