@@ -116,7 +116,7 @@ function DeleteIfExist($Path) {
116116
117117function Remove-EdgePath {
118118 # Take ownership, grant Administrators full control, then delete - with a cmd 'rd'
119- # retry for trees the provider can't remove. Port of edge.py's remove_directory.
119+ # retry for trees the provider can't remove.
120120 param ([Parameter (Mandatory = $true )][string ]$Path )
121121
122122 if (-not (Test-Path - LiteralPath $Path )) {
@@ -131,7 +131,6 @@ function Remove-EdgePath {
131131 }
132132}
133133
134- # True if it's installed
135134function EdgeInstalled {
136135 foreach ($msedgeExe in $msedgeExePaths ) {
137136 if (Test-Path $msedgeExe ) {
@@ -226,8 +225,8 @@ function DisableEdgeUpdateInfrastructure {
226225function Remove-EdgeRegistration {
227226 # Edge leaves shell registration behind after its binaries are gone: dead protocol
228227 # handlers (microsoft-edge:), App Paths\msedge.exe, a binary-less Apps-list Uninstall
229- # row, StartMenuInternet and EdgeUpdate\Clients. Port of edge.py's registry cleanup;
230- # each key is removed from both the 64- and 32-bit views. WebView2 keys are untouched.
228+ # row, StartMenuInternet and EdgeUpdate\Clients. Each key is removed from both the
229+ # 64- and 32-bit views. WebView2 keys are untouched.
231230 $edgeKeys = @ (
232231 ' HKLM\SOFTWARE\Microsoft\Edge'
233232 ' HKLM\SOFTWARE\Microsoft\EdgeUpdate'
@@ -482,7 +481,7 @@ if ($UninstallEdge) {
482481 # Kick off Edge's own uninstaller detached and DO NOT wait for it. A synchronous
483482 # system-level --force-uninstall runs its RestartManager phase in the live session and
484483 # signs the user out on 24H2/25H2; launching it detached lets the direct file deletion
485- # below finish the removal first (port of edge.py: Popen + short sleep, then delete) .
484+ # below finish the removal first.
486485 foreach ($root in @ (
487486 " $ ( [Environment ]::GetFolderPath(' ProgramFilesx86' )) \Microsoft\Edge\Application" ,
488487 " $ ( [Environment ]::GetFolderPath(' ProgramFiles' )) \Microsoft\Edge\Application"
@@ -514,7 +513,7 @@ if ($UninstallEdge) {
514513
515514 # Remove leftover Edge shortcuts (they now point at deleted binaries and fail to open):
516515 # every user's Desktop, Quick Launch and taskbar pin, plus the Public Desktop and the
517- # common Start Menu. Port of edge.py's icon cleanup.
516+ # common Start Menu.
518517 $edgeShortcutNames = @ (' edge.lnk' , ' Microsoft Edge.lnk' )
519518 $relativeShortcutDirs = @ (
520519 ' Desktop'
0 commit comments