diff --git a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 index 1a78dc6e0..d971f073a 100644 --- a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 @@ -308,7 +308,7 @@ public static string GetString(uint strId) # Check whether Get-WindowsEdition cmdlet is working try { - [void](Get-WindowsEdition -Online) + Get-WindowsEdition -Online } catch [System.Runtime.InteropServices.COMException] { @@ -331,7 +331,7 @@ public static string GetString(uint strId) if ((Get-Service -Name EventLog).Status -eq "Stopped") { # Extract the localized "Event Viewer" string from shell32.dll - Write-Warning -Message ($Localization.WindowsComponentBroken -f $([WinAPI.GetStr]::GetString(22029)) + Write-Warning -Message ($Localization.WindowsComponentBroken -f $([WinAPI.GetStr]::GetString(22029))) Start-Process -FilePath "https://t.me/sophia_chat" Start-Process -FilePath "https://discord.gg/sSryhaEv79" diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 index 2f453f8b7..6584e0244 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 @@ -219,7 +219,7 @@ public static string GetString(uint strId) # Check whether Get-WindowsEdition cmdlet is working try { - [void](Get-WindowsEdition -Online) + Get-WindowsEdition -Online } catch [System.Runtime.InteropServices.COMException] { @@ -231,7 +231,7 @@ public static string GetString(uint strId) if ((Get-Service -Name EventLog).Status -eq "Stopped") { # Extract the localized "Event Viewer" string from shell32.dll - Write-Warning -Message ($Localization.WindowsComponentBroken -f $([WinAPI.GetStr]::GetString(22029)) + Write-Warning -Message ($Localization.WindowsComponentBroken -f $([WinAPI.GetStr]::GetString(22029))) Start-Process -FilePath "https://t.me/sophia_chat" Start-Process -FilePath "https://discord.gg/sSryhaEv79" diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 index 77355bed7..a3e603b88 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 @@ -219,7 +219,7 @@ public static string GetString(uint strId) # Check whether Get-WindowsEdition cmdlet is working try { - [void](Get-WindowsEdition -Online) + Get-WindowsEdition -Online } catch [System.Runtime.InteropServices.COMException] { @@ -231,7 +231,7 @@ public static string GetString(uint strId) if ((Get-Service -Name EventLog).Status -eq "Stopped") { # Extract the localized "Event Viewer" string from shell32.dll - Write-Warning -Message ($Localization.WindowsComponentBroken -f $([WinAPI.GetStr]::GetString(22029)) + Write-Warning -Message ($Localization.WindowsComponentBroken -f $([WinAPI.GetStr]::GetString(22029))) Start-Process -FilePath "https://t.me/sophia_chat" Start-Process -FilePath "https://discord.gg/sSryhaEv79" diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 index 9150a43a0..eeb6bdff8 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 @@ -304,7 +304,7 @@ public static string GetString(uint strId) # Check whether Get-WindowsEdition cmdlet is working try { - [void](Get-WindowsEdition -Online) + Get-WindowsEdition -Online } catch [System.Runtime.InteropServices.COMException] { @@ -327,7 +327,7 @@ public static string GetString(uint strId) if ((Get-Service -Name EventLog).Status -eq "Stopped") { # Extract the localized "Event Viewer" string from shell32.dll - Write-Warning -Message ($Localization.WindowsComponentBroken -f $([WinAPI.GetStr]::GetString(22029)) + Write-Warning -Message ($Localization.WindowsComponentBroken -f $([WinAPI.GetStr]::GetString(22029))) Start-Process -FilePath "https://t.me/sophia_chat" Start-Process -FilePath "https://discord.gg/sSryhaEv79" diff --git a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 index ca5fcd5e9..183a8b143 100644 --- a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 @@ -296,7 +296,7 @@ public static string GetString(uint strId) # Check whether Get-WindowsEdition cmdlet is working try { - [void](Get-WindowsEdition -Online) + Get-WindowsEdition -Online } catch [System.Runtime.InteropServices.COMException] { @@ -319,7 +319,7 @@ public static string GetString(uint strId) if ((Get-Service -Name EventLog).Status -eq "Stopped") { # Extract the localized "Event Viewer" string from shell32.dll - Write-Warning -Message ($Localization.WindowsComponentBroken -f $([WinAPI.GetStr]::GetString(22029)) + Write-Warning -Message ($Localization.WindowsComponentBroken -f $([WinAPI.GetStr]::GetString(22029))) Start-Process -FilePath "https://t.me/sophia_chat" Start-Process -FilePath "https://discord.gg/sSryhaEv79" 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 707b4fcd1..d84b8b011 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 @@ -292,7 +292,7 @@ public static string GetString(uint strId) # Check whether Get-WindowsEdition cmdlet is working try { - [void](Get-WindowsEdition -Online) + Get-WindowsEdition -Online } catch [System.Runtime.InteropServices.COMException] { @@ -315,7 +315,7 @@ public static string GetString(uint strId) if ((Get-Service -Name EventLog).Status -eq "Stopped") { # Extract the localized "Event Viewer" string from shell32.dll - Write-Warning -Message ($Localization.WindowsComponentBroken -f $([WinAPI.GetStr]::GetString(22029)) + Write-Warning -Message ($Localization.WindowsComponentBroken -f $([WinAPI.GetStr]::GetString(22029))) Start-Process -FilePath "https://t.me/sophia_chat" Start-Process -FilePath "https://discord.gg/sSryhaEv79"