From 08d59aee98fe4a2107526fdaec05ad58c55aa752 Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Thu, 9 Feb 2023 17:22:09 +0300 Subject: [PATCH] regarding #449 --- src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 | 12 ++++++++---- .../Module/Sophia.psm1 | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) 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"