|
|
|
@ -53,6 +53,9 @@ catch [System.Net.WebException] |
|
|
|
} |
|
|
|
Write-Warning -Message "You're using $(if ($DNS.Count -gt 1) {$DNS -join ', '} else {$DNS}) DNS records" |
|
|
|
|
|
|
|
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose |
|
|
|
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose |
|
|
|
|
|
|
|
pause |
|
|
|
exit |
|
|
|
} |
|
|
|
@ -68,7 +71,7 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber) |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
Write-Verbose -Message "Windows version is not supported. Update your Windows" -Verbose |
|
|
|
Write-Verbose -Message "Windows version is not supported. Update your Windows and try again." -Verbose |
|
|
|
|
|
|
|
# Receive updates for other Microsoft products when you update Windows |
|
|
|
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") |
|
|
|
@ -79,6 +82,9 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber) |
|
|
|
# Open the "Windows Update" page |
|
|
|
Start-Process -FilePath "ms-settings:windowsupdate" |
|
|
|
|
|
|
|
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose |
|
|
|
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose |
|
|
|
|
|
|
|
pause |
|
|
|
exit |
|
|
|
} |
|
|
|
@ -92,7 +98,7 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber) |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
Write-Verbose -Message "Windows version is not supported. Update your Windows" -Verbose |
|
|
|
Write-Verbose -Message "Windows version is not supported. Update your Windows and try again." -Verbose |
|
|
|
|
|
|
|
# Receive updates for other Microsoft products when you update Windows |
|
|
|
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") |
|
|
|
@ -103,6 +109,9 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber) |
|
|
|
# Open the "Windows Update" page |
|
|
|
Start-Process -FilePath "ms-settings:windowsupdate" |
|
|
|
|
|
|
|
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose |
|
|
|
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose |
|
|
|
|
|
|
|
pause |
|
|
|
exit |
|
|
|
} |
|
|
|
@ -151,15 +160,25 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber) |
|
|
|
$Version = "Sophia_Script_for_Windows_11_LTSC_2024" |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
default |
|
|
|
{ |
|
|
|
Write-Verbose -Message "Windows version is not supported. Update your Windows and try again." -Verbose |
|
|
|
|
|
|
|
if (Test-Path -Path "$DownloadsFolder\SophiaScriptTemp") |
|
|
|
{ |
|
|
|
Write-Verbose -Message "Please remove `"$DownloadsFolder\SophiaScriptTemp`" manually and try to download again." -Verbose |
|
|
|
Remove-Item -Path "$DownloadsFolder\master.zip" -Force |
|
|
|
|
|
|
|
pause |
|
|
|
exit |
|
|
|
# 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 |
|
|
|
& "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan |
|
|
|
|
|
|
|
# Open the "Windows Update" page |
|
|
|
Start-Process -FilePath "ms-settings:windowsupdate" |
|
|
|
|
|
|
|
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose |
|
|
|
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose |
|
|
|
|
|
|
|
pause |
|
|
|
exit |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (Test-Path -Path "$DownloadsFolder\$($Version)_Latest") |
|
|
|
@ -167,6 +186,9 @@ if (Test-Path -Path "$DownloadsFolder\$($Version)_Latest") |
|
|
|
Write-Verbose -Message "Please remove `"$DownloadsFolder\$($Version)_Latest`" manually and try to download again." -Verbose |
|
|
|
Remove-Item -Path "$DownloadsFolder\master.zip" -Force |
|
|
|
|
|
|
|
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose |
|
|
|
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose |
|
|
|
|
|
|
|
pause |
|
|
|
exit |
|
|
|
} |
|
|
|
@ -187,6 +209,9 @@ catch |
|
|
|
# Open t"Windows Update" page |
|
|
|
Start-Process -FilePath "ms-settings:windowsupdate" |
|
|
|
|
|
|
|
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose |
|
|
|
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose |
|
|
|
|
|
|
|
pause |
|
|
|
exit |
|
|
|
} |
|
|
|
|