@@ -1189,90 +1189,104 @@ function Remove-Features([switch] $dumpFeatures = $false, [switch] $keepDefender
1189
1189
Remove-Features -keepDefender:$false
1190
1190
1191
1191
#>
1192
- $featlist = (Get-WindowsOptionalFeature -Path $scratchDir).FeatureName
1193
- if ($dumpFeatures)
1192
+ try
1194
1193
{
1195
- $featlist > allfeaturesdump.txt
1196
- }
1194
+ $featlist = (Get-WindowsOptionalFeature -Path $scratchDir).FeatureName
1195
+ if ($dumpFeatures)
1196
+ {
1197
+ $featlist > allfeaturesdump.txt
1198
+ }
1197
1199
1198
- $featlist = $featlist | Where-Object {
1199
- $_ -NotLike "*Printing*" -AND
1200
- $_ -NotLike "*TelnetClient*" -AND
1201
- $_ -NotLike "*PowerShell*" -AND
1202
- $_ -NotLike "*NetFx*" -AND
1203
- $_ -NotLike "*Media*" -AND
1204
- $_ -NotLike "*NFS*"
1205
- }
1200
+ $featlist = $featlist | Where-Object {
1201
+ $_ -NotLike "*Printing*" -AND
1202
+ $_ -NotLike "*TelnetClient*" -AND
1203
+ $_ -NotLike "*PowerShell*" -AND
1204
+ $_ -NotLike "*NetFx*" -AND
1205
+ $_ -NotLike "*Media*" -AND
1206
+ $_ -NotLike "*NFS*"
1207
+ }
1206
1208
1207
- if ($keepDefender) { $featlist = $featlist | Where-Object { $_ -NotLike "*Defender*" }}
1209
+ if ($keepDefender) { $featlist = $featlist | Where-Object { $_ -NotLike "*Defender*" }}
1208
1210
1209
- foreach($feature in $featlist)
1211
+ foreach($feature in $featlist)
1212
+ {
1213
+ $status = "Removing feature $feature"
1214
+ Write-Progress -Activity "Removing features" -Status $status -PercentComplete ($counter++/$featlist.Count*100)
1215
+ Write-Debug "Removing feature $feature"
1216
+ Disable-WindowsOptionalFeature -Path "$scratchDir" -FeatureName $feature -Remove -ErrorAction SilentlyContinue -NoRestart
1217
+ }
1218
+ Write-Progress -Activity "Removing features" -Status "Ready" -Completed
1219
+ Write-Host "You can re-enable the disabled features at any time, using either Windows Update or the SxS folder in <installation media>\Sources."
1220
+ }
1221
+ catch
1210
1222
{
1211
- $status = "Removing feature $feature"
1212
- Write-Progress -Activity "Removing features" -Status $status -PercentComplete ($counter++/$featlist.Count*100)
1213
- Write-Debug "Removing feature $feature"
1214
- Disable-WindowsOptionalFeature -Path "$scratchDir" -FeatureName $feature -Remove -ErrorAction SilentlyContinue -NoRestart
1223
+ Write-Host "Unable to get information about the features. MicroWin processing will continue, but features will not be processed"
1215
1224
}
1216
- Write-Progress -Activity "Removing features" -Status "Ready" -Completed
1217
- Write-Host "You can re-enable the disabled features at any time, using either Windows Update or the SxS folder in <installation media>\Sources."
1218
1225
}
1219
1226
1220
1227
function Remove-Packages
1221
1228
{
1222
- $pkglist = (Get-WindowsPackage -Path "$scratchDir").PackageName
1223
-
1224
- $pkglist = $pkglist | Where-Object {
1225
- $_ -NotLike "*ApplicationModel*" -AND
1226
- $_ -NotLike "*indows-Client-LanguagePack*" -AND
1227
- $_ -NotLike "*LanguageFeatures-Basic*" -AND
1228
- $_ -NotLike "*Package_for_ServicingStack*" -AND
1229
- $_ -NotLike "*.NET*" -AND
1230
- $_ -NotLike "*Store*" -AND
1231
- $_ -NotLike "*VCLibs*" -AND
1232
- $_ -NotLike "*AAD.BrokerPlugin",
1233
- $_ -NotLike "*LockApp*" -AND
1234
- $_ -NotLike "*Notepad*" -AND
1235
- $_ -NotLike "*immersivecontrolpanel*" -AND
1236
- $_ -NotLike "*ContentDeliveryManager*" -AND
1237
- $_ -NotLike "*PinningConfirMationDialog*" -AND
1238
- $_ -NotLike "*SecHealthUI*" -AND
1239
- $_ -NotLike "*SecureAssessmentBrowser*" -AND
1240
- $_ -NotLike "*PrintDialog*" -AND
1241
- $_ -NotLike "*AssignedAccessLockApp*" -AND
1242
- $_ -NotLike "*OOBENetworkConnectionFlow*" -AND
1243
- $_ -NotLike "*Apprep.ChxApp*" -AND
1244
- $_ -NotLike "*CBS*" -AND
1245
- $_ -NotLike "*OOBENetworkCaptivePortal*" -AND
1246
- $_ -NotLike "*PeopleExperienceHost*" -AND
1247
- $_ -NotLike "*ParentalControls*" -AND
1248
- $_ -NotLike "*Win32WebViewHost*" -AND
1249
- $_ -NotLike "*InputApp*" -AND
1250
- $_ -NotLike "*AccountsControl*" -AND
1251
- $_ -NotLike "*AsyncTextService*" -AND
1252
- $_ -NotLike "*CapturePicker*" -AND
1253
- $_ -NotLike "*CredDialogHost*" -AND
1254
- $_ -NotLike "*BioEnrollMent*" -AND
1255
- $_ -NotLike "*ShellExperienceHost*" -AND
1256
- $_ -NotLike "*DesktopAppInstaller*" -AND
1257
- $_ -NotLike "*WebMediaExtensions*" -AND
1258
- $_ -NotLike "*WMIC*" -AND
1259
- $_ -NotLike "*UI.XaML*"
1260
- }
1261
-
1262
- foreach ($pkg in $pkglist)
1229
+ try
1263
1230
{
1264
- try {
1265
- $status = "Removing $pkg"
1266
- Write-Progress -Activity "Removing Apps" -Status $status -PercentComplete ($counter++/$pkglist.Count*100)
1267
- Remove-WindowsPackage -Path "$scratchDir" -PackageName $pkg -NoRestart -ErrorAction SilentlyContinue
1268
- }
1269
- catch {
1270
- # This can happen if the package that is being removed is a permanent one, like FodMetadata
1271
- Write-Host "Could not remove OS package $($pkg)"
1272
- continue
1231
+ $pkglist = (Get-WindowsPackage -Path "$scratchDir").PackageName
1232
+
1233
+ $pkglist = $pkglist | Where-Object {
1234
+ $_ -NotLike "*ApplicationModel*" -AND
1235
+ $_ -NotLike "*indows-Client-LanguagePack*" -AND
1236
+ $_ -NotLike "*LanguageFeatures-Basic*" -AND
1237
+ $_ -NotLike "*Package_for_ServicingStack*" -AND
1238
+ $_ -NotLike "*.NET*" -AND
1239
+ $_ -NotLike "*Store*" -AND
1240
+ $_ -NotLike "*VCLibs*" -AND
1241
+ $_ -NotLike "*AAD.BrokerPlugin",
1242
+ $_ -NotLike "*LockApp*" -AND
1243
+ $_ -NotLike "*Notepad*" -AND
1244
+ $_ -NotLike "*immersivecontrolpanel*" -AND
1245
+ $_ -NotLike "*ContentDeliveryManager*" -AND
1246
+ $_ -NotLike "*PinningConfirMationDialog*" -AND
1247
+ $_ -NotLike "*SecHealthUI*" -AND
1248
+ $_ -NotLike "*SecureAssessmentBrowser*" -AND
1249
+ $_ -NotLike "*PrintDialog*" -AND
1250
+ $_ -NotLike "*AssignedAccessLockApp*" -AND
1251
+ $_ -NotLike "*OOBENetworkConnectionFlow*" -AND
1252
+ $_ -NotLike "*Apprep.ChxApp*" -AND
1253
+ $_ -NotLike "*CBS*" -AND
1254
+ $_ -NotLike "*OOBENetworkCaptivePortal*" -AND
1255
+ $_ -NotLike "*PeopleExperienceHost*" -AND
1256
+ $_ -NotLike "*ParentalControls*" -AND
1257
+ $_ -NotLike "*Win32WebViewHost*" -AND
1258
+ $_ -NotLike "*InputApp*" -AND
1259
+ $_ -NotLike "*AccountsControl*" -AND
1260
+ $_ -NotLike "*AsyncTextService*" -AND
1261
+ $_ -NotLike "*CapturePicker*" -AND
1262
+ $_ -NotLike "*CredDialogHost*" -AND
1263
+ $_ -NotLike "*BioEnrollMent*" -AND
1264
+ $_ -NotLike "*ShellExperienceHost*" -AND
1265
+ $_ -NotLike "*DesktopAppInstaller*" -AND
1266
+ $_ -NotLike "*WebMediaExtensions*" -AND
1267
+ $_ -NotLike "*WMIC*" -AND
1268
+ $_ -NotLike "*UI.XaML*"
1269
+ }
1270
+
1271
+ foreach ($pkg in $pkglist)
1272
+ {
1273
+ try {
1274
+ $status = "Removing $pkg"
1275
+ Write-Progress -Activity "Removing Apps" -Status $status -PercentComplete ($counter++/$pkglist.Count*100)
1276
+ Remove-WindowsPackage -Path "$scratchDir" -PackageName $pkg -NoRestart -ErrorAction SilentlyContinue
1277
+ }
1278
+ catch {
1279
+ # This can happen if the package that is being removed is a permanent one, like FodMetadata
1280
+ Write-Host "Could not remove OS package $($pkg)"
1281
+ continue
1282
+ }
1273
1283
}
1284
+ Write-Progress -Activity "Removing Apps" -Status "Ready" -Completed
1285
+ }
1286
+ catch
1287
+ {
1288
+ Write-Host "Unable to get information about the packages. MicroWin processing will continue, but packages will not be processed"
1274
1289
}
1275
- Write-Progress -Activity "Removing Apps" -Status "Ready" -Completed
1276
1290
}
1277
1291
1278
1292
function Remove-ProvisionedPackages([switch] $keepSecurity = $false)
@@ -12369,7 +12383,7 @@ $sync.configs.tweaks = '{
12369
12383
"panel": "1",
12370
12384
"Order": "a040_",
12371
12385
"Type": "Combobox",
12372
- "ComboItems": "Default DHCP Google Cloudflare Cloudflare_Malware Cloudflare_Malware_Adult Level3 Open_DNS Quad9"
12386
+ "ComboItems": "Default DHCP Google Cloudflare Cloudflare_Malware Cloudflare_Malware_Adult Open_DNS Quad9 AdGuard_Ads_Trackers AdGuard_Ads_Trackers_Malware_Adult "
12373
12387
},
12374
12388
"WPFTweaksbutton": {
12375
12389
"Content": "Run Tweaks",
@@ -14747,9 +14761,10 @@ $inputXML = '<Window x:Class="WinUtility.MainWindow"
14747
14761
<ComboBoxItem Content="Cloudflare" FontSize="{FontSize}"/>
14748
14762
<ComboBoxItem Content="Cloudflare_Malware" FontSize="{FontSize}"/>
14749
14763
<ComboBoxItem Content="Cloudflare_Malware_Adult" FontSize="{FontSize}"/>
14750
- <ComboBoxItem Content="Level3" FontSize="{FontSize}"/>
14751
14764
<ComboBoxItem Content="Open_DNS" FontSize="{FontSize}"/>
14752
14765
<ComboBoxItem Content="Quad9" FontSize="{FontSize}"/>
14766
+ <ComboBoxItem Content="AdGuard_Ads_Trackers" FontSize="{FontSize}"/>
14767
+ <ComboBoxItem Content="AdGuard_Ads_Trackers_Malware_Adult" FontSize="{FontSize}"/>
14753
14768
</ComboBox>
14754
14769
</StackPanel>
14755
14770
<Button Name="WPFTweaksbutton" Content="Run Tweaks" HorizontalAlignment="Left" Margin="5" Padding="20,5" />
0 commit comments