You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ($Setup) {RemoveEdgeChromium -AsTask} else {RemoveEdgeChromium}
114
+
if (!($Setup)) {
115
+
Write-Warning"Uninstalling AppX Edge..."
116
+
RemoveEdgeAppx
117
+
} else {Write-Warning"AppX Edge needs to be removed by AME Wizard..."}
117
118
if ($removeWebView) {
118
119
Write-Warning"Uninstalling Edge WebView..."
119
-
RemoveWebView
120
+
if ($Setup) {RemoveWebView-AsTask} else {RemoveWebView}
120
121
}
121
122
}
122
123
123
124
# AppX is not removed as it's handled by AME Wizard
124
125
if ($Setup) {
125
126
$removeData=$true
126
-
Write-Warning"Uninstalling Edge Chromium..."
127
-
RemoveEdgeChromium -AsTask
128
-
Write-Warning"Uninstalling Edge WebView..."
129
-
RemoveWebView -AsTask
130
-
Write-Warning"The AppX Edge needs to be removed by AME Wizard..."
127
+
$removeWebView=$true
128
+
UninstallAll
131
129
exit
132
130
}
133
131
134
-
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)) {
if ($null-ne$(whoami /user |Select-String"S-1-5-18")) {
139
133
Write-Host"This script can't be ran as TrustedInstaller or SYSTEM."
140
134
Write-Host"Please relaunch this script under a regular admin account.`n"
141
135
PauseNul "Press any key to exit... "
142
136
exit1
137
+
} else {
138
+
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)) {
0 commit comments