Skip to content

Commit 37622ed

Browse files
committed
Update scripts for downloading
1 parent 2fc9027 commit 37622ed

File tree

2 files changed

+64
-22
lines changed

2 files changed

+64
-22
lines changed

Download_Latest_Sophia.ps1

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ catch [System.Net.WebException]
5353
}
5454
Write-Warning -Message "You're using $(if ($DNS.Count -gt 1) {$DNS -join ', '} else {$DNS}) DNS records"
5555

56+
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
57+
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
58+
5659
pause
5760
exit
5861
}
@@ -68,7 +71,7 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber)
6871
}
6972
else
7073
{
71-
Write-Verbose -Message "Windows version is not supported. Update your Windows" -Verbose
74+
Write-Verbose -Message "Windows version is not supported. Update your Windows and try again." -Verbose
7275

7376
# Receive updates for other Microsoft products when you update Windows
7477
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
@@ -79,6 +82,9 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber)
7982
# Open the "Windows Update" page
8083
Start-Process -FilePath "ms-settings:windowsupdate"
8184

85+
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
86+
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
87+
8288
pause
8389
exit
8490
}
@@ -92,7 +98,7 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber)
9298
}
9399
else
94100
{
95-
Write-Verbose -Message "Windows version is not supported. Update your Windows" -Verbose
101+
Write-Verbose -Message "Windows version is not supported. Update your Windows and try again." -Verbose
96102

97103
# Receive updates for other Microsoft products when you update Windows
98104
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
@@ -103,6 +109,9 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber)
103109
# Open the "Windows Update" page
104110
Start-Process -FilePath "ms-settings:windowsupdate"
105111

112+
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
113+
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
114+
106115
pause
107116
exit
108117
}
@@ -151,22 +160,35 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber)
151160
$Version = "Sophia_Script_for_Windows_11_LTSC_2024"
152161
}
153162
}
154-
}
163+
default
164+
{
165+
Write-Verbose -Message "Windows version is not supported. Update your Windows and try again." -Verbose
155166

156-
if (Test-Path -Path "$DownloadsFolder\SophiaScriptTemp")
157-
{
158-
Write-Verbose -Message "Please remove `"$DownloadsFolder\SophiaScriptTemp`" manually and try to download again." -Verbose
159-
Remove-Item -Path "$DownloadsFolder\master.zip" -Force
160-
161-
pause
162-
exit
167+
# Receive updates for other Microsoft products when you update Windows
168+
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
169+
170+
# Check for updates
171+
& "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan
172+
173+
# Open the "Windows Update" page
174+
Start-Process -FilePath "ms-settings:windowsupdate"
175+
176+
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
177+
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
178+
179+
pause
180+
exit
181+
}
163182
}
164183

165184
if (Test-Path -Path "$DownloadsFolder\$($Version)_Latest")
166185
{
167186
Write-Verbose -Message "Please remove `"$DownloadsFolder\$($Version)_Latest`" manually and try to download again." -Verbose
168187
Remove-Item -Path "$DownloadsFolder\master.zip" -Force
169188

189+
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
190+
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
191+
170192
pause
171193
exit
172194
}
@@ -187,6 +209,9 @@ catch
187209
# Open t"Windows Update" page
188210
Start-Process -FilePath "ms-settings:windowsupdate"
189211

212+
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
213+
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
214+
190215
pause
191216
exit
192217
}

Download_Sophia.ps1

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ catch [System.Net.WebException]
4949
}
5050
Write-Warning -Message "You're using $(if ($DNS.Count -gt 1) {$DNS -join ', '} else {$DNS}) DNS records"
5151

52+
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
53+
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
54+
5255
pause
5356
exit
5457
}
@@ -81,7 +84,7 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber)
8184
}
8285
else
8386
{
84-
Write-Verbose -Message "Windows version is not supported. Update your Windows" -Verbose
87+
Write-Verbose -Message "Windows version is not supported. Update your Windows and try again." -Verbose
8588

8689
# Receive updates for other Microsoft products when you update Windows
8790
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
@@ -92,6 +95,9 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber)
9295
# Open the "Windows Update" page
9396
Start-Process -FilePath "ms-settings:windowsupdate"
9497

98+
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
99+
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
100+
95101
pause
96102
exit
97103
}
@@ -114,7 +120,7 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber)
114120
}
115121
else
116122
{
117-
Write-Verbose -Message "Windows version is not supported. Update your Windows" -Verbose
123+
Write-Verbose -Message "Windows version is not supported. Update your Windows and try again." -Verbose
118124

119125
# Receive updates for other Microsoft products when you update Windows
120126
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
@@ -125,6 +131,9 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber)
125131
# Open the "Windows Update" page
126132
Start-Process -FilePath "ms-settings:windowsupdate"
127133

134+
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
135+
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
136+
128137
pause
129138
exit
130139
}
@@ -240,20 +249,25 @@ switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber)
240249
$Version = "Windows_11_LTSC2024"
241250
}
242251
}
243-
}
252+
default
253+
{
254+
Write-Verbose -Message "Windows version is not supported. Update your Windows and try again." -Verbose
244255

245-
if (-not (Test-Path -Path "$DownloadsFolder\Sophia.Script.zip"))
246-
{
247-
Write-Verbose -Message "Your Windows build is unsupported. Run Windows Update and try again." -Verbose
256+
# Receive updates for other Microsoft products when you update Windows
257+
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "")
248258

249-
# Check for updates
250-
& "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan
259+
# Check for updates
260+
& "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan
251261

252-
# Open t"Windows Update" page
253-
Start-Process -FilePath "ms-settings:windowsupdate"
262+
# Open the "Windows Update" page
263+
Start-Process -FilePath "ms-settings:windowsupdate"
254264

255-
pause
256-
exit
265+
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
266+
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
267+
268+
pause
269+
exit
270+
}
257271
}
258272

259273
try
@@ -276,6 +290,9 @@ catch
276290
# Open t"Windows Update" page
277291
Start-Process -FilePath "ms-settings:windowsupdate"
278292

293+
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
294+
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
295+
279296
pause
280297
exit
281298
}

0 commit comments

Comments
 (0)