From d9ad699b53f137bc0e5d9e59638092260144121f Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Sun, 24 Nov 2024 23:18:55 +0300 Subject: [PATCH] Added script to download latest version from the last commit --- Download_Latest_Sophia.ps1 | 326 ++++++++++++++++++ Download_Sophia.ps1 | 20 +- Scripts/Dependencies.ps1 | 1 + .../Module/Sophia.psm1 | 2 + .../Module/Sophia.psm1 | 2 + .../Module/Sophia.psm1 | 2 + .../Module/Sophia.psm1 | 2 + .../Module/Sophia.psm1 | 2 + .../Module/Sophia.psm1 | 2 + .../Module/Sophia.psm1 | 2 + 10 files changed, 353 insertions(+), 8 deletions(-) create mode 100644 Download_Latest_Sophia.ps1 diff --git a/Download_Latest_Sophia.ps1 b/Download_Latest_Sophia.ps1 new file mode 100644 index 00000000..18864946 --- /dev/null +++ b/Download_Latest_Sophia.ps1 @@ -0,0 +1,326 @@ +<# + .SYNOPSIS + Download the latest Sophia Script version, depending on what Windows or PowerShell versions are used to + + .SYNOPSIS + Download the latest Sophia Script version, depending on what Windows or PowerShell versions are used to + E.g., if you start script on Windows 11 via PowerShell 5.1 you will start downloading Sophia Script for Windows 11 PowerShell 5.1 + + .EXAMPLE Download and expand Sophia Script archive + iwr sl.sophia.team -useb | iex +#> + +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + +Remove-Variable * -ErrorAction Ignore + +if ($Host.Version.Major -eq 5) +{ + # Progress bar can significantly impact cmdlet performance + # https://github.com/PowerShell/PowerShell/issues/2138 + $Script:ProgressPreference = "SilentlyContinue" +} + +$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}" +$Parameters = @{ + Uri = "https://github.com/farag2/Sophia-Script-for-Windows/archive/refs/heads/master.zip" + OutFile = "$DownloadsFolder\master.zip" + UseBasicParsing = $true + Verbose = $true +} +Invoke-RestMethod @Parameters + +switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber) +{ + "17763" + { + # Check for Windows 10 LTSC 2019 + if ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName) -match "LTSC 2019") + { + $Version = "Sophia_Script_for_Windows_10_LTSC_2019" + } + else + { + Write-Verbose -Message "Windows version is not supported. Update your Windows" -Verbose + + # Receive updates for other Microsoft products when you update Windows + (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + + # Check for updates + Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan + + # Open the "Windows Update" page + Start-Process -FilePath "ms-settings:windowsupdate" + + pause + exit + } + } + "19044" + { + # Check for Windows 10 LTSC 2021 + if ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName) -match "LTSC 2021") + { + $Version = "Sophia_Script_for_Windows_10_LTSC_2021" + } + else + { + Write-Verbose -Message "Windows version is not supported. Update your Windows" -Verbose + + # Receive updates for other Microsoft products when you update Windows + (New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") + + # Check for updates + Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan + + # Open the "Windows Update" page + Start-Process -FilePath "ms-settings:windowsupdate" + + pause + exit + } + } + "19045" + { + if ($Host.Version.Major -eq 5) + { + $Version = "Sophia_Script_for_Windows_10" + } + else + { + $Version = "Sophia_Script_for_Windows_10_PowerShell_7" + } + } + {$_ -ge 22631} + { + # Check for Windows 11 LTSC 2024 + if ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName) -notmatch "LTSC 2024") + { + if ($Host.Version.Major -eq 5) + { + $Version = "Sophia_Script_for_Windows_11" + } + else + { + $Version = "Sophia_Script_for_Windows_11_PowerShell_7" + } + } + else + { + $Version = "Sophia_Script_for_Windows_11_LTSC_2024" + } + } +} +Invoke-WebRequest @Parameters + +if (-not (Test-Path -Path "$DownloadsFolder\SophiaScriptTemp")) +{ + New-Item -Path "$DownloadsFolder\SophiaScriptTemp" -ItemType Directory -Force +} +else +{ + Remove-Item -Path "$DownloadsFolder\SophiaScriptTemp" -Force -Recurse + + if ((Get-ChildItem -Path "$DownloadsFolder\SophiaScriptTemp" -ErrorAction Ignore | Measure-Object).Count -ne 0) + { + Write-Verbose -Message "Some files in `"$DownloadsFolder\SophiaScriptTemp`" folder are in use. Please remove them manually and try to use script again." -Verbose + + pause + exit + } +} + +if (Test-Path -Path "$DownloadsFolder\$($Version)_Latest") +{ + Remove-Item -Path "$DownloadsFolder\$($Version)_Latest" -Recurse -Force -ErrorAction Ignore + + if ((Get-ChildItem -Path "$DownloadsFolder\$($Version)_Latest" -ErrorAction Ignore | Measure-Object).Count -ne 0) + { + Write-Verbose -Message "Some files in `"$DownloadsFolder\$($Version)_Latest`" folder are in use. Please remove `"$DownloadsFolder\$($Version)_Latest`" manually and try to use script again." -Verbose + + pause + exit + } +} + +& "$env:SystemRoot\System32\tar.exe" -C "$DownloadsFolder\SophiaScriptTemp" -xf "$DownloadsFolder\master.zip" "Sophia-Script-for-Windows-master/src/$Version" + +New-Item -Path "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin" -ItemType Directory -Force + +# Download LGPO +# https://techcommunity.microsoft.com/t5/microsoft-security-baselines/lgpo-exe-local-group-policy-object-utility-v1-0/ba-p/701045 +$Parameters = @{ + Uri = "https://download.microsoft.com/download/8/5/C/85C25433-A1B0-4FFA-9429-7E023E7DA8D8/LGPO.zip" + OutFile = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin\LGPO.zip" + UseBasicParsing = $true + Verbose = $true +} +Invoke-WebRequest @Parameters + +$Parameters = @{ + Path = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin\LGPO.zip" + DestinationPath = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin" + Force = $true + Verbose = $true +} +Expand-Archive @Parameters + +$Parameters = @{ + Path = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin\LGPO_30\LGPO.exe" + Destination = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin\LGPO.exe" + Force = $true +} +Move-Item @Parameters + +if ($Version -match "PowerShell_7") +{ + # Download Microsoft.Windows.SDK.NET.dll & WinRT.Runtime.dll + # https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref + $Parameters = @{ + Uri = "https://www.nuget.org/api/v2/package/Microsoft.Windows.SDK.NET.Ref" + OutFile = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin\microsoft.windows.sdk.net.ref.zip" + UseBasicParsing = $true + } + Invoke-RestMethod @Parameters + + # Extract Microsoft.Windows.SDK.NET.dll & WinRT.Runtime.dll from archive + Add-Type -Assembly System.IO.Compression.FileSystem + $ZIP = [IO.Compression.ZipFile]::OpenRead("$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin\microsoft.windows.sdk.net.ref.zip") + $Entries = $ZIP.Entries | Where-Object -FilterScript {($_.FullName -eq "lib/net8.0/Microsoft.Windows.SDK.NET.dll") -or ($_.FullName -eq "lib/net8.0/WinRT.Runtime.dll")} + $Entries | ForEach-Object -Process {[IO.Compression.ZipFileExtensions]::ExtractToFile($_, "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin\$($_.Name)", $true)} + $ZIP.Dispose() + + Remove-Item -Path "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version\bin\microsoft.windows.sdk.net.ref.zip" -Recurse -Force +} + +$Parameters = @{ + Path = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$Version" + NewName = "$($Version)_Latest" + Force = $true +} +Rename-Item @Parameters + +$Parameters = @{ + Path = "$DownloadsFolder\SophiaScriptTemp\Sophia-Script-for-Windows-master\src\$($Version)_Latest" + Destination = "$DownloadsFolder" + Force = $true +} +Move-Item @Parameters + +$Path = @( + "$DownloadsFolder\SophiaScriptTemp", + "$DownloadsFolder\$($Version)_Latest\bin\LGPO_30", + "$DownloadsFolder\$($Version)_Latest\bin\LGPO.zip", + "$DownloadsFolder\master.zip" +) +Remove-Item -Path $Path -Recurse -Force + +switch ($Version) +{ + "Sophia_Script_for_Windows_10_LTSC_2019" + { + Invoke-Item -Path "$DownloadsFolder\Sophia_Script_for_Windows_10_LTSC_2019" + + if ((([System.Security.Principal.WindowsIdentity]::GetCurrent()).Owner -eq "S-1-5-32-544")) + { + Set-Location -Path "$DownloadsFolder\Sophia_Script_for_Windows_10_LTSC_2019_Latest" + } + } + "Sophia_Script_for_Windows_10_LTSC_2021" + { + Invoke-Item -Path "$DownloadsFolder\Sophia_Script_for_Windows_10_LTSC_2021_Latest" + + if ((([System.Security.Principal.WindowsIdentity]::GetCurrent()).Owner -eq "S-1-5-32-544")) + { + Set-Location -Path "$DownloadsFolder\Sophia_Script_for_Windows_10_LTSC_2021_Latest" + } + } + "Sophia_Script_for_Windows_11_LTSC_2024" + { + Invoke-Item -Path "$DownloadsFolder\Sophia_Script_for_Windows_11_LTSC_2024_Latest" + + if ((([System.Security.Principal.WindowsIdentity]::GetCurrent()).Owner -eq "S-1-5-32-544")) + { + Set-Location -Path "$DownloadsFolder\Sophia_Script_for_Windows_11_LTSC_2024_Latest" + } + } + "Sophia_Script_for_Windows_10" + { + Invoke-Item -Path "$DownloadsFolder\Sophia_Script_for_Windows_10_Latest" + + if ((([System.Security.Principal.WindowsIdentity]::GetCurrent()).Owner -eq "S-1-5-32-544")) + { + Set-Location -Path "$DownloadsFolder\Sophia_Script_for_Windows_10_Latest" + } + } + "Sophia_Script_for_Windows_10_PowerShell_7" + { + Invoke-Item -Path "$DownloadsFolder\Sophia_Script_for_Windows_10_PowerShell_7_Latest" + + if ((([System.Security.Principal.WindowsIdentity]::GetCurrent()).Owner -eq "S-1-5-32-544")) + { + Set-Location -Path "$DownloadsFolder\Sophia_Script_for_Windows_10_PowerShell_7_Latest" + } + } + "Sophia_Script_for_Windows_11" + { + Invoke-Item -Path "$DownloadsFolder\Sophia_Script_for_Windows_11_Latest" + + if ((([System.Security.Principal.WindowsIdentity]::GetCurrent()).Owner -eq "S-1-5-32-544")) + { + Set-Location -Path "$DownloadsFolder\Sophia_Script_for_Windows_11_Latest" + } + + return + } + "Sophia_Script_for_Windows_11_PowerShell_7" + { + Invoke-Item -Path "$DownloadsFolder\Sophia_Script_for_Windows_11_PowerShell_7_Latest" + + if ((([System.Security.Principal.WindowsIdentity]::GetCurrent()).Owner -eq "S-1-5-32-544")) + { + Set-Location -Path "$DownloadsFolder\Sophia_Script_for_Windows_11_PowerShell_7_Latest" + } + } +} + +# https://github.com/PowerShell/PowerShell/issues/21070 +$CompilerParameters = [System.CodeDom.Compiler.CompilerParameters]::new("System.dll") +$CompilerParameters.TempFiles = [System.CodeDom.Compiler.TempFileCollection]::new($env:TEMP, $false) +$CompilerParameters.GenerateInMemory = $true +$Signature = @{ + Namespace = "WinAPI" + Name = "ForegroundWindow" + Language = "CSharp" + CompilerParameters = $CompilerParameters + MemberDefinition = @" +[DllImport("user32.dll")] +public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow); +[DllImport("user32.dll")] +[return: MarshalAs(UnmanagedType.Bool)] +public static extern bool SetForegroundWindow(IntPtr hWnd); +"@ +} + +# PowerShell 7 has CompilerOptions argument instead of CompilerParameters as PowerShell 5 has +# https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/add-type#-compileroptions +if ($Host.Version.Major -eq 7) +{ + $Signature.Remove("CompilerParameters") + $Signature.Add("CompilerOptions", $CompilerParameters) +} + +if (-not ("WinAPI.ForegroundWindow" -as [type])) +{ + Add-Type @Signature +} + +Start-Sleep -Seconds 1 + +Get-Process -Name explorer | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia_Script_for_Windows"} | ForEach-Object -Process { + # Show window, if minimized + [WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 5) + + # Force move the console window to the foreground + [WinAPI.ForegroundWindow]::SetForegroundWindow($_.MainWindowHandle) +} | Out-Null diff --git a/Download_Sophia.ps1 b/Download_Sophia.ps1 index a9c7b02d..a9745586 100644 --- a/Download_Sophia.ps1 +++ b/Download_Sophia.ps1 @@ -1,19 +1,18 @@ <# .SYNOPSIS - Download the latest Sophia Script version, depending on what Windows or PowerShell versions are used to + Download and expand latest Sophia Script version, depending on what Windows or PowerShell versions are used to .SYNOPSIS - Download the latest Sophia Script version, depending on what Windows or PowerShell versions are used to E.g., if you start script on Windows 11 via PowerShell 5.1 you will start downloading Sophia Script for Windows 11 PowerShell 5.1 - .EXAMPLE Download and expand Sophia Script archive + .EXAMPLE iwr script.sophia.team -useb | iex - - .NOTES - Current user #> + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 +Remove-Variable * -ErrorAction Ignore + if ($Host.Version.Major -eq 5) { # Progress bar can significantly impact cmdlet performance @@ -64,6 +63,7 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber) # Open the "Windows Update" page Start-Process -FilePath "ms-settings:windowsupdate" + pause exit } } @@ -94,6 +94,7 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber) # Open the "Windows Update" page Start-Process -FilePath "ms-settings:windowsupdate" + pause exit } } @@ -126,7 +127,8 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber) } {$_ -ge 22631} { - if ((Get-WindowsEdition -Online).Edition -notmatch "EnterpriseS") + # Check for Windows 11 LTSC 2024 + if ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName) -notmatch "LTSC 2024") { if ($Host.Version.Major -eq 5) { @@ -179,6 +181,7 @@ if (-not (Test-Path -Path "$DownloadsFolder\Sophia.Script.zip")) # Open t"Windows Update" page Start-Process -FilePath "ms-settings:windowsupdate" + pause exit } @@ -216,6 +219,7 @@ switch ($Version) "Windows_11_LTSC2024" { Invoke-Item -Path "$DownloadsFolder\Sophia_Script_for_Windows_11_LTSC_2024_v$LatestRelease" + if ((([System.Security.Principal.WindowsIdentity]::GetCurrent()).Owner -eq "S-1-5-32-544")) { Set-Location -Path "$DownloadsFolder\Sophia_Script_for_Windows_11_LTSC_2024_v$LatestRelease" @@ -275,7 +279,7 @@ public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow); [return: MarshalAs(UnmanagedType.Bool)] public static extern bool SetForegroundWindow(IntPtr hWnd); "@ - } +} # PowerShell 7 has CompilerOptions argument instead of CompilerParameters as PowerShell 5 has # https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/add-type#-compileroptions diff --git a/Scripts/Dependencies.ps1 b/Scripts/Dependencies.ps1 index e47012c0..a4fbf23f 100644 --- a/Scripts/Dependencies.ps1 +++ b/Scripts/Dependencies.ps1 @@ -29,6 +29,7 @@ Move-Item @Parameters Remove-Item -Path "Scripts\LGPO_30", "Scripts\LGPO.zip" -Recurse -Force # Download Microsoft.Windows.SDK.NET.dll & WinRT.Runtime.dll +# https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref $Parameters = @{ Uri = "https://www.nuget.org/api/v2/package/Microsoft.Windows.SDK.NET.Ref" OutFile = "Scripts\microsoft.windows.sdk.net.ref.zip" diff --git a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 index 30c55334..442eacf7 100644 --- a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 @@ -283,6 +283,8 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); Flibustier = "$(Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier)" # https://github.com/builtbybel/Winpilot Winpilot = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"Winpilot`"})" + # https://github.com/builtbybel/Winpilot + Bloatynosy = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"BloatynosyNue`"})" # https://github.com/builtbybel/xd-AntiSpy "xd-AntiSpy" = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"xd-AntiSpy`"})" # https://forum.ru-board.com/topic.cgi?forum=5&topic=50519 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 95878d78..e8d2704d 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 @@ -281,6 +281,8 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); Flibustier = "$(Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier)" # https://github.com/builtbybel/Winpilot Winpilot = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"Winpilot`"})" + # https://github.com/builtbybel/Winpilot + Bloatynosy = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"BloatynosyNue`"})" # https://github.com/builtbybel/xd-AntiSpy "xd-AntiSpy" = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"xd-AntiSpy`"})" # https://forum.ru-board.com/topic.cgi?forum=5&topic=50519 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 6fe6373e..f7aed84e 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 @@ -281,6 +281,8 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); Flibustier = "$(Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier)" # https://github.com/builtbybel/Winpilot Winpilot = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"Winpilot`"})" + # https://github.com/builtbybel/Winpilot + Bloatynosy = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"BloatynosyNue`"})" # https://github.com/builtbybel/xd-AntiSpy "xd-AntiSpy" = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"xd-AntiSpy`"})" # https://forum.ru-board.com/topic.cgi?forum=5&topic=50519 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 5e71183b..9dc1df18 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 @@ -282,6 +282,8 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); Flibustier = "$(Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier)" # https://github.com/builtbybel/Winpilot Winpilot = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"Winpilot`"})" + # https://github.com/builtbybel/Winpilot + Bloatynosy = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"BloatynosyNue`"})" # https://github.com/builtbybel/xd-AntiSpy "xd-AntiSpy" = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"xd-AntiSpy`"})" # https://forum.ru-board.com/topic.cgi?forum=5&topic=50519 diff --git a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 index a6591d73..e8c507f5 100644 --- a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 @@ -269,6 +269,8 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); Flibustier = "$(Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier)" # https://github.com/builtbybel/Winpilot Winpilot = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"Winpilot`"})" + # https://github.com/builtbybel/Winpilot + Bloatynosy = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"BloatynosyNue`"})" # https://github.com/builtbybel/xd-AntiSpy "xd-AntiSpy" = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"xd-AntiSpy`"})" # https://forum.ru-board.com/topic.cgi?forum=5&topic=50519 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 5fe07629..0ce2cf8e 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 @@ -267,6 +267,8 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); Flibustier = "$(Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier)" # https://github.com/builtbybel/Winpilot Winpilot = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"Winpilot`"})" + # https://github.com/builtbybel/Winpilot + Bloatynosy = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"BloatynosyNue`"})" # https://github.com/builtbybel/xd-AntiSpy "xd-AntiSpy" = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"xd-AntiSpy`"})" # https://forum.ru-board.com/topic.cgi?forum=5&topic=50519 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 c9933fbe..7b2bf7d3 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 @@ -268,6 +268,8 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); Flibustier = "$(Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier)" # https://github.com/builtbybel/Winpilot Winpilot = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"Winpilot`"})" + # https://github.com/builtbybel/Winpilot + Bloatynosy = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"BloatynosyNue`"})" # https://github.com/builtbybel/xd-AntiSpy "xd-AntiSpy" = "$((Get-ItemProperty -Path `"HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache`").PSObject.Properties | Where-Object -FilterScript {$_.Value -eq `"xd-AntiSpy`"})" # https://forum.ru-board.com/topic.cgi?forum=5&topic=50519