@@ -97,14 +97,12 @@ $failurePath = "$env:windir\System32\AtlasPackagesFailure"
97
97
# https://ss64.com/vb/popup.html
98
98
$sh = New-Object - ComObject " Wscript.Shell"
99
99
100
- # Docs links and messages
101
- $commonQuestions = ' https://docs.atlasos.net/faq-and-troubleshooting/common-questions'
102
- $failedRemovalLink = " $commonQuestions /failed-component-removal"
103
- $bitlockerDecryptLink = " $commonQuestions /decryptying-using-bitlocker"
100
+ # Messages
101
+ $atlasTeamOnGit = ' Report this to the Atlas team on GitHub.'
104
102
$genericRecoveryFailure = @"
105
103
Something went wrong while trying to use Windows Recovery to remove components.
106
104
107
- $failedRemovalLink
105
+ $atlasTeamOnGit
108
106
"@
109
107
110
108
# ======================================================================================================================= #
@@ -128,7 +126,7 @@ Without this, you won't be able to use disable Defender, remove telemetry and ha
128
126
129
127
This is an unsupported state.
130
128
131
- $failedRemovalLink
129
+ $atlasTeamOnGit
132
130
"@
133
131
exit 1
134
132
}
@@ -160,11 +158,10 @@ Something went wrong while removing components using Windows Recovery.
160
158
Log: $logPath
161
159
Exit code: $errorLevel
162
160
163
- $failedRemovalLink
161
+ $atlasTeamOnGit
164
162
"@
165
163
166
164
$sh.Popup ($Message , 0 , $WindowTitle , 0 + 48 )
167
- Start-Process $failedRemovalLink
168
165
exit 1
169
166
} elseif ($NextStartup ) { exit }
170
167
@@ -189,10 +186,9 @@ try {
189
186
FatalError @"
190
187
Something went wrong while trying to enable Windows Recovery for component removal.
191
188
192
- $failedRemovalLink
189
+ $atlasTeamOnGit
193
190
"@
194
191
195
- Start-Process $failedRemovalLink
196
192
exit 1
197
193
}
198
194
@@ -225,7 +221,6 @@ $failedRemovalLink
225
221
if (! $? ) {
226
222
Write-Info - Text ' Failed mounting WinRE partition, displaying mesage...' - UseError
227
223
$null = $sh.Popup ($genericRecoveryFailure , 0 , $WindowTitle , 0 + 16 )
228
- Start-Process $failedRemovalLink
229
224
exit
230
225
}
231
226
$deviceDrive = $mountPoint
@@ -269,15 +264,16 @@ $failedRemovalLink
269
264
Register-ScheduledTask - TaskName $bitlockerTaskName - Action $action @taskArgs | Out-Null
270
265
} else {
271
266
if (! $? ) {
267
+ $bitlockerLink = ' https://docs.atlasos.net/faq-and-troubleshooting/common-questions/decryptying-using-bitlocker/'
272
268
Write-Info - Text ' No WinRE partition with BitLocker, displaying message...' - UseError
273
269
$null = $sh.Popup (@"
274
270
A BitLocker install with Windows Recovery on the system drive was detected.
275
271
276
272
You need to decrypt your drive.
277
273
278
- $failedRemovalLink
274
+ $bitlockerLink
279
275
"@ , 0 , $WindowTitle , 0 + 16 )
280
- Start-Process $bitlockerDecryptLink
276
+ Start-Process $bitlockerLink
281
277
exit 1
282
278
}
283
279
}
@@ -291,15 +287,12 @@ $failedRemovalLink
291
287
New-Item - Path $atlasWinreWim - Type Directory - Force | Out-Null
292
288
Mount-WindowsImage - ImagePath $fullWimPath - Index 1 - Path $atlasWinreWim | Out-Null
293
289
if (! $? ) {
294
- Write-Info - Text ' No WinRE partition with BitLocker , displaying message...' - UseError
290
+ Write-Info - Text ' Something went wrong mounting the WinRE image , displaying message...' - UseError
295
291
$null = $sh.Popup (@"
296
- A BitLocker install with Windows Recovery on the system drive was detected.
297
-
298
- You need to decrypt your drive.
292
+ Something went wrong while mounting the WinRE image.
299
293
300
- $failedRemovalLink
294
+ $atlasTeamOnGit
301
295
"@ , 0 , $WindowTitle , 0 + 16 )
302
- Start-Process $bitlockerDecryptLink
303
296
exit 1
304
297
}
305
298
@@ -334,11 +327,10 @@ $failedRemovalLink
334
327
if (! $? ) {
335
328
Write-Info - Text ' Failed to save WinRE image, displaying message...' - UseError
336
329
$null = $sh.Popup (@"
337
- Failed to save the Windows Recovery image, see the documentation below .
330
+ Failed to save the Windows Recovery image.
338
331
339
- $failedRemovalLink
332
+ $atlasTeamOnGit
340
333
"@ , 0 , ' Component failure - Atlas' , 0 + 16 )
341
- Start-Process $failedRemovalLink
342
334
exit 1
343
335
}
344
336
Remove-Item $atlasWinreWim - Force
0 commit comments