@ -155,7 +155,7 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber)
}
Invoke-WebRequest @Parameters
$Version = " Windows_10_PowerShell_5. 1 "
$Version = " Windows_10_PowerShell_5_ 1 "
}
else
{
@ -182,7 +182,7 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber)
if ( ( Get-CimInstance -ClassName CIM_Processor ) . Caption -match " ARM " )
{
# Arm based
$LatestRelease = $JSONVersions . Sophia_Script_Windows_11_PowerShell_5_1
$LatestRelease = $JSONVersions . Sophia_Script_Windows_11_Arm_ PowerShell_5_1
$Parameters = @ {
Uri = " https://github.com/farag2/Sophia-Script-for-Windows/releases/download/ $ LatestGitHubRelease/Sophia.Script.for.Windows.11.ARM.v $ LatestRelease.zip "
OutFile = " $ DownloadsFolder\Sophia.Script.zip "
@ -191,7 +191,7 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber)
}
Invoke-WebRequest @Parameters
$Version = " Windows_11_PowerShell_5. 1 "
$Version = " Windows_11_Arm_PowerShell_5_ 1 "
}
else
{
@ -204,7 +204,7 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber)
}
Invoke-WebRequest @Parameters
$Version = " Windows_11_PowerShell_5. 1 "
$Version = " Windows_11_PowerShell_5_ 1 "
}
}
else
@ -213,7 +213,7 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber)
if ( ( Get-CimInstance -ClassName CIM_Processor ) . Caption -match " ARM " )
{
# Arm based
$LatestRelease = $JSONVersions . Sophia_Script_Windows_11_PowerShell_7
$LatestRelease = $JSONVersions . Sophia_Script_Windows_11_Arm_ PowerShell_7
$Parameters = @ {
Uri = " https://github.com/farag2/Sophia-Script-for-Windows/releases/download/ $ LatestGitHubRelease/Sophia.Script.for.Windows.11.ARM.PowerShell.7.v $ LatestRelease.zip "
OutFile = " $ DownloadsFolder\Sophia.Script.zip "
@ -222,7 +222,7 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber)
}
Invoke-WebRequest @Parameters
$Version = " Windows_11_PowerShell_7 "
$Version = " Windows_11_Arm_ PowerShell_7 "
}
else
{
@ -326,7 +326,7 @@ switch ($Version)
Set-Location -Path " $ DownloadsFolder\Sophia_Script_for_Windows_11_LTSC_2024_v $ LatestRelease "
}
}
" Windows_10_PowerShell_5. 1 "
" Windows_10_PowerShell_5_ 1 "
{
Invoke-Item -Path " $ DownloadsFolder\Sophia_Script_for_Windows_10_v $ LatestRelease "
@ -344,7 +344,7 @@ switch ($Version)
Set-Location -Path " $ DownloadsFolder\Sophia_Script_for_Windows_10_PowerShell_7_v $ LatestRelease "
}
}
" Windows_11_PowerShell_5. 1 "
" Windows_11_PowerShell_5_ 1 "
{
Invoke-Item -Path " $ DownloadsFolder\Sophia_Script_for_Windows_11_v $ LatestRelease "
@ -362,6 +362,24 @@ switch ($Version)
Set-Location -Path " $ DownloadsFolder\Sophia_Script_for_Windows_11_PowerShell_7_v $ LatestRelease "
}
}
" Windows_11_Arm_PowerShell_5_1 "
{
Invoke-Item -Path " $ DownloadsFolder\Sophia_Script_for_Windows_11_Arm_v $ LatestRelease "
if ( ( ( [System.Security.Principal.WindowsIdentity] :: GetCurrent ( ) ) . Owner -eq " S-1-5-32-544 " ) )
{
Set-Location -Path " $ DownloadsFolder\Sophia_Script_for_Windows_11_Arm_v $ LatestRelease "
}
}
" Windows_11_Arm_PowerShell_7 "
{
Invoke-Item -Path " $ DownloadsFolder\Sophia_Script_for_Windows_11_Arm_PowerShell_7_v $ LatestRelease "
if ( ( ( [System.Security.Principal.WindowsIdentity] :: GetCurrent ( ) ) . Owner -eq " S-1-5-32-544 " ) )
{
Set-Location -Path " $ DownloadsFolder\Sophia_Script_for_Windows_11_Arm_PowerShell_7_v $ LatestRelease "
}
}
}
$Signature = @ {