diff --git a/Download_Latest_Sophia.ps1 b/Download_Latest_Sophia.ps1 index b0b5b4ba..3c35f3df 100644 --- a/Download_Latest_Sophia.ps1 +++ b/Download_Latest_Sophia.ps1 @@ -1,6 +1,6 @@ <# .SYNOPSIS - Download the latest Sophia Script version from the last commit available, depending on what Windows or PowerShell versions are used to + Download the latest Sophia Script version from the last commit available, depending on which Windows or PowerShell versions are used to .SYNOPSIS For example, if you start script on Windows 11 via PowerShell 5.1 you will start downloading Sophia Script for Windows 11 PowerShell 5.1 @@ -8,6 +8,7 @@ .EXAMPLE iwr sl.sophia.team -useb | iex #> +Clear-Host [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 @@ -37,6 +38,7 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber) if ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName) -match "LTSC 2019") { $Version = "Sophia_Script_for_Windows_10_LTSC_2019" + $Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 LTSC 2019 | Latest | Made with $([System.Char]::ConvertFromUtf32(0x1F497)) of Windows | $([System.Char]0x00A9) farag, Inestic & lowl1f3, 2014$([System.Char]0x2013)2024" } else { @@ -61,6 +63,7 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber) if ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName) -match "LTSC 2021") { $Version = "Sophia_Script_for_Windows_10_LTSC_2021" + $Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 LTSC 2021 | Latest | Made with $([System.Char]::ConvertFromUtf32(0x1F497)) of Windows | $([System.Char]0x00A9) farag, Inestic & lowl1f3, 2014$([System.Char]0x2013)2024" } else { @@ -84,10 +87,12 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber) if ($Host.Version.Major -eq 5) { $Version = "Sophia_Script_for_Windows_10" + $Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 | Latest | Made with $([System.Char]::ConvertFromUtf32(0x1F497)) of Windows | $([System.Char]0x00A9) farag, Inestic & lowl1f3, 2014$([System.Char]0x2013)2024" } else { $Version = "Sophia_Script_for_Windows_10_PowerShell_7" + $Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 PowerShell 7 | Latest | Made with $([System.Char]::ConvertFromUtf32(0x1F497)) of Windows | $([System.Char]0x00A9) farag, Inestic & lowl1f3, 2014$([System.Char]0x2013)2024" } } {$_ -ge 22631} @@ -98,15 +103,18 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber) if ($Host.Version.Major -eq 5) { $Version = "Sophia_Script_for_Windows_11" + $Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 | Latest | Made with $([System.Char]::ConvertFromUtf32(0x1F497)) of Windows | $([System.Char]0x00A9) farag, Inestic & lowl1f3, 2014$([System.Char]0x2013)2024" } else { $Version = "Sophia_Script_for_Windows_11_PowerShell_7" + $Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 PowerShell 7 | Latest | Made with $([System.Char]::ConvertFromUtf32(0x1F497)) of Windows | $([System.Char]0x00A9) farag, Inestic & lowl1f3, 2014$([System.Char]0x2013)2024" } } else { $Version = "Sophia_Script_for_Windows_11_LTSC_2024" + $Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 LTSC 2024 | Latest | Made with $([System.Char]::ConvertFromUtf32(0x1F497)) of Windows | $([System.Char]0x00A9) farag, Inestic & lowl1f3, 2014$([System.Char]0x2013)2024" } } } diff --git a/Download_Sophia.ps1 b/Download_Sophia.ps1 index f8a063c8..1c95a850 100644 --- a/Download_Sophia.ps1 +++ b/Download_Sophia.ps1 @@ -1,6 +1,6 @@ <# .SYNOPSIS - Download and expand latest Sophia Script version, depending on what Windows or PowerShell versions are used to + Download and expand the latest Sophia Script version, depending on which Windows or PowerShell versions are used to .SYNOPSIS For example, if you start script on Windows 11 via PowerShell 5.1 you will start downloading Sophia Script for Windows 11 PowerShell 5.1 @@ -8,6 +8,7 @@ .EXAMPLE iwr script.sophia.team -useb | iex #> +Clear-Host [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 @@ -32,7 +33,7 @@ $Parameters = @{ Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json" UseBasicParsing = $true } -$JSONVersions = Invoke-WebRequest @Parameters +$JSONVersions = Invoke-RestMethod @Parameters switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber) { diff --git a/sophia_script_versions.json b/sophia_script_versions.json index 3c724dd4..2281ce7e 100644 --- a/sophia_script_versions.json +++ b/sophia_script_versions.json @@ -3,7 +3,7 @@ "Sophia_Script_Windows_10_PowerShell_7": "5.19.3", "Sophia_Script_Windows_10_LTSC2019": "5.9.3", "Sophia_Script_Windows_10_LTSC2021": "5.19.3", - "Sophia_Script_Windows_11_PowerShell_5_1": "6.7.23", + "Sophia_Script_Windows_11_PowerShell_5_1": "6.7.3", "Sophia_Script_Windows_11_LTSC2024": "6.7.3", "Sophia_Script_Windows_11_PowerShell_7": "6.7.3", "Sophia_Script_Wrapper": "2.7.5" diff --git a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 index b94ad8a3..6776a25c 100644 --- a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 @@ -2737,7 +2737,7 @@ function SnapAssist $Enable ) - New-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name WindowArrangementActive -PropertyType DWord -Value 0 -Force + New-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name WindowArrangementActive -PropertyType DWord -Value 1 -Force switch ($PSCmdlet.ParameterSetName) { diff --git a/src/Sophia_Script_for_Windows_10/Sophia.ps1 b/src/Sophia_Script_for_Windows_10/Sophia.ps1 index 8043e357..83b262a5 100644 --- a/src/Sophia_Script_for_Windows_10/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_10/Sophia.ps1 @@ -21,7 +21,7 @@ .\Sophia.ps1 -Functions "DiagTrackService -Disable", "DiagnosticDataLevel -Minimal", UninstallUWPApps .EXAMPLE Download and expand the latest Sophia Script version archive (without running) according which Windows and PowerShell versions it is run on - irm script.sophi.app -useb | iex + iwr script.sophia.team -useb | iex .NOTES Supported Windows 10 versions @@ -32,7 +32,7 @@ .NOTES To use the TAB completion for functions and their arguments dot source the Functions.ps1 script first: . .\Function.ps1 (with a dot at the beginning) - Read more in the Functions.ps1 file + Read more at https://github.com/farag2/Sophia-Script-for-Windows?tab=readme-ov-file#how-to-run-the-specific-functions .LINK GitHub https://github.com/farag2/Sophia-Script-for-Windows 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 28bd04af..2ceef44f 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 @@ -2193,7 +2193,7 @@ function SnapAssist $Enable ) - New-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name WindowArrangementActive -PropertyType DWord -Value 0 -Force + New-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name WindowArrangementActive -PropertyType DWord -Value 1 -Force switch ($PSCmdlet.ParameterSetName) { diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1 index 8ebd316c..5b9ace65 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1 @@ -21,7 +21,7 @@ .\Sophia.ps1 -Functions "DiagTrackService -Disable", "DiagnosticDataLevel -Minimal" .EXAMPLE Download and expand the latest Sophia Script version archive (without running) according which Windows and PowerShell versions it is run on - irm script.sophi.app -useb | iex + iwr script.sophia.team -useb | iex .NOTES Supported Windows 10 Enterprise LTSC 2019 @@ -30,7 +30,7 @@ .NOTES To use the TAB completion for functions and their arguments dot source the Functions.ps1 script first: . .\Function.ps1 (with a dot at the beginning) - Read more in the Functions.ps1 file + Read more at https://github.com/farag2/Sophia-Script-for-Windows?tab=readme-ov-file#how-to-run-the-specific-functions .LINK GitHub https://github.com/farag2/Sophia-Script-for-Windows 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 06bf7c63..02a365d4 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 @@ -2413,7 +2413,7 @@ function SnapAssist $Enable ) - New-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name WindowArrangementActive -PropertyType DWord -Value 0 -Force + New-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name WindowArrangementActive -PropertyType DWord -Value 1 -Force switch ($PSCmdlet.ParameterSetName) { diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1 index 75685e2b..8b1ea4ee 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1 @@ -21,7 +21,7 @@ .\Sophia.ps1 -Functions "DiagTrackService -Disable", "DiagnosticDataLevel -Minimal" .EXAMPLE Download and expand the latest Sophia Script version archive (without running) according which Windows and PowerShell versions it is run on - irm script.sophi.app -useb | iex + iwr script.sophia.team -useb | iex .NOTES Supported Windows 10 Enterprise LTSC 2021 @@ -30,7 +30,7 @@ .NOTES To use the TAB completion for functions and their arguments dot source the Functions.ps1 script first: . .\Function.ps1 (with a dot at the beginning) - Read more in the Functions.ps1 file + Read more at https://github.com/farag2/Sophia-Script-for-Windows?tab=readme-ov-file#how-to-run-the-specific-functions .LINK GitHub https://github.com/farag2/Sophia-Script-for-Windows 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 59e5df83..23f20250 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 @@ -2755,7 +2755,7 @@ function SnapAssist $Enable ) - New-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name WindowArrangementActive -PropertyType DWord -Value 0 -Force + New-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name WindowArrangementActive -PropertyType DWord -Value 1 -Force switch ($PSCmdlet.ParameterSetName) { diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1 index 9132a94a..f588751b 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1 @@ -21,7 +21,7 @@ .\Sophia.ps1 -Functions "DiagTrackService -Disable", "DiagnosticDataLevel -Minimal", UninstallUWPApps .EXAMPLE Download and expand the latest Sophia Script version archive (without running) according which Windows and PowerShell versions it is run on - irm script.sophi.app -useb | iex + iwr script.sophia.team -useb | iex .NOTES Supported Windows 10 versions @@ -32,7 +32,7 @@ .NOTES To use the TAB completion for functions and their arguments dot source the Functions.ps1 script first: . .\Function.ps1 (with a dot at the beginning) - Read more in the Functions.ps1 file + Read more at https://github.com/farag2/Sophia-Script-for-Windows?tab=readme-ov-file#how-to-run-the-specific-functions .LINK GitHub https://github.com/farag2/Sophia-Script-for-Windows diff --git a/src/Sophia_Script_for_Windows_11/Localizations/en-US/Sophia.psd1 b/src/Sophia_Script_for_Windows_11/Localizations/en-US/Sophia.psd1 index 35cbd19b..72fe4b8c 100644 --- a/src/Sophia_Script_for_Windows_11/Localizations/en-US/Sophia.psd1 +++ b/src/Sophia_Script_for_Windows_11/Localizations/en-US/Sophia.psd1 @@ -9,7 +9,7 @@ Win10TweakerWarning = Windows has been infected with a tro TweakerWarning = The Windows stability may have been compromised by using {0}. Reinstall Windows using only a genuine ISO image.\nhttps://www.microsoft.com/software-download/windows11 Bin = There are no files in the bin folder. Please, re-download the archive. RebootPending = The PC is waiting to be restarted. -UnsupportedRelease = A new version found. +UnsupportedRelease = A new script version found. Please use only latest Sophia Script. KeyboardArrows = Please use the arrow keys {0} and {1} on your keyboard to select your answer CustomizationWarning = Have you customized every function in the {0} preset file before running Sophia Script? WindowsComponentBroken = {0} broken or removed from Windows. diff --git a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 index ac82d6cf..29ec468d 100644 --- a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 @@ -2819,7 +2819,7 @@ function SnapAssist $Enable ) - New-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name WindowArrangementActive -PropertyType DWord -Value 0 -Force + New-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name WindowArrangementActive -PropertyType DWord -Value 1 -Force switch ($PSCmdlet.ParameterSetName) { @@ -5555,15 +5555,15 @@ function WindowsFeatures { "Enable" { - $State = @("Disabled", "DisablePending") - $ButtonContent = $Localization.Enable + $State = @("Disabled", "DisablePending") + $ButtonContent = $Localization.Enable $ButtonAdd_Click = {EnableButton} } "Disable" { - $State = @("Enabled", "EnablePending") - $ButtonContent = $Localization.Disable - $ButtonAdd_Click = {DisableButton} + $State = @("Enabled", "EnablePending") + $ButtonContent = $Localization.Disable + $ButtonAdd_Click = {DisableButton} ### } } diff --git a/src/Sophia_Script_for_Windows_11/Sophia.ps1 b/src/Sophia_Script_for_Windows_11/Sophia.ps1 index 922e450a..3793bbdd 100644 --- a/src/Sophia_Script_for_Windows_11/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_11/Sophia.ps1 @@ -21,7 +21,7 @@ .\Sophia.ps1 -Functions "DiagTrackService -Disable", "DiagnosticDataLevel -Minimal", UninstallUWPApps .EXAMPLE Download and expand the latest Sophia Script version archive (without running) according which Windows and PowerShell versions it is run on - irm script.sophi.app -useb | iex + iwr script.sophia.team -useb | iex .NOTES Supported Windows 11 versions @@ -31,7 +31,7 @@ .NOTES To use the TAB completion for functions and their arguments dot source the Functions.ps1 script first: . .\Function.ps1 (with a dot at the beginning) - Read more in the Functions.ps1 file + Read more at https://github.com/farag2/Sophia-Script-for-Windows?tab=readme-ov-file#how-to-run-the-specific-functions .LINK GitHub https://github.com/farag2/Sophia-Script-for-Windows diff --git a/src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1 index 059e7e32..31a3521f 100644 --- a/src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1 @@ -2790,7 +2790,7 @@ function SnapAssist $Enable ) - New-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name WindowArrangementActive -PropertyType DWord -Value 0 -Force + New-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name WindowArrangementActive -PropertyType DWord -Value 1 -Force switch ($PSCmdlet.ParameterSetName) { diff --git a/src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1 b/src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1 index 5b1549e9..a523b139 100644 --- a/src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_11_LTSC_2024/Sophia.ps1 @@ -21,7 +21,7 @@ .\Sophia.ps1 -Functions "DiagTrackService -Disable", "DiagnosticDataLevel -Minimal", UninstallUWPApps .EXAMPLE Download and expand the latest Sophia Script version archive (without running) according which Windows and PowerShell versions it is run on - irm script.sophi.app -useb | iex + iwr script.sophia.team -useb | iex .NOTES Supported Windows 11 Enterprise LTSC 2024 @@ -29,7 +29,7 @@ .NOTES To use the TAB completion for functions and their arguments dot source the Functions.ps1 script first: . .\Function.ps1 (with a dot at the beginning) - Read more in the Functions.ps1 file + Read more at https://github.com/farag2/Sophia-Script-for-Windows?tab=readme-ov-file#how-to-run-the-specific-functions .LINK GitHub https://github.com/farag2/Sophia-Script-for-Windows 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 b3c3213c..9d0b1d5c 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 @@ -2837,7 +2837,7 @@ function SnapAssist $Enable ) - New-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name WindowArrangementActive -PropertyType DWord -Value 0 -Force + New-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name WindowArrangementActive -PropertyType DWord -Value 1 -Force switch ($PSCmdlet.ParameterSetName) { diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1 index f50e33ab..4356f916 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1 @@ -21,7 +21,7 @@ .\Sophia.ps1 -Functions "DiagTrackService -Disable", "DiagnosticDataLevel -Minimal", UninstallUWPApps .EXAMPLE Download and expand the latest Sophia Script version archive (without running) according which Windows and PowerShell versions it is run on - irm script.sophi.app -useb | iex + iwr script.sophia.team -useb | iex .NOTES Supported Windows 11 versions @@ -31,7 +31,7 @@ .NOTES To use the TAB completion for functions and their arguments dot source the Functions.ps1 script first: . .\Function.ps1 (with a dot at the beginning) - Read more in the Functions.ps1 file + Read more at https://github.com/farag2/Sophia-Script-for-Windows?tab=readme-ov-file#how-to-run-the-specific-functions .LINK GitHub https://github.com/farag2/Sophia-Script-for-Windows