Browse Source

Added cloud AV scan

pull/686/head
Dmitry Nefedov 4 months ago
parent
commit
f5aedc983d
  1. 13
      .github/workflows/Sophia.yml
  2. 23
      Scripts/Dependencies.ps1
  3. 3
      Scripts/SFX.ps1
  4. 20
      Scripts/Windows_10.ps1
  5. 20
      Scripts/Windows_10_LTSC_2019.ps1
  6. 20
      Scripts/Windows_10_LTSC_2021.ps1
  7. 20
      Scripts/Windows_10_PS_7.ps1
  8. 20
      Scripts/Windows_11.ps1
  9. 20
      Scripts/Windows_11_Arm.ps1
  10. 20
      Scripts/Windows_11_Arm_PS_7.ps1
  11. 20
      Scripts/Windows_11_LTSC_2024.ps1
  12. 18
      Scripts/Windows_11_PS_7.ps1
  13. 12
      Scripts/Wrapper.ps1
  14. 7
      Wrapper/README.md
  15. 2
      src/Sophia_Script_for_Windows_11/Sophia.ps1

13
.github/workflows/Sophia.yml

@ -67,6 +67,17 @@ jobs:
run: |
. "Scripts\SFX.ps1"
- name: Defender
run: |
# Get Defender path
$DefenderPath = (Get-ChildItem -Path "$env:ProgramData\Microsoft\Windows Defender\Platform" -Directory | Sort-Object Name -Descending | Select-Object -First 1).FullName
& "$DefenderPath\MpCmdRun.exe" -SignatureUpdate -Verbose
# Start scan
& "$DefenderPath\MpCmdRun.exe" -Scan -ScanType 3 -DisableRemediation -File $((Get-Item -Path Sophia_Script).FullName) | ForEach-Object {Write-Verbose -Message $_ -Verbose}
Get-Content -Path $env:TEMP\MpCmdRun.log
- name: ReleaseNotesTemplate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -83,6 +94,6 @@ jobs:
token: ${{ github.token }}
# Use "/" in path to files
files: |
Sophia*.zip
Sophia_Script/Sophia*.zip
Sophia.Script.for.Windows*WinGet.exe
body_path: ${{ steps.read_release.outputs.ReleaseBody }}

23
Scripts/Dependencies.ps1

@ -1,10 +1,12 @@
Write-Verbose -Message Dependencies -Verbose
New-Item -Path "Sophia_Script" -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 = "Scripts\LGPO.zip"
OutFile = "Sophia_Script\LGPO.zip"
UseBasicParsing = $true
Verbose = $true
}
@ -12,34 +14,35 @@ Invoke-WebRequest @Parameters
# Expand zip archive
$Parameters = @{
Path = "Scripts\LGPO.zip"
DestinationPath = "Scripts"
Path = "Sophia_Script\LGPO.zip"
DestinationPath = "Sophia_Script"
Force = $true
Verbose = $true
}
Expand-Archive @Parameters
$Parameters = @{
Path = "Scripts\LGPO_30\LGPO.exe"
Destination = "Scripts"
Path = "Sophia_Script\LGPO_30\LGPO.exe"
Destination = "Sophia_Script"
Force = $true
}
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"
OutFile = "Sophia_Script\microsoft.windows.sdk.net.ref.zip"
UseBasicParsing = $true
Verbose = $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("Scripts\microsoft.windows.sdk.net.ref.zip")
$ZIP = [IO.Compression.ZipFile]::OpenRead("Sophia_Script\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($_, "Scripts\$($_.Name)", $true)}
$Entries | ForEach-Object -Process {[IO.Compression.ZipFileExtensions]::ExtractToFile($_, "Sophia_Script\$($_.Name)", $true)}
$ZIP.Dispose()
Remove-Item -Path "Sophia_Script\LGPO_30", "Sophia_Script\LGPO.zip", "Sophia_Script\microsoft.windows.sdk.net.ref.zip" -Recurse -Force

3
Scripts/SFX.ps1

@ -7,10 +7,11 @@ winget install --id RARLab.WinRAR --accept-source-agreements --force
$Parameters = @{
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/refs/heads/master/sophia_script_versions.json"
UseBasicParsing = $true
Verbose = $true
}
$Latest_Release_Windows_11_PowerShell_5_1 = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_11_PowerShell_5_1
(Get-Content -Path Scripts\SFX_config.txt -Encoding utf8NoBOM -Raw) | Foreach-Object -Process {$_ -replace "SophiaScriptVersion", $Latest_Release_Windows_11_PowerShell_5_1} | Set-Content -Path Scripts\SFX_config.txt -Encoding utf8NoBOM -Force
# Create SFX archive
& "$env:ProgramFiles\WinRAR\RAR.exe" a -sfx -z"Scripts\SFX_config.txt" -ep1 -r "Sophia.Script.for.Windows.11.v$($Latest_Release_Windows_11_PowerShell_5_1)_WinGet.exe" "Sophia_Script_for_Windows_11_v$($Latest_Release_Windows_11_PowerShell_5_1)\*"
& "$env:ProgramFiles\WinRAR\RAR.exe" a -sfx -z"Scripts\SFX_config.txt" -ep1 -r "Sophia_Script\Sophia.Script.for.Windows.11.v$($Latest_Release_Windows_11_PowerShell_5_1)_WinGet.exe" "Sophia_Script\Sophia_Script_for_Windows_11_v$($Latest_Release_Windows_11_PowerShell_5_1)\*"

20
Scripts/Windows_10.ps1

@ -1,26 +1,30 @@
# https://github.com/farag2/Sophia-Script-for-Windows/blob/master/sophia_script_versions.json
$Parameters = @{
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
UseBasicParsing = $true
Verbose = $true
}
$Latest_Release_Windows_10_PowerShell_5_1 = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_10_PowerShell_5_1
Write-Verbose -Message "Sophia.Script.for.Windows.10.v$Latest_Release_Windows_10_PowerShell_5_1.zip" -Verbose
New-Item -Path "Sophia_Script_for_Windows_10_v$Latest_Release_Windows_10_PowerShell_5_1\Binaries" -ItemType Directory -Force
New-Item -Path "Sophia_Script\Sophia_Script_for_Windows_10_v$Latest_Release_Windows_10_PowerShell_5_1\Binaries" -ItemType Directory -Force
# Copy Windows 10 PS 5.1 version to new folder
Get-ChildItem -Path "src\Sophia_Script_for_Windows_10" -Force | Copy-Item -Destination "Sophia_Script\Sophia_Script_for_Windows_10_v$Latest_Release_Windows_10_PowerShell_5_1" -Recurse -Force
# Add LGPO.exe
$Parameters = @{
Path = @("Scripts\LGPO.exe")
Destination = "Sophia_Script_for_Windows_10_v$Latest_Release_Windows_10_PowerShell_5_1\Binaries"
Path = "Sophia_Script\LGPO.exe"
Destination = "Sophia_Script\Sophia_Script_for_Windows_10_v$Latest_Release_Windows_10_PowerShell_5_1\Binaries"
Recurse = $true
Force = $true
}
Copy-Item @Parameters
Get-ChildItem -Path "src\Sophia_Script_for_Windows_10" -Force | Copy-Item -Destination "Sophia_Script_for_Windows_10_v$Latest_Release_Windows_10_PowerShell_5_1" -Recurse -Force
$Parameters = @{
Path = "Sophia_Script_for_Windows_10_v$Latest_Release_Windows_10_PowerShell_5_1"
DestinationPath = "Sophia.Script.for.Windows.10.v$Latest_Release_Windows_10_PowerShell_5_1.zip"
Path = "Sophia_Script\Sophia_Script_for_Windows_10_v$Latest_Release_Windows_10_PowerShell_5_1"
DestinationPath = "Sophia_Script\Sophia.Script.for.Windows.10.v$Latest_Release_Windows_10_PowerShell_5_1.zip"
CompressionLevel = "Fastest"
Force = $true
}

20
Scripts/Windows_10_LTSC_2019.ps1

@ -1,26 +1,30 @@
# https://github.com/farag2/Sophia-Script-for-Windows/blob/master/sophia_script_versions.json
$Parameters = @{
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
UseBasicParsing = $true
Verbose = $true
}
$Latest_Release_Windows_10_LTSC2019 = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_10_LTSC2019
Write-Verbose -Message "Sophia.Script.for.Windows.10.LTSC.2019.v$Latest_Release_Windows_10_LTSC2019.zip" -Verbose
New-Item -Path "Sophia_Script_for_Windows_10_LTSC_2019_v$Latest_Release_Windows_10_LTSC2019\Binaries" -ItemType Directory -Force
New-Item -Path "Sophia_Script\Sophia_Script_for_Windows_10_LTSC_2019_v$Latest_Release_Windows_10_LTSC2019\Binaries" -ItemType Directory -Force
# Copy Windows 10 LTSC 2019 PS 5.1 version to new folder
Get-ChildItem -Path "src\Sophia_Script_for_Windows_10_LTSC_2019" -Force | Copy-Item -Destination "Sophia_Script\Sophia_Script_for_Windows_10_LTSC_2019_v$Latest_Release_Windows_10_LTSC2019" -Recurse -Force
# Add LGPO.exe
$Parameters = @{
Path = @("Scripts\LGPO.exe")
Destination = "Sophia_Script_for_Windows_10_LTSC_2019_v$Latest_Release_Windows_10_LTSC2019\Binaries"
Path = "Sophia_Script\LGPO.exe"
Destination = "Sophia_Script\Sophia_Script_for_Windows_10_LTSC_2019_v$Latest_Release_Windows_10_LTSC2019\Binaries"
Recurse = $true
Force = $true
}
Copy-Item @Parameters
Get-ChildItem -Path "src\Sophia_Script_for_Windows_10_LTSC_2019" -Force | Copy-Item -Destination "Sophia_Script_for_Windows_10_LTSC_2019_v$Latest_Release_Windows_10_LTSC2019" -Recurse -Force
$Parameters = @{
Path = "Sophia_Script_for_Windows_10_LTSC_2019_v$Latest_Release_Windows_10_LTSC2019"
DestinationPath = "Sophia.Script.for.Windows.10.LTSC.2019.v$Latest_Release_Windows_10_LTSC2019.zip"
Path = "Sophia_Script\Sophia_Script_for_Windows_10_LTSC_2019_v$Latest_Release_Windows_10_LTSC2019"
DestinationPath = "Sophia_Script\Sophia.Script.for.Windows.10.LTSC.2019.v$Latest_Release_Windows_10_LTSC2019.zip"
CompressionLevel = "Fastest"
Force = $true
}

20
Scripts/Windows_10_LTSC_2021.ps1

@ -1,26 +1,30 @@
# https://github.com/farag2/Sophia-Script-for-Windows/blob/master/sophia_script_versions.json
$Parameters = @{
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
UseBasicParsing = $true
Verbose = $true
}
$Latest_Release_Windows_10_LTSC2021 = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_10_LTSC2021
Write-Verbose -Message "Sophia.Script.for.Windows.10.LTSC.2021.v$Latest_Release_Windows_10_LTSC2021.zip" -Verbose
New-Item -Path "Sophia_Script_for_Windows_10_LTSC_2021_v$Latest_Release_Windows_10_LTSC2021\Binaries" -ItemType Directory -Force
New-Item -Path "Sophia_Script\Sophia_Script_for_Windows_10_LTSC_2021_v$Latest_Release_Windows_10_LTSC2021\Binaries" -ItemType Directory -Force
# Copy Windows 10 LTSC 2021 PS 5.1 version to new folder
Get-ChildItem -Path "src\Sophia_Script_for_Windows_10_LTSC_2021" -Force | Copy-Item -Destination "Sophia_Script\Sophia_Script_for_Windows_10_LTSC_2021_v$Latest_Release_Windows_10_LTSC2021" -Recurse -Force
# Add LGPO.exe
$Parameters = @{
Path = @("Scripts\LGPO.exe")
Destination = "Sophia_Script_for_Windows_10_LTSC_2021_v$Latest_Release_Windows_10_LTSC2021\Binaries"
Path = "Sophia_Script\LGPO.exe"
Destination = "Sophia_Script\Sophia_Script_for_Windows_10_LTSC_2021_v$Latest_Release_Windows_10_LTSC2021\Binaries"
Recurse = $true
Force = $true
}
Copy-Item @Parameters
Get-ChildItem -Path "src\Sophia_Script_for_Windows_10_LTSC_2021" -Force | Copy-Item -Destination "Sophia_Script_for_Windows_10_LTSC_2021_v$Latest_Release_Windows_10_LTSC2021" -Recurse -Force
$Parameters = @{
Path = "Sophia_Script_for_Windows_10_LTSC_2021_v$Latest_Release_Windows_10_LTSC2021"
DestinationPath = "Sophia.Script.for.Windows.10.LTSC.2021.v$Latest_Release_Windows_10_LTSC2021.zip"
Path = "Sophia_Script\Sophia_Script_for_Windows_10_LTSC_2021_v$Latest_Release_Windows_10_LTSC2021"
DestinationPath = "Sophia_Script\Sophia.Script.for.Windows.10.LTSC.2021.v$Latest_Release_Windows_10_LTSC2021.zip"
CompressionLevel = "Fastest"
Force = $true
}

20
Scripts/Windows_10_PS_7.ps1

@ -1,26 +1,30 @@
# https://github.com/farag2/Sophia-Script-for-Windows/blob/master/sophia_script_versions.json
$Parameters = @{
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
UseBasicParsing = $true
Verbose = $true
}
$Latest_Release_Windows_10_PowerShell_7 = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_10_PowerShell_7
Write-Verbose -Message "Sophia.Script.for.Windows.10.PowerShell.7.v$Latest_Release_Windows_10_PowerShell_7.zip" -Verbose
New-Item -Path "Sophia_Script_for_Windows_10_PowerShell_7_v$Latest_Release_Windows_10_PowerShell_7\Binaries" -ItemType Directory -Force
New-Item -Path "Sophia_Script\Sophia_Script_for_Windows_10_PowerShell_7_v$Latest_Release_Windows_10_PowerShell_7\Binaries" -ItemType Directory -Force
# Copy Windows 10 PS 7 version to new folder
Get-ChildItem -Path "src\Sophia_Script_for_Windows_10_PowerShell_7" -Force | Copy-Item -Destination "Sophia_Script\Sophia_Script_for_Windows_10_PowerShell_7_v$Latest_Release_Windows_10_PowerShell_7" -Recurse -Force
# Add LGPO.exe, WinRT.Runtime.dll, and Microsoft.Windows.SDK.NET.dll
$Parameters = @{
Path = @("Scripts\LGPO.exe", "Scripts\WinRT.Runtime.dll", "Scripts\Microsoft.Windows.SDK.NET.dll")
Destination = "Sophia_Script_for_Windows_10_PowerShell_7_v$Latest_Release_Windows_10_PowerShell_7\Binaries"
Path = @("Sophia_Script\LGPO.exe", "Sophia_Script\WinRT.Runtime.dll", "Sophia_Script\Microsoft.Windows.SDK.NET.dll")
Destination = "Sophia_Script\Sophia_Script_for_Windows_10_PowerShell_7_v$Latest_Release_Windows_10_PowerShell_7\Binaries"
Recurse = $true
Force = $true
}
Copy-Item @Parameters
Get-ChildItem -Path "src\Sophia_Script_for_Windows_10_PowerShell_7" -Force | Copy-Item -Destination "Sophia_Script_for_Windows_10_PowerShell_7_v$Latest_Release_Windows_10_PowerShell_7" -Recurse -Force
$Parameters = @{
Path = "Sophia_Script_for_Windows_10_PowerShell_7_v$Latest_Release_Windows_10_PowerShell_7"
DestinationPath = "Sophia.Script.for.Windows.10.PowerShell.7.v$Latest_Release_Windows_10_PowerShell_7.zip"
Path = "Sophia_Script\Sophia_Script_for_Windows_10_PowerShell_7_v$Latest_Release_Windows_10_PowerShell_7"
DestinationPath = "Sophia_Script\Sophia.Script.for.Windows.10.PowerShell.7.v$Latest_Release_Windows_10_PowerShell_7.zip"
CompressionLevel = "Fastest"
Force = $true
}

20
Scripts/Windows_11.ps1

@ -1,26 +1,30 @@
# https://github.com/farag2/Sophia-Script-for-Windows/blob/master/sophia_script_versions.json
$Parameters = @{
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
UseBasicParsing = $true
Verbose = $true
}
$Latest_Release_Windows_11_PowerShell_5_1 = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_11_PowerShell_5_1
Write-Verbose -Message "Sophia.Script.for.Windows.11.v$Latest_Release_Windows_11_PowerShell_5_1.zip" -Verbose
New-Item -Path "Sophia_Script_for_Windows_11_v$Latest_Release_Windows_11_PowerShell_5_1\Binaries" -ItemType Directory -Force
New-Item -Path "Sophia_Script\Sophia_Script_for_Windows_11_v$Latest_Release_Windows_11_PowerShell_5_1\Binaries" -ItemType Directory -Force
# Copy Windows 11 PS 5.1 version to new folder
Get-ChildItem -Path "src\Sophia_Script_for_Windows_11" -Force | Copy-Item -Destination "Sophia_Script\Sophia_Script_for_Windows_11_v$Latest_Release_Windows_11_PowerShell_5_1" -Recurse -Force
# Add LGPO.exe
$Parameters = @{
Path = @("Scripts\LGPO.exe")
Destination = "Sophia_Script_for_Windows_11_v$Latest_Release_Windows_11_PowerShell_5_1\Binaries"
Path = "Sophia_Script\LGPO.exe"
Destination = "Sophia_Script\Sophia_Script_for_Windows_11_v$Latest_Release_Windows_11_PowerShell_5_1\Binaries"
Recurse = $true
Force = $true
}
Copy-Item @Parameters
Get-ChildItem -Path "src\Sophia_Script_for_Windows_11" -Force | Copy-Item -Destination "Sophia_Script_for_Windows_11_v$Latest_Release_Windows_11_PowerShell_5_1" -Recurse -Force
$Parameters = @{
Path = "Sophia_Script_for_Windows_11_v$Latest_Release_Windows_11_PowerShell_5_1"
DestinationPath = "Sophia.Script.for.Windows.11.v$Latest_Release_Windows_11_PowerShell_5_1.zip"
Path = "Sophia_Script\Sophia_Script_for_Windows_11_v$Latest_Release_Windows_11_PowerShell_5_1"
DestinationPath = "Sophia_Script\Sophia.Script.for.Windows.11.v$Latest_Release_Windows_11_PowerShell_5_1.zip"
CompressionLevel = "Fastest"
Force = $true
}

20
Scripts/Windows_11_Arm.ps1

@ -1,26 +1,30 @@
# https://github.com/farag2/Sophia-Script-for-Windows/blob/master/sophia_script_versions.json
$Parameters = @{
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
UseBasicParsing = $true
Verbose = $true
}
$Latest_Release_Windows_11_Arm_PowerShell_5_1 = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_11_PowerShell_5_1
Write-Verbose -Message "Sophia.Script.for.Windows.11.Arm.v$Latest_Release_Windows_11_Arm_PowerShell_5_1.zip" -Verbose
New-Item -Path "Sophia_Script_for_Windows_11_Arm_v$Latest_Release_Windows_11_Arm_PowerShell_5_1\Binaries" -ItemType Directory -Force
New-Item -Path "Sophia_Script\Sophia_Script_for_Windows_11_Arm_v$Latest_Release_Windows_11_Arm_PowerShell_5_1\Binaries" -ItemType Directory -Force
# Copy Windows 11 PS 5.1 (ARM) version to new folder
Get-ChildItem -Path "src\Sophia_Script_for_Windows_11_Arm" -Force | Copy-Item -Destination "Sophia_Script\Sophia_Script_for_Windows_11_Arm_v$Latest_Release_Windows_11_Arm_PowerShell_5_1" -Recurse -Force
# Add LGPO.exe
$Parameters = @{
Path = @("Scripts\LGPO.exe")
Destination = "Sophia_Script_for_Windows_11_Arm_v$Latest_Release_Windows_11_Arm_PowerShell_5_1\Binaries"
Path = "Sophia_Script\LGPO.exe"
Destination = "Sophia_Script\Sophia_Script_for_Windows_11_Arm_v$Latest_Release_Windows_11_Arm_PowerShell_5_1\Binaries"
Recurse = $true
Force = $true
}
Copy-Item @Parameters
Get-ChildItem -Path "src\Sophia_Script_for_Windows_11_Arm" -Force | Copy-Item -Destination "Sophia_Script_for_Windows_11_Arm_v$Latest_Release_Windows_11_Arm_PowerShell_5_1" -Recurse -Force
$Parameters = @{
Path = "Sophia_Script_for_Windows_11_Arm_v$Latest_Release_Windows_11_Arm_PowerShell_5_1"
DestinationPath = "Sophia.Script.for.Windows.11.Arm.v$Latest_Release_Windows_11_Arm_PowerShell_5_1.zip"
Path = "Sophia_Script\Sophia_Script_for_Windows_11_Arm_v$Latest_Release_Windows_11_Arm_PowerShell_5_1"
DestinationPath = "Sophia_Script\Sophia.Script.for.Windows.11.Arm.v$Latest_Release_Windows_11_Arm_PowerShell_5_1.zip"
CompressionLevel = "Fastest"
Force = $true
}

20
Scripts/Windows_11_Arm_PS_7.ps1

@ -1,26 +1,30 @@
# https://github.com/farag2/Sophia-Script-for-Windows/blob/master/sophia_script_versions.json
$Parameters = @{
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
UseBasicParsing = $true
Verbose = $true
}
$Latest_Release_Windows_11_Arm_PowerShell_7 = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_11_PowerShell_7
Write-Verbose -Message "Sophia.Script.for.Windows.11.Arm.PowerShell.7.v$Latest_Release_Windows_11_Arm_PowerShell_7.zip" -Verbose
New-Item -Path "Sophia_Script_for_Windows_11_Arm_PowerShell_7_v$Latest_Release_Windows_11_Arm_PowerShell_7\Binaries" -ItemType Directory -Force
New-Item -Path "Sophia_Script\Sophia_Script_for_Windows_11_Arm_PowerShell_7_v$Latest_Release_Windows_11_Arm_PowerShell_7\Binaries" -ItemType Directory -Force
# Copy Windows 11 PS 7 (ARM) version to new folder
Get-ChildItem -Path "src\Sophia_Script_for_Windows_11_Arm_PowerShell_7" -Force | Copy-Item -Destination "Sophia_Script\Sophia_Script_for_Windows_11_Arm_PowerShell_7_v$Latest_Release_Windows_11_Arm_PowerShell_7" -Recurse -Force
# Add LGPO.exe, WinRT.Runtime.dll, and Microsoft.Windows.SDK.NET.dll
$Parameters = @{
Path = @("Scripts\LGPO.exe", "Scripts\WinRT.Runtime.dll", "Scripts\Microsoft.Windows.SDK.NET.dll")
Destination = "Sophia_Script_for_Windows_11_Arm_PowerShell_7_v$Latest_Release_Windows_11_Arm_PowerShell_7\Binaries"
Path = @("Sophia_Script\LGPO.exe", "Sophia_Script\WinRT.Runtime.dll", "Sophia_Script\Microsoft.Windows.SDK.NET.dll")
Destination = "Sophia_Script\Sophia_Script_for_Windows_11_Arm_PowerShell_7_v$Latest_Release_Windows_11_Arm_PowerShell_7\Binaries"
Recurse = $true
Force = $true
}
Copy-Item @Parameters
Get-ChildItem -Path "src\Sophia_Script_for_Windows_11_Arm_PowerShell_7" -Force | Copy-Item -Destination "Sophia_Script_for_Windows_11_Arm_PowerShell_7_v$Latest_Release_Windows_11_Arm_PowerShell_7" -Recurse -Force
$Parameters = @{
Path = "Sophia_Script_for_Windows_11_Arm_PowerShell_7_v$Latest_Release_Windows_11_Arm_PowerShell_7"
DestinationPath = "Sophia.Script.for.Windows.11.Arm.PowerShell.7.v$Latest_Release_Windows_11_Arm_PowerShell_7.zip"
Path = "Sophia_Script\Sophia_Script_for_Windows_11_Arm_PowerShell_7_v$Latest_Release_Windows_11_Arm_PowerShell_7"
DestinationPath = "Sophia_Script\Sophia.Script.for.Windows.11.Arm.PowerShell.7.v$Latest_Release_Windows_11_Arm_PowerShell_7.zip"
CompressionLevel = "Fastest"
Force = $true
}

20
Scripts/Windows_11_LTSC_2024.ps1

@ -1,26 +1,30 @@
# https://github.com/farag2/Sophia-Script-for-Windows/blob/master/sophia_script_versions.json
$Parameters = @{
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
UseBasicParsing = $true
Verbose = $true
}
$Latest_Release_Windows_11_LTSC2024 = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_11_LTSC2024
Write-Verbose -Message "Sophia.Script.for.Windows.11.LTSC.2024.v$Latest_Release_Windows_11_LTSC2024.zip" -Verbose
New-Item -Path "Sophia_Script_for_Windows_11_LTSC_2024_v$Latest_Release_Windows_11_LTSC2024\Binaries" -ItemType Directory -Force
New-Item -Path "Sophia_Script\Sophia_Script_for_Windows_11_LTSC_2024_v$Latest_Release_Windows_11_LTSC2024\Binaries" -ItemType Directory -Force
# Copy Windows 11 LTSC 2024 version to new folder
Get-ChildItem -Path "src\Sophia_Script_for_Windows_11_LTSC_2024" -Force | Copy-Item -Destination "Sophia_Script\Sophia_Script_for_Windows_11_LTSC_2024_v$Latest_Release_Windows_11_LTSC2024" -Recurse -Force
# Add LGPO.exe
$Parameters = @{
Path = @("Scripts\LGPO.exe")
Destination = "Sophia_Script_for_Windows_11_LTSC_2024_v$Latest_Release_Windows_11_LTSC2024\Binaries"
Path = "Sophia_Script\LGPO.exe"
Destination = "Sophia_Script\Sophia_Script_for_Windows_11_LTSC_2024_v$Latest_Release_Windows_11_LTSC2024\Binaries"
Recurse = $true
Force = $true
}
Copy-Item @Parameters
Get-ChildItem -Path "src\Sophia_Script_for_Windows_11_LTSC_2024" -Force | Copy-Item -Destination "Sophia_Script_for_Windows_11_LTSC_2024_v$Latest_Release_Windows_11_LTSC2024" -Recurse -Force
$Parameters = @{
Path = "Sophia_Script_for_Windows_11_LTSC_2024_v$Latest_Release_Windows_11_LTSC2024"
DestinationPath = "Sophia.Script.for.Windows.11.LTSC.2024.v$Latest_Release_Windows_11_LTSC2024.zip"
Path = "Sophia_Script\Sophia_Script_for_Windows_11_LTSC_2024_v$Latest_Release_Windows_11_LTSC2024"
DestinationPath = "Sophia_Script\Sophia.Script.for.Windows.11.LTSC.2024.v$Latest_Release_Windows_11_LTSC2024.zip"
CompressionLevel = "Fastest"
Force = $true
}

18
Scripts/Windows_11_PS_7.ps1

@ -1,6 +1,8 @@
# https://github.com/farag2/Sophia-Script-for-Windows/blob/master/sophia_script_versions.json
$Parameters = @{
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
UseBasicParsing = $true
Verbose = $true
}
$Latest_Release_Windows_11_PowerShell_7 = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_11_PowerShell_7
@ -8,19 +10,21 @@ Write-Verbose -Message "Sophia.Script.for.Windows.11.PowerShell.7.v$Latest_Relea
New-Item -Path "Sophia_Script_for_Windows_11_PowerShell_7_v$Latest_Release_Windows_11_PowerShell_7\Binaries" -ItemType Directory -Force
# Copy Windows 11 PS 7 (ARM) version to new folder
Get-ChildItem -Path "src\Sophia_Script_for_Windows_11_PowerShell_7" -Force | Copy-Item -Destination "Sophia_Script\Sophia_Script_for_Windows_11_PowerShell_7_v$Latest_Release_Windows_11_PowerShell_7" -Recurse -Force
# Add LGPO.exe
$Parameters = @{
Path = @("Scripts\LGPO.exe", "Scripts\WinRT.Runtime.dll", "Scripts\Microsoft.Windows.SDK.NET.dll")
Destination = "Sophia_Script_for_Windows_11_PowerShell_7_v$Latest_Release_Windows_11_PowerShell_7\Binaries"
Path = @("Sophia_Script\LGPO.exe", "Sophia_Script\WinRT.Runtime.dll", "Sophia_Script\Microsoft.Windows.SDK.NET.dll")
Destination = "Sophia_Script\Sophia_Script_for_Windows_11_PowerShell_7_v$Latest_Release_Windows_11_PowerShell_7\Binaries"
Recurse = $true
Force = $true
}
Copy-Item @Parameters
Get-ChildItem -Path "src\Sophia_Script_for_Windows_11_PowerShell_7" -Force | Copy-Item -Destination "Sophia_Script_for_Windows_11_PowerShell_7_v$Latest_Release_Windows_11_PowerShell_7" -Recurse -Force
$Parameters = @{
Path = "Sophia_Script_for_Windows_11_PowerShell_7_v$Latest_Release_Windows_11_PowerShell_7"
DestinationPath = "Sophia.Script.for.Windows.11.PowerShell.7.v$Latest_Release_Windows_11_PowerShell_7.zip"
Path = "Sophia_Script\Sophia_Script_for_Windows_11_PowerShell_7_v$Latest_Release_Windows_11_PowerShell_7"
DestinationPath = "Sophia_Script\Sophia.Script.for.Windows.11.PowerShell.7.v$Latest_Release_Windows_11_PowerShell_7.zip"
CompressionLevel = "Fastest"
Force = $true
}

12
Scripts/Wrapper.ps1

@ -1,6 +1,8 @@
# https://github.com/farag2/Sophia-Script-for-Windows/blob/master/sophia_script_versions.json
$Parameters = @{
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json"
UseBasicParsing = $true
Verbose = $true
}
$Latest_Release_Sophia_Script_Wrapper = (Invoke-RestMethod @Parameters).Sophia_Script_Wrapper
@ -8,10 +10,12 @@ Write-Verbose -Message "Sophia.Script.Wrapper.v$Latest_Release_Sophia_Script_Wra
New-Item -Path "Sophia_Script_Wrapper_v$Latest_Release_Sophia_Script_Wrapper" -ItemType Directory -Force
Get-ChildItem -Path Wrapper -Exclude README.md -Force | Copy-Item -Destination "Sophia_Script_Wrapper_v$Latest_Release_Sophia_Script_Wrapper" -Recurse -Force
# Copy Wrapper to new folder
Get-ChildItem -Path Wrapper -Exclude README.md -Force | Copy-Item -Destination "Sophia_Script\Sophia_Script_Wrapper_v$Latest_Release_Sophia_Script_Wrapper" -Recurse -Force
$Parameters = @{
Path = "Sophia_Script_Wrapper_v$Latest_Release_Sophia_Script_Wrapper"
DestinationPath = "Sophia.Script.Wrapper.v$Latest_Release_Sophia_Script_Wrapper.zip"
Path = "Sophia_Script\Sophia_Script_Wrapper_v$Latest_Release_Sophia_Script_Wrapper"
DestinationPath = "Sophia_Script\Sophia.Script.Wrapper.v$Latest_Release_Sophia_Script_Wrapper.zip"
CompressionLevel = "Fastest"
Force = $true
}

7
Wrapper/README.md

@ -1,6 +1,7 @@
## Sophia Script Wrapper
Created by David from [BenchTweakGaming.com](https://benchtweakgaming.com/sophia-script-wrapper-for-sophia-script-for-windows/).
Created by @BenchTweakGaming
This program creates a PowerShell script file that you can run to customize Windows based on Sophia Script. It serves as a front-end GUI for the Sophia Script. It is called a Wrapper.
## Wrapper Files
@ -17,4 +18,6 @@ This program creates a PowerShell script file that you can run to customize Wind
# How to translate UI into another language
UPDATE: Adding languages is user created now. Copy and translate the `en-US` folder files in `Localizations` to your language. You also need to translate the `tag.json` from either the `ru-RU` or `de-DE` folders in `Localizations` to your language. Edit the `wrapper_localizations.json` file to add the language entry with control sizing.
* Copy and translate the `en-US` folder files in `Localizations` to your language
* You also need to translate the `tag.json` from either the `ru-RU` or `de-DE` folders in `Localizations` to your language
* Edit the `wrapper_localizations.json` file to add the language entry with control sizing

2
src/Sophia_Script_for_Windows_11/Sophia.ps1

@ -85,7 +85,7 @@ if ($Global:Failed -eq 1)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Preset configuration starts here #
# Настройка пресет-файла начинается здесь # ###
# Настройка пресет-файла начинается здесь #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#region Protection

Loading…
Cancel
Save