@@ -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
165184if (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}
0 commit comments