@@ -159,10 +159,8 @@ public class PowerManagement {
159
159
Remove-ProvisionedPackages
160
160
161
161
Remove-FileOrDirectory - pathToDelete " $ ( $scratchDir ) \Windows\System32\LogFiles\WMI\RtBackup" - Directory
162
- Remove-FileOrDirectory - pathToDelete " $ ( $scratchDir ) \Windows\System32\WebThreatDefSvc" - Directory
163
162
Remove-FileOrDirectory - pathToDelete " $ ( $scratchDir ) \Windows\DiagTrack" - Directory
164
163
Remove-FileOrDirectory - pathToDelete " $ ( $scratchDir ) \Windows\InboxApps" - Directory
165
- Remove-FileOrDirectory - pathToDelete " $ ( $scratchDir ) \Windows\System32\SecurityHealthSystray.exe"
166
164
Remove-FileOrDirectory - pathToDelete " $ ( $scratchDir ) \Windows\System32\LocationNotificationWindows.exe"
167
165
Remove-FileOrDirectory - pathToDelete " $ ( $scratchDir ) \Program Files (x86)\Windows Photo Viewer" - Directory
168
166
Remove-FileOrDirectory - pathToDelete " $ ( $scratchDir ) \Program Files\Windows Photo Viewer" - Directory
@@ -175,9 +173,7 @@ public class PowerManagement {
175
173
Remove-FileOrDirectory - pathToDelete " $ ( $scratchDir ) \Windows\GameBarPresenceWriter"
176
174
Remove-FileOrDirectory - pathToDelete " $ ( $scratchDir ) \Windows\System32\OneDriveSetup.exe"
177
175
Remove-FileOrDirectory - pathToDelete " $ ( $scratchDir ) \Windows\System32\OneDrive.ico"
178
- Remove-FileOrDirectory - pathToDelete " $ ( $scratchDir ) \Windows\SystemApps" - mask " *Windows.Search*" - Directory
179
176
Remove-FileOrDirectory - pathToDelete " $ ( $scratchDir ) \Windows\SystemApps" - mask " *narratorquickstart*" - Directory
180
- Remove-FileOrDirectory - pathToDelete " $ ( $scratchDir ) \Windows\SystemApps" - mask " *Xbox*" - Directory
181
177
Remove-FileOrDirectory - pathToDelete " $ ( $scratchDir ) \Windows\SystemApps" - mask " *ParentalControls*" - Directory
182
178
Write-Host " Removal complete!"
183
179
@@ -239,59 +235,6 @@ public class PowerManagement {
239
235
reg add " HKLM\zSYSTEM\Setup\LabConfig" / v " BypassTPMCheck" / t REG_DWORD / d 1 / f
240
236
reg add " HKLM\zSYSTEM\Setup\MoSetup" / v " AllowUpgradesWithUnsupportedTPMOrCPU" / t REG_DWORD / d 1 / f
241
237
242
- if (! $keepEdge ) {
243
- # Undo changes made by -> Dism Add-Edge Edge.wim (Trust Me: this is the non-destructive way to unintegrate Edge)
244
-
245
- Write-Host " Removing Edge"
246
-
247
- # Microsoft Edge
248
- reg delete " HKLM\zSOFTWARE\Microsoft\Active Setup\Installed Components\{9459C573-B17A-45AE-9F64-1857B5D58CEE}" / f | Out-Null
249
-
250
- reg delete " HKLM\zSOFTWARE\Wow6432Node\Microsoft\EdgeUpdate\Clients\{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}" / f | Out-Null
251
- reg delete " HKLM\zSOFTWARE\Wow6432Node\Microsoft\EdgeUpdate\ClientState\{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}" / f | Out-Null
252
-
253
- reg delete " HKLM\zSOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" / f | Out-Null
254
-
255
- if (Test-Path " $scratchDir \Program Files (x86)\Microsoft\Edge" - Type Container) {
256
- Remove-Item " $scratchDir \Program Files (x86)\Microsoft\Edge" - Recurse - Force | Out-Null
257
- }
258
-
259
- # Extra
260
- reg delete " HKLM\zSOFTWARE\Microsoft\MicrosoftEdge" / f | Out-Null
261
-
262
- # Microsoft EdgeWebView
263
- reg delete " HKLM\zSOFTWARE\Wow6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" / f | Out-Null
264
- reg delete " HKLM\zSOFTWARE\Wow6432Node\Microsoft\EdgeUpdate\ClientState\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" / f | Out-Null
265
-
266
- reg delete " HKLM\zSOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" / f | Out-Null
267
-
268
- if (Test-Path " $scratchDir \Program Files (x86)\Microsoft\EdgeWebView" - Type Container) {
269
- Remove-Item " $scratchDir \Program Files (x86)\Microsoft\EdgeWebView" - Recurse - Force | Out-Null
270
- }
271
-
272
- # Edge Core
273
- if (Test-Path " $scratchDir \Program Files (x86)\Microsoft\EdgeCore" - Type Container) {
274
- Remove-Item " $scratchDir \Program Files (x86)\Microsoft\EdgeCore" - Recurse - Force | Out-Null
275
- }
276
-
277
- # Microsoft Edge Update
278
- reg delete " HKLM\zSOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\MicrosoftEdgeUpdate.exe" / f | Out-Null
279
-
280
- reg delete " HKLM\zSOFTWARE\Wow6432Node\Microsoft\EdgeUpdate" / f | Out-Null
281
- reg delete " HKLM\zSOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" / f | Out-Null
282
-
283
- # Microsoft Edge Update :: Services
284
- reg delete " HKLM\zSYSTEM\ControlSet001\Services\edgeupdate" / f | Out-Null
285
- reg delete " HKLM\zSYSTEM\ControlSet001\Services\edgeupdatem" / f | Out-Null
286
-
287
- if (Test-Path " $scratchDir \Program Files (x86)\Microsoft\EdgeUpdate" - Type Container) {
288
- Remove-Item " $scratchDir \Program Files (x86)\Microsoft\EdgeUpdate" - Recurse - Force | Out-Null
289
- }
290
-
291
- # Prevent EdgeChromium from Installing in the future
292
- reg add " HKLM\zSOFTWARE\Microsoft\EdgeUpdate" / v " DoNotUpdateToEdgeWithChromium" / t REG_DWORD / d " 1" / f | Out-Null
293
- }
294
-
295
238
# Prevent Windows Update Installing so called Expedited Apps
296
239
@ (
297
240
' EdgeUpdate' ,
0 commit comments