Skip to content

Commit ae2a557

Browse files
committed
fix(winre): docs links
1 parent 25a4497 commit ae2a557

File tree

1 file changed

+14
-22
lines changed

1 file changed

+14
-22
lines changed

src/playbook/Executables/AtlasModules/PackagesEnvironment/winrePackages.ps1

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,12 @@ $failurePath = "$env:windir\System32\AtlasPackagesFailure"
9797
# https://ss64.com/vb/popup.html
9898
$sh = New-Object -ComObject "Wscript.Shell"
9999

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.'
104102
$genericRecoveryFailure = @"
105103
Something went wrong while trying to use Windows Recovery to remove components.
106104
107-
$failedRemovalLink
105+
$atlasTeamOnGit
108106
"@
109107

110108
# ======================================================================================================================= #
@@ -128,7 +126,7 @@ Without this, you won't be able to use disable Defender, remove telemetry and ha
128126
129127
This is an unsupported state.
130128
131-
$failedRemovalLink
129+
$atlasTeamOnGit
132130
"@
133131
exit 1
134132
}
@@ -160,11 +158,10 @@ Something went wrong while removing components using Windows Recovery.
160158
Log: $logPath
161159
Exit code: $errorLevel
162160
163-
$failedRemovalLink
161+
$atlasTeamOnGit
164162
"@
165163

166164
$sh.Popup($Message,0,$WindowTitle,0+48)
167-
Start-Process $failedRemovalLink
168165
exit 1
169166
} elseif ($NextStartup) { exit }
170167

@@ -189,10 +186,9 @@ try {
189186
FatalError @"
190187
Something went wrong while trying to enable Windows Recovery for component removal.
191188
192-
$failedRemovalLink
189+
$atlasTeamOnGit
193190
"@
194191

195-
Start-Process $failedRemovalLink
196192
exit 1
197193
}
198194

@@ -225,7 +221,6 @@ $failedRemovalLink
225221
if (!$?) {
226222
Write-Info -Text 'Failed mounting WinRE partition, displaying mesage...' -UseError
227223
$null = $sh.Popup($genericRecoveryFailure,0,$WindowTitle,0+16)
228-
Start-Process $failedRemovalLink
229224
exit
230225
}
231226
$deviceDrive = $mountPoint
@@ -269,15 +264,16 @@ $failedRemovalLink
269264
Register-ScheduledTask -TaskName $bitlockerTaskName -Action $action @taskArgs | Out-Null
270265
} else {
271266
if (!$?) {
267+
$bitlockerLink = 'https://docs.atlasos.net/faq-and-troubleshooting/common-questions/decryptying-using-bitlocker/'
272268
Write-Info -Text 'No WinRE partition with BitLocker, displaying message...' -UseError
273269
$null = $sh.Popup(@"
274270
A BitLocker install with Windows Recovery on the system drive was detected.
275271
276272
You need to decrypt your drive.
277273
278-
$failedRemovalLink
274+
$bitlockerLink
279275
"@,0,$WindowTitle,0+16)
280-
Start-Process $bitlockerDecryptLink
276+
Start-Process $bitlockerLink
281277
exit 1
282278
}
283279
}
@@ -291,15 +287,12 @@ $failedRemovalLink
291287
New-Item -Path $atlasWinreWim -Type Directory -Force | Out-Null
292288
Mount-WindowsImage -ImagePath $fullWimPath -Index 1 -Path $atlasWinreWim | Out-Null
293289
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
295291
$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.
299293
300-
$failedRemovalLink
294+
$atlasTeamOnGit
301295
"@,0,$WindowTitle,0+16)
302-
Start-Process $bitlockerDecryptLink
303296
exit 1
304297
}
305298

@@ -334,11 +327,10 @@ $failedRemovalLink
334327
if (!$?) {
335328
Write-Info -Text 'Failed to save WinRE image, displaying message...' -UseError
336329
$null = $sh.Popup(@"
337-
Failed to save the Windows Recovery image, see the documentation below.
330+
Failed to save the Windows Recovery image.
338331
339-
$failedRemovalLink
332+
$atlasTeamOnGit
340333
"@,0,'Component failure - Atlas',0+16)
341-
Start-Process $failedRemovalLink
342334
exit 1
343335
}
344336
Remove-Item $atlasWinreWim -Force

0 commit comments

Comments
 (0)