mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-02-17 16:06:59 +00:00
Compare commits
20 Commits
2026.02.01
...
2026.02.07
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8c2c6ddd7 | ||
|
|
1ea2c63522 | ||
|
|
675882cb3b | ||
|
|
ae4d19f59c | ||
|
|
327f4ee7ab | ||
|
|
3af62159a5 | ||
|
|
6e65a07184 | ||
|
|
84bff3ab0c | ||
|
|
46deca7703 | ||
|
|
6a3f244f9b | ||
|
|
75d783cc63 | ||
|
|
afdb66b5d4 | ||
|
|
6a1a091a87 | ||
|
|
1ef8992320 | ||
|
|
59d0e83238 | ||
|
|
482161fdd8 | ||
|
|
91f3dbf5e6 | ||
|
|
57f5e1c632 | ||
|
|
95e844923e | ||
|
|
c6e3edbe40 |
@@ -1,14 +1,15 @@
|
|||||||
{
|
{
|
||||||
"Version": "1.0",
|
"Version": "1.0",
|
||||||
"Categories": [
|
"Categories": [
|
||||||
"Start Menu",
|
|
||||||
"System",
|
|
||||||
"Privacy & Suggested Content",
|
"Privacy & Suggested Content",
|
||||||
|
"System",
|
||||||
|
"Start Menu",
|
||||||
|
"AI",
|
||||||
|
"Windows Update",
|
||||||
"Taskbar",
|
"Taskbar",
|
||||||
"Appearance",
|
"Appearance",
|
||||||
"AI",
|
|
||||||
"Other",
|
|
||||||
"File Explorer",
|
"File Explorer",
|
||||||
|
"Other",
|
||||||
"Gaming"
|
"Gaming"
|
||||||
],
|
],
|
||||||
"UiGroups": [
|
"UiGroups": [
|
||||||
@@ -186,11 +187,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"FeatureId": "DisableSuggestions",
|
"FeatureId": "DisableSuggestions",
|
||||||
"Label": "tips, tricks & suggested content",
|
"Label": "tips, tricks & suggested content throughout Windows",
|
||||||
"Category": "Privacy & Suggested Content",
|
"Category": "Privacy & Suggested Content",
|
||||||
"Action": "Disable",
|
"Action": "Disable",
|
||||||
"RegistryKey": "Disable_Windows_Suggestions.reg",
|
"RegistryKey": "Disable_Windows_Suggestions.reg",
|
||||||
"ApplyText": "> Disabling tips, tricks, suggestions and ads across Windows...",
|
"ApplyText": "> Disabling tips, tricks, suggestions and ads throughout Windows...",
|
||||||
"UndoAction": "Enable",
|
"UndoAction": "Enable",
|
||||||
"RegistryUndoKey": "Enable_Windows_Suggestions.reg",
|
"RegistryUndoKey": "Enable_Windows_Suggestions.reg",
|
||||||
"MinVersion": null,
|
"MinVersion": null,
|
||||||
@@ -350,7 +351,7 @@
|
|||||||
"UndoAction": "Show",
|
"UndoAction": "Show",
|
||||||
"RegistryUndoKey": "Enable_Start_Recommended.reg",
|
"RegistryUndoKey": "Enable_Start_Recommended.reg",
|
||||||
"MinVersion": 22621,
|
"MinVersion": 22621,
|
||||||
"MaxVersion": 26199
|
"MaxVersion": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"FeatureId": "DisableBing",
|
"FeatureId": "DisableBing",
|
||||||
@@ -608,6 +609,18 @@
|
|||||||
"MinVersion": null,
|
"MinVersion": null,
|
||||||
"MaxVersion": null
|
"MaxVersion": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"FeatureId": "DisableBitlockerAutoEncryption",
|
||||||
|
"Label": "BitLocker automatic device encryption",
|
||||||
|
"Category": "System",
|
||||||
|
"Action": "Disable",
|
||||||
|
"RegistryKey": "Disable_Bitlocker_Auto_Encryption.reg",
|
||||||
|
"ApplyText": "> Disabling BitLocker automatic device encryption...",
|
||||||
|
"UndoAction": "Enable",
|
||||||
|
"RegistryUndoKey": "Enable_Bitlocker_Auto_Encryption.reg",
|
||||||
|
"MinVersion": 22000,
|
||||||
|
"MaxVersion": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"FeatureId": "DisableModernStandbyNetworking",
|
"FeatureId": "DisableModernStandbyNetworking",
|
||||||
"Label": "Modern Standby network connectivity",
|
"Label": "Modern Standby network connectivity",
|
||||||
@@ -898,6 +911,42 @@
|
|||||||
"MinVersion": null,
|
"MinVersion": null,
|
||||||
"MaxVersion": null
|
"MaxVersion": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"FeatureId": "DisableUpdateASAP",
|
||||||
|
"Label": "updates as soon as they're available",
|
||||||
|
"Category": "Windows Update",
|
||||||
|
"Action": "Prevent getting",
|
||||||
|
"RegistryKey": "Disable_Update_ASAP.reg",
|
||||||
|
"ApplyText": "> Preventing Windows from getting updates as soon as they are available...",
|
||||||
|
"UndoAction": "Get",
|
||||||
|
"RegistryUndoKey": "Enable_Update_ASAP.reg",
|
||||||
|
"MinVersion": null,
|
||||||
|
"MaxVersion": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"FeatureId": "PreventUpdateAutoReboot",
|
||||||
|
"Label": "automatic restarts after updates while signed in",
|
||||||
|
"Category": "Windows Update",
|
||||||
|
"Action": "Prevent",
|
||||||
|
"RegistryKey": "Prevent_Auto_Reboot.reg",
|
||||||
|
"ApplyText": "> Preventing automatic restarts after updates while signed in...",
|
||||||
|
"UndoAction": "Allow",
|
||||||
|
"RegistryUndoKey": "Allow_Auto_Reboot.reg",
|
||||||
|
"MinVersion": null,
|
||||||
|
"MaxVersion": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"FeatureId": "DisableDeliveryOptimization",
|
||||||
|
"Label": "sharing downloaded updates with other PCs",
|
||||||
|
"Category": "Windows Update",
|
||||||
|
"Action": "Disable",
|
||||||
|
"RegistryKey": "Disable_Delivery_Optimization.reg",
|
||||||
|
"ApplyText": "> Disabling sharing of downloaded updates with other PCs...",
|
||||||
|
"UndoAction": "Enable",
|
||||||
|
"RegistryUndoKey": "Enable_Delivery_Optimization.reg",
|
||||||
|
"MinVersion": null,
|
||||||
|
"MaxVersion": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"FeatureId": "ForceRemoveEdge",
|
"FeatureId": "ForceRemoveEdge",
|
||||||
"Label": "Forcefully uninstall Microsoft Edge. NOT RECOMMENDED!",
|
"Label": "Forcefully uninstall Microsoft Edge. NOT RECOMMENDED!",
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 486 KiB After Width: | Height: | Size: 82 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 287 KiB |
@@ -227,7 +227,7 @@
|
|||||||
Margin="12,0,0,0"
|
Margin="12,0,0,0"
|
||||||
FontSize="12"/>
|
FontSize="12"/>
|
||||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||||
<Button x:Name="CloseBtn" Content="" Style="{StaticResource CloseButton}" ToolTip="Close" IsCancel="True"/>
|
<Button x:Name="CloseBtn" Content="" Style="{StaticResource CloseButton}" ToolTip="Close" IsCancel="True" AutomationProperties.Name="Close"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
@@ -250,7 +250,7 @@
|
|||||||
Margin="0,0,0,10"/>
|
Margin="0,0,0,10"/>
|
||||||
|
|
||||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,0,0,8">
|
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,0,0,8">
|
||||||
<CheckBox x:Name="CheckAllBox" Content="Check/Uncheck all" Margin="8,0,15,0" Foreground="{DynamicResource FgColor}"/>
|
<CheckBox x:Name="CheckAllBox" Content="Check/Uncheck all" Margin="8,0,15,0" Foreground="{DynamicResource FgColor}" AutomationProperties.Name="Check or Uncheck all"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<Border Grid.Row="2" BorderBrush="{DynamicResource BorderColor}" CornerRadius="4" BorderThickness="1" Margin="0,0,0,10" Background="{DynamicResource CardBgColor}">
|
<Border Grid.Row="2" BorderBrush="{DynamicResource BorderColor}" CornerRadius="4" BorderThickness="1" Margin="0,0,0,10" Background="{DynamicResource CardBgColor}">
|
||||||
@@ -266,10 +266,10 @@
|
|||||||
|
|
||||||
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right">
|
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
<Grid Margin="0,8,10,10">
|
<Grid Margin="0,8,10,10">
|
||||||
<CheckBox x:Name="OnlyInstalledBox" Content="Only show installed apps" Foreground="{DynamicResource FgColor}" />
|
<CheckBox x:Name="OnlyInstalledBox" Content="Only show installed apps" Foreground="{DynamicResource FgColor}" AutomationProperties.Name="Only show installed apps"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Button x:Name="ConfirmBtn" Width="80" Height="32" Margin="0,0,10,0" Content="Confirm" Style="{StaticResource Win11Button}"/>
|
<Button x:Name="ConfirmBtn" Width="80" Height="32" Margin="0,0,10,0" Content="Confirm" Style="{StaticResource Win11Button}" AutomationProperties.Name="Confirm"/>
|
||||||
<Button x:Name="CancelBtn" Width="80" Height="32" Content="Cancel" Style="{StaticResource Win11ButtonSecondary}" IsCancel="True"/>
|
<Button x:Name="CancelBtn" Width="80" Height="32" Content="Cancel" Style="{StaticResource Win11ButtonSecondary}" IsCancel="True" AutomationProperties.Name="Cancel"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
Title="Win11Debloat"
|
Title="Win11Debloat"
|
||||||
Width="1024" Height="768"
|
MinWidth="1024" MinHeight="600"
|
||||||
ResizeMode="NoResize"
|
MaxWidth="1280"
|
||||||
|
ResizeMode="CanResize"
|
||||||
SnapsToDevicePixels="True"
|
SnapsToDevicePixels="True"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
WindowStyle="None"
|
WindowStyle="None"
|
||||||
@@ -53,7 +54,7 @@
|
|||||||
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
|
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
|
||||||
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
<Setter Property="Margin" Value="0,4,0,8"/>
|
<Setter Property="Margin" Value="0,4,0,12"/>
|
||||||
<Setter Property="MinHeight" Value="33"/>
|
<Setter Property="MinHeight" Value="33"/>
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
@@ -158,6 +159,13 @@
|
|||||||
<Trigger Property="SelectedIndex" Value="-1">
|
<Trigger Property="SelectedIndex" Value="-1">
|
||||||
<Setter TargetName="ClosedAccentLine" Property="Visibility" Value="Collapsed"/>
|
<Setter TargetName="ClosedAccentLine" Property="Visibility" Value="Collapsed"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter TargetName="ClosedAccentLine" Property="Visibility" Value="Collapsed"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonDisabled}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonTextDisabled}"/>
|
||||||
|
<Setter Property="Opacity" Value="0.6"/>
|
||||||
|
</Trigger>
|
||||||
</ControlTemplate.Triggers>
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
@@ -212,7 +220,16 @@
|
|||||||
<Style x:Key="LabelStyle" TargetType="TextBlock">
|
<Style x:Key="LabelStyle" TargetType="TextBlock">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
|
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
|
||||||
<Setter Property="FontSize" Value="12"/>
|
<Setter Property="FontSize" Value="12"/>
|
||||||
<Setter Property="Margin" Value="0,0,0,3"/>
|
<Setter Property="Margin" Value="0,0,0,2"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Label Border Style for ComboBox labels -->
|
||||||
|
<Style x:Key="LabelBorderStyle" TargetType="Border">
|
||||||
|
<Setter Property="CornerRadius" Value="4"/>
|
||||||
|
<Setter Property="Padding" Value="6,2"/>
|
||||||
|
<Setter Property="Margin" Value="-4,-2,-4,0"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Category card border style -->
|
<!-- Category card border style -->
|
||||||
@@ -221,28 +238,73 @@
|
|||||||
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
<Setter Property="CornerRadius" Value="4"/>
|
<Setter Property="CornerRadius" Value="4"/>
|
||||||
<Setter Property="Background" Value="{DynamicResource CardBgColor}"/>
|
<Setter Property="Background" Value="{DynamicResource CardBgColor}"/>
|
||||||
<Setter Property="Padding" Value="16,12"/>
|
<Setter Property="Padding" Value="16,12,16,2"/>
|
||||||
<Setter Property="Margin" Value="0,0,0,16"/>
|
<Setter Property="Margin" Value="0,0,0,16"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Category header text style -->
|
<!-- Category header text style -->
|
||||||
<Style x:Key="CategoryHeaderTextBlock" TargetType="TextBlock">
|
<Style x:Key="CategoryHeaderTextBlock" TargetType="TextBlock">
|
||||||
<Setter Property="FontWeight" Value="Bold"/>
|
<Setter Property="FontWeight" Value="Bold"/>
|
||||||
<Setter Property="FontSize" Value="15"/>
|
<Setter Property="FontSize" Value="16"/>
|
||||||
<Setter Property="Margin" Value="0,0,0,10"/>
|
<Setter Property="Margin" Value="0,0,0,10"/>
|
||||||
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
|
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<!-- Category help link button/text styles -->
|
||||||
|
<Style x:Key="CategoryHelpLinkButtonStyle" TargetType="Button">
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="Padding" Value="0"/>
|
||||||
|
<Setter Property="Margin" Value="6,1,0,10"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="IsTabStop" Value="False"/>
|
||||||
|
<Setter Property="Cursor" Value="Hand"/>
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonBg}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Button">
|
||||||
|
<Border Background="Transparent" BorderBrush="Transparent" BorderThickness="0">
|
||||||
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonHover}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonPressed}"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="CategoryHelpLinkTextStyle" TargetType="TextBlock">
|
||||||
|
<Setter Property="FontSize" Value="12"/>
|
||||||
|
<Setter Property="FontWeight" Value="Bold"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Foreground">
|
||||||
|
<Setter.Value>
|
||||||
|
<Binding RelativeSource="{RelativeSource AncestorType=Button}" Path="Foreground"/>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<!-- Overview changes text style -->
|
<!-- Overview changes text style -->
|
||||||
<Style x:Key="OverviewNoChangesTextStyle" TargetType="TextBlock">
|
<Style x:Key="OverviewNoChangesTextStyle" TargetType="TextBlock">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
|
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
|
||||||
<Setter Property="FontStyle" Value="Italic"/>
|
|
||||||
<Setter Property="Margin" Value="0,0,0,8"/>
|
<Setter Property="Margin" Value="0,0,0,8"/>
|
||||||
|
<Setter Property="FontSize" Value="12"/>
|
||||||
|
<Setter Property="FontStyle" Value="Italic"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="OverviewChangeBulletStyle" TargetType="TextBlock">
|
<Style x:Key="OverviewChangeBulletStyle" TargetType="TextBlock">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
|
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
|
||||||
<Setter Property="Margin" Value="0,0,0,8"/>
|
<Setter Property="Margin" Value="0,0,0,8"/>
|
||||||
|
<Setter Property="FontSize" Value="12"/>
|
||||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@@ -251,6 +313,41 @@
|
|||||||
<Setter Property="CaretBrush" Value="{DynamicResource FgColor}"/>
|
<Setter Property="CaretBrush" Value="{DynamicResource FgColor}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<!-- User TextBox Style with disabled state -->
|
||||||
|
<Style x:Key="UserTextBoxStyle" TargetType="TextBox">
|
||||||
|
<Setter Property="CaretBrush" Value="{DynamicResource FgColor}"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="FontSize" Value="13"/>
|
||||||
|
<Setter Property="Margin" Value="1,0,0,1"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Padding" Value="0"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonDisabled}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonTextDisabled}"/>
|
||||||
|
<Setter Property="Opacity" Value="0.6"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- User TextBox Border Style with disabled state -->
|
||||||
|
<Style x:Key="UserTextBoxBorderStyle" TargetType="Border">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderColor}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="CornerRadius" Value="4"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ComboBgColor}"/>
|
||||||
|
<Setter Property="Padding" Value="8,6"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonDisabled}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
|
||||||
|
<Setter Property="Opacity" Value="0.6"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<!-- CheckBox Style -->
|
<!-- CheckBox Style -->
|
||||||
<Style TargetType="CheckBox">
|
<Style TargetType="CheckBox">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
|
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
|
||||||
@@ -268,7 +365,7 @@
|
|||||||
<Border x:Name="CheckBoxBorder" Grid.Column="0" Width="18" Height="18" Background="{DynamicResource CheckBoxBgColor}" BorderBrush="{DynamicResource CheckBoxBorderColor}" BorderThickness="1" CornerRadius="4" Margin="0,0,8,0">
|
<Border x:Name="CheckBoxBorder" Grid.Column="0" Width="18" Height="18" Background="{DynamicResource CheckBoxBgColor}" BorderBrush="{DynamicResource CheckBoxBorderColor}" BorderThickness="1" CornerRadius="4" Margin="0,0,8,0">
|
||||||
<TextBlock x:Name="CheckMark" Text="" FontFamily="Segoe MDL2 Assets" FontSize="12" Foreground="{DynamicResource ButtonBg}" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed"/>
|
<TextBlock x:Name="CheckMark" Text="" FontFamily="Segoe MDL2 Assets" FontSize="12" Foreground="{DynamicResource ButtonBg}" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed"/>
|
||||||
</Border>
|
</Border>
|
||||||
<ContentPresenter Grid.Column="1" VerticalAlignment="Center" Margin="0,0,0,1"/>
|
<ContentPresenter Grid.Column="1" VerticalAlignment="Center" Margin="0,0,0,2"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
@@ -281,6 +378,13 @@
|
|||||||
<Setter TargetName="CheckBoxBorder" Property="BorderBrush" Value="{DynamicResource ButtonBg}"/>
|
<Setter TargetName="CheckBoxBorder" Property="BorderBrush" Value="{DynamicResource ButtonBg}"/>
|
||||||
<Setter TargetName="CheckMark" Property="Foreground" Value="White"/>
|
<Setter TargetName="CheckMark" Property="Foreground" Value="White"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter TargetName="CheckBoxBorder" Property="Background" Value="{DynamicResource ButtonDisabled}"/>
|
||||||
|
<Setter TargetName="CheckBoxBorder" Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonTextDisabled}"/>
|
||||||
|
<Setter Property="Opacity" Value="0.6"/>
|
||||||
|
<Setter TargetName="CheckMark" Property="Foreground" Value="{DynamicResource ButtonTextDisabled}"/>
|
||||||
|
</Trigger>
|
||||||
<MultiTrigger>
|
<MultiTrigger>
|
||||||
<MultiTrigger.Conditions>
|
<MultiTrigger.Conditions>
|
||||||
<Condition Property="IsMouseOver" Value="True"/>
|
<Condition Property="IsMouseOver" Value="True"/>
|
||||||
@@ -297,8 +401,8 @@
|
|||||||
|
|
||||||
<!-- CheckBox style for feature toggles -->
|
<!-- CheckBox style for feature toggles -->
|
||||||
<Style x:Key="FeatureCheckboxStyle" TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
|
<Style x:Key="FeatureCheckboxStyle" TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
|
||||||
<Setter Property="Margin" Value="0,0,0,10"/>
|
<Setter Property="Margin" Value="-4,-2,-4,10"/>
|
||||||
<Setter Property="Padding" Value="0,2"/>
|
<Setter Property="Padding" Value="4,2"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- CheckBox style for apps panels -->
|
<!-- CheckBox style for apps panels -->
|
||||||
@@ -429,6 +533,21 @@
|
|||||||
</Trigger>
|
</Trigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<!-- SearchBox Border Style -->
|
||||||
|
<Style x:Key="SearchBoxBorderStyle" TargetType="Border">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ComboBgColor}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderColor}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="CornerRadius" Value="4"/>
|
||||||
|
<Setter Property="Width" Value="300"/>
|
||||||
|
<Setter Property="Padding" Value="8,6"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ComboHoverColor}"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
|
|
||||||
<Border BorderBrush="{DynamicResource BorderColor}"
|
<Border BorderBrush="{DynamicResource BorderColor}"
|
||||||
@@ -442,6 +561,16 @@
|
|||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!-- Resize Borders -->
|
||||||
|
<Rectangle x:Name="ResizeLeft" Width="5" HorizontalAlignment="Left" Fill="Transparent" Cursor="SizeWE" Grid.Row="0" Grid.RowSpan="3" Panel.ZIndex="100"/>
|
||||||
|
<Rectangle x:Name="ResizeRight" Width="5" HorizontalAlignment="Right" Fill="Transparent" Cursor="SizeWE" Grid.Row="0" Grid.RowSpan="3" Panel.ZIndex="100"/>
|
||||||
|
<Rectangle x:Name="ResizeTop" Height="5" VerticalAlignment="Top" Fill="Transparent" Cursor="SizeNS" Grid.Row="0" Panel.ZIndex="100"/>
|
||||||
|
<Rectangle x:Name="ResizeBottom" Height="5" VerticalAlignment="Bottom" Fill="Transparent" Cursor="SizeNS" Grid.Row="2" Panel.ZIndex="100"/>
|
||||||
|
<Rectangle x:Name="ResizeTopLeft" Width="8" Height="8" HorizontalAlignment="Left" VerticalAlignment="Top" Fill="Transparent" Cursor="SizeNWSE" Grid.Row="0" Panel.ZIndex="101"/>
|
||||||
|
<Rectangle x:Name="ResizeTopRight" Width="8" Height="8" HorizontalAlignment="Right" VerticalAlignment="Top" Fill="Transparent" Cursor="SizeNESW" Grid.Row="0" Panel.ZIndex="101"/>
|
||||||
|
<Rectangle x:Name="ResizeBottomLeft" Width="8" Height="8" HorizontalAlignment="Left" VerticalAlignment="Bottom" Fill="Transparent" Cursor="SizeNESW" Grid.Row="2" Panel.ZIndex="101"/>
|
||||||
|
<Rectangle x:Name="ResizeBottomRight" Width="8" Height="8" HorizontalAlignment="Right" VerticalAlignment="Bottom" Fill="Transparent" Cursor="SizeNWSE" Grid.Row="2" Panel.ZIndex="101"/>
|
||||||
|
|
||||||
<!-- Custom Title Bar -->
|
<!-- Custom Title Bar -->
|
||||||
<Grid Grid.Row="0" x:Name="TitleBar">
|
<Grid Grid.Row="0" x:Name="TitleBar">
|
||||||
<Border Background="{DynamicResource BgColor}" CornerRadius="8,8,0,0">
|
<Border Background="{DynamicResource BgColor}" CornerRadius="8,8,0,0">
|
||||||
@@ -457,8 +586,8 @@
|
|||||||
Margin="12,0,0,0"
|
Margin="12,0,0,0"
|
||||||
FontSize="12"/>
|
FontSize="12"/>
|
||||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||||
<Button x:Name="HelpBtn" Content="?" FontFamily="Segoe UI" FontSize="15" Style="{StaticResource HelpButton}" ToolTip="Open Wiki"/>
|
<Button x:Name="HelpBtn" Content="?" FontFamily="Segoe UI" FontSize="15" Style="{StaticResource HelpButton}" ToolTip="Open Wiki" AutomationProperties.Name="Open Wiki"/>
|
||||||
<Button x:Name="CloseBtn" Content="" Style="{StaticResource CloseButton}" ToolTip="Close"/>
|
<Button x:Name="CloseBtn" Content="" Style="{StaticResource CloseButton}" ToolTip="Close" AutomationProperties.Name="Close"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
@@ -525,10 +654,9 @@
|
|||||||
</TextBlock>
|
</TextBlock>
|
||||||
|
|
||||||
<!-- Start Button -->
|
<!-- Start Button -->
|
||||||
<Button x:Name="HomeStartBtn" Width="200" Height="48" Style="{StaticResource Win11Button}" HorizontalAlignment="Center" Margin="0,50,0,0">
|
<Button x:Name="HomeStartBtn" Width="125" Height="53" Style="{StaticResource Win11Button}" HorizontalAlignment="Center" Margin="0,20,0,0" AutomationProperties.Name="Start">
|
||||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||||
<TextBlock Text="Start" VerticalAlignment="Center" FontSize="20" Margin="0,0,0,2"/>
|
<TextBlock Text="Start" FontWeight="SemiBold" VerticalAlignment="Center" FontSize="24" Margin="0,0,0,3"/>
|
||||||
<TextBlock Text="" FontFamily="Segoe MDL2 Assets" FontSize="16" Margin="8,0,0,0" VerticalAlignment="Center"/>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@@ -549,19 +677,28 @@
|
|||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="10"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Grid.Column="0">
|
<StackPanel Orientation="Horizontal" Grid.Column="0">
|
||||||
<Button x:Name="DefaultAppsBtn" Content="Select Default Apps" ToolTip="Select the default selection of apps" Style="{StaticResource Win11ButtonSecondary}" Height="32" Padding="10,0" Margin="0,0,10,0"/>
|
<Button x:Name="DefaultAppsBtn" Content="Select Default Apps" ToolTip="Select the default selection of apps" Style="{StaticResource Win11ButtonSecondary}" Height="32" Padding="10,0" Margin="0,0,10,0" AutomationProperties.Name="Select Default Apps"/>
|
||||||
<Button x:Name="LoadLastUsedAppsBtn" Content="Select Last Used Selection" ToolTip="Select the apps that were selected the last time Win11Debloat was run" Style="{StaticResource Win11ButtonSecondary}" Height="32" Padding="10,0" Margin="0,0,10,0"/>
|
<Button x:Name="LoadLastUsedAppsBtn" Content="Select Last Used Selection" ToolTip="Select the apps that were selected the last time Win11Debloat was run" Style="{StaticResource Win11ButtonSecondary}" Height="32" Padding="10,0" Margin="0,0,10,0" AutomationProperties.Name="Select Last Used Selection"/>
|
||||||
<Button x:Name="ClearAppSelectionBtn" Content="Clear Selection" ToolTip="Clear all selected apps" Style="{StaticResource Win11ButtonSecondary}" Height="32" Padding="10,0" Margin="0,0,10,0"/>
|
<Button x:Name="ClearAppSelectionBtn" Content="Clear Selection" ToolTip="Clear all selected apps" Style="{StaticResource Win11ButtonSecondary}" Height="32" Padding="10,0" Margin="0,0,10,0" AutomationProperties.Name="Clear Selection"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<CheckBox x:Name="OnlyInstalledAppsBox" Grid.Column="2" Content="Only show installed apps" IsChecked="False" Foreground="{DynamicResource FgColor}" VerticalAlignment="Center"/>
|
<CheckBox x:Name="OnlyInstalledAppsBox" Grid.Column="2" Content="Only show installed apps" IsChecked="False" Foreground="{DynamicResource FgColor}" VerticalAlignment="Center" AutomationProperties.Name="Only show installed apps"/>
|
||||||
|
|
||||||
<Border Grid.Column="4" BorderBrush="{DynamicResource ButtonBorderColor}" BorderThickness="1" CornerRadius="4" Background="{DynamicResource ComboBgColor}" Width="300" Padding="8,6">
|
<Border x:Name="AppSearchBorder" Grid.Column="4">
|
||||||
|
<Border.Style>
|
||||||
|
<Style TargetType="Border" BasedOn="{StaticResource SearchBoxBorderStyle}">
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding ElementName=AppSearchBox, Path=IsFocused}" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryButtonHover}"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Border.Style>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
@@ -569,16 +706,20 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Grid.Column="0" Text="" FontFamily="Segoe MDL2 Assets" FontSize="14" VerticalAlignment="Center" Margin="4,0,8,0" Foreground="{DynamicResource FgColor}"/>
|
<TextBlock Grid.Column="0" Text="" FontFamily="Segoe MDL2 Assets" FontSize="14" VerticalAlignment="Center" Margin="4,0,8,0" Foreground="{DynamicResource FgColor}"/>
|
||||||
<TextBlock x:Name="AppSearchPlaceholder" Grid.Column="1" Text="Search app" Foreground="{DynamicResource FgColor}" Opacity="0.5" FontSize="13" Margin="3,0,0,1" VerticalAlignment="Center" IsHitTestVisible="False"/>
|
<TextBlock x:Name="AppSearchPlaceholder" Grid.Column="1" Text="Search app" Foreground="{DynamicResource FgColor}" Opacity="0.5" FontSize="13" Margin="3,0,0,1" VerticalAlignment="Center" IsHitTestVisible="False"/>
|
||||||
<TextBox x:Name="AppSearchBox" Grid.Column="1" Background="Transparent" Foreground="{DynamicResource FgColor}" BorderThickness="0" FontSize="13" Margin="1,0,0,1" VerticalAlignment="Center" Text=""/>
|
<TextBox x:Name="AppSearchBox" Grid.Column="1" Background="Transparent" Foreground="{DynamicResource FgColor}" BorderThickness="0" FontSize="13" Margin="1,0,0,1" VerticalAlignment="Center" Text="" AutomationProperties.Name="Search app"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" Padding="20,0">
|
<Grid>
|
||||||
<StackPanel>
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- Apps List -->
|
<!-- Apps List -->
|
||||||
<Border BorderBrush="{DynamicResource BorderColor}" CornerRadius="4" BorderThickness="1" Margin="0,0,0,10" Background="{DynamicResource CardBgColor}" Height="510">
|
<Border Grid.Row="0" BorderBrush="{DynamicResource BorderColor}" CornerRadius="4" BorderThickness="1" Margin="20,0,20,10" Background="{DynamicResource CardBgColor}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||||
<StackPanel x:Name="AppSelectionPanel" Margin="8"/>
|
<StackPanel x:Name="AppSelectionPanel" Margin="8"/>
|
||||||
@@ -590,11 +731,10 @@
|
|||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Status Info -->
|
<!-- Status Info -->
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="20,0,20,0">
|
||||||
<TextBlock x:Name="AppSelectionStatus" Text="" Foreground="{DynamicResource FgColor}" Margin="10,0,0,0" HorizontalAlignment="Left"/>
|
<TextBlock x:Name="AppSelectionStatus" Text="" Foreground="{DynamicResource FgColor}" Margin="10,0,0,5" HorizontalAlignment="Left"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</Grid>
|
||||||
</ScrollViewer>
|
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
@@ -608,17 +748,44 @@
|
|||||||
|
|
||||||
<!-- Filter Options -->
|
<!-- Filter Options -->
|
||||||
<Grid Margin="0,0,0,12">
|
<Grid Margin="0,0,0,12">
|
||||||
<StackPanel Orientation="Horizontal">
|
<Grid.ColumnDefinitions>
|
||||||
<Button x:Name="LoadDefaultsBtn" Content="Select Default Settings" ToolTip="Select the settings that are recommended for most people" Style="{StaticResource Win11ButtonSecondary}" Padding="10,0" Height="32" Margin="0,0,10,0"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<Button x:Name="LoadLastUsedBtn" Content="Select Last Used Settings" ToolTip="Select the settings that were used the last time Win11Debloat was run" Style="{StaticResource Win11ButtonSecondary}" Padding="10,0" Height="32" Margin="0,0,10,0"/>
|
<ColumnDefinition Width="*"/>
|
||||||
<Button x:Name="ClearAllTweaksBtn" Content="Clear Selection" ToolTip="Clear all selected tweaks" Style="{StaticResource Win11ButtonSecondary}" Padding="10,0" Height="32" Margin="0,0,10,0"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
||||||
|
<Button x:Name="LoadDefaultsBtn" Content="Select Default Settings" ToolTip="Select the settings that are recommended for most people" Style="{StaticResource Win11ButtonSecondary}" Padding="10,0" Height="32" Margin="0,0,10,0" AutomationProperties.Name="Select Default Settings"/>
|
||||||
|
<Button x:Name="LoadLastUsedBtn" Content="Select Last Used Settings" ToolTip="Select the settings that were used the last time Win11Debloat was run" Style="{StaticResource Win11ButtonSecondary}" Padding="10,0" Height="32" Margin="0,0,10,0" AutomationProperties.Name="Select Last Used Settings"/>
|
||||||
|
<Button x:Name="ClearAllTweaksBtn" Content="Clear Selection" ToolTip="Clear all selected tweaks" Style="{StaticResource Win11ButtonSecondary}" Padding="10,0" Height="32" Margin="0,0,10,0" AutomationProperties.Name="Clear Selection"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
<Border x:Name="TweakSearchBorder" Grid.Column="2">
|
||||||
|
<Border.Style>
|
||||||
|
<Style TargetType="Border" BasedOn="{StaticResource SearchBoxBorderStyle}">
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding ElementName=TweakSearchBox, Path=IsFocused}" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryButtonHover}"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Border.Style>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Grid.Column="0" Text="" FontFamily="Segoe MDL2 Assets" FontSize="14" VerticalAlignment="Center" Margin="4,0,8,0" Foreground="{DynamicResource FgColor}"/>
|
||||||
|
<TextBlock x:Name="TweakSearchPlaceholder" Grid.Column="1" Text="Search setting" Foreground="{DynamicResource FgColor}" Opacity="0.5" FontSize="13" Margin="3,0,0,1" VerticalAlignment="Center" IsHitTestVisible="False"/>
|
||||||
|
<TextBox x:Name="TweakSearchBox" Grid.Column="1" Background="Transparent" Foreground="{DynamicResource FgColor}" BorderThickness="0" FontSize="13" Margin="1,0,0,1" VerticalAlignment="Center" Text=""/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
<Grid>
|
<Grid>
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" Margin="0,-20,0,0" Padding="20,10,20,0">
|
<ScrollViewer x:Name="TweaksScrollViewer" VerticalScrollBarVisibility="Auto" Margin="0,-20,0,0" Padding="20,10,20,0">
|
||||||
<Grid Margin="0,10,0,5">
|
<Grid x:Name="TweaksGrid" Margin="0,10,0,5">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
@@ -670,18 +837,27 @@
|
|||||||
<Grid>
|
<Grid>
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" Margin="0,-20,0,0" Padding="20,10,20,0">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" Margin="0,-20,0,0" Padding="20,10,20,0">
|
||||||
<StackPanel Margin="0,10,0,5">
|
<StackPanel Margin="0,10,0,5">
|
||||||
<!-- Apply Changes To -->
|
<!-- Selected Changes -->
|
||||||
<Border BorderBrush="{DynamicResource BorderColor}" BorderThickness="1" CornerRadius="4" Background="{DynamicResource CardBgColor}" Padding="20" Margin="0,0,0,16">
|
<Border BorderBrush="{DynamicResource BorderColor}" BorderThickness="1" CornerRadius="4" Background="{DynamicResource CardBgColor}" Padding="16,12,16,4" Margin="0,0,0,16">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Text="Apply Changes To" FontWeight="Bold" FontSize="14" Foreground="{DynamicResource FgColor}" Margin="0,0,0,8"/>
|
<TextBlock Text="Selected Changes" Style="{StaticResource CategoryHeaderTextBlock}"/>
|
||||||
<ComboBox x:Name="UserSelectionCombo" Margin="0,0,0,12">
|
<StackPanel x:Name="OverviewChangesPanel"/>
|
||||||
|
<StackPanel Margin="0,0,0,3"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- Apply Changes To -->
|
||||||
|
<Border BorderBrush="{DynamicResource BorderColor}" BorderThickness="1" CornerRadius="4" Background="{DynamicResource CardBgColor}" Padding="16,12" Margin="0,0,0,16">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Text="Apply Changes To" Style="{StaticResource CategoryHeaderTextBlock}"/>
|
||||||
|
<ComboBox x:Name="UserSelectionCombo" Margin="0,0,0,6" AutomationProperties.Name="Apply Changes To">
|
||||||
<ComboBoxItem Content="Current User" IsSelected="True"/>
|
<ComboBoxItem Content="Current User" IsSelected="True"/>
|
||||||
<ComboBoxItem Content="Other User"/>
|
<ComboBoxItem Content="Other User"/>
|
||||||
<ComboBoxItem Content="Windows Default User (Sysprep)"/>
|
<ComboBoxItem Content="Windows Default User (Sysprep)"/>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<StackPanel x:Name="OtherUserPanel" Visibility="Collapsed" Margin="0,0,0,12">
|
<StackPanel x:Name="OtherUserPanel" Visibility="Collapsed" Margin="0,0,0,6">
|
||||||
<TextBlock x:Name="UsernameValidationMessage" Text="" FontStyle="Italic" Foreground="{DynamicResource CloseHover}" FontSize="11" Margin="3,0,0,4" TextWrapping="Wrap"/>
|
<TextBlock x:Name="UsernameValidationMessage" Text="" FontStyle="Italic" Foreground="{DynamicResource CloseHover}" FontSize="11" Margin="3,0,0,4" TextWrapping="Wrap"/>
|
||||||
<Border BorderBrush="{DynamicResource ButtonBorderColor}" BorderThickness="1" CornerRadius="4" Background="{DynamicResource ComboBgColor}" Padding="8,6">
|
<Border Style="{StaticResource UserTextBoxBorderStyle}" IsEnabled="{Binding ElementName=OtherUsernameTextBox, Path=IsEnabled}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
@@ -689,36 +865,36 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Grid.Column="0" Text="" FontFamily="Segoe MDL2 Assets" FontSize="14" VerticalAlignment="Center" Margin="4,0,8,0" Foreground="{DynamicResource FgColor}"/>
|
<TextBlock Grid.Column="0" Text="" FontFamily="Segoe MDL2 Assets" FontSize="14" VerticalAlignment="Center" Margin="4,0,8,0" Foreground="{DynamicResource FgColor}"/>
|
||||||
<TextBlock x:Name="UsernameTextBoxPlaceholder" Grid.Column="1" Text="Enter username" Foreground="{DynamicResource FgColor}" Opacity="0.5" FontSize="13" Margin="3,0,0,1" VerticalAlignment="Center" IsHitTestVisible="False"/>
|
<TextBlock x:Name="UsernameTextBoxPlaceholder" Grid.Column="1" Text="Enter username" Foreground="{DynamicResource FgColor}" Opacity="0.5" FontSize="13" Margin="3,0,0,1" VerticalAlignment="Center" IsHitTestVisible="False"/>
|
||||||
<TextBox x:Name="OtherUsernameTextBox" Grid.Column="1" Background="Transparent" Foreground="{DynamicResource FgColor}" BorderThickness="0" FontSize="13" Margin="1,0,0,1" VerticalAlignment="Center" Text="" Padding="0"/>
|
<TextBox x:Name="OtherUsernameTextBox" Grid.Column="1" Style="{StaticResource UserTextBoxStyle}" Text="" AutomationProperties.Name="Enter username"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock x:Name="UserSelectionDescription" Text="Changes will be applied to the currently logged-in user profile." Foreground="{DynamicResource FgColor}" FontSize="12" TextWrapping="Wrap"/>
|
<TextBlock x:Name="UserSelectionDescription" Text="Changes will be applied to the currently logged-in user profile." Foreground="{DynamicResource FgColor}" FontSize="12" TextWrapping="Wrap" Margin="0,6,0,3"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Selected Changes -->
|
<!-- Options -->
|
||||||
<Border BorderBrush="{DynamicResource BorderColor}" BorderThickness="1" CornerRadius="4" Background="{DynamicResource CardBgColor}" Padding="16,12" Margin="0,0,0,16">
|
<Border BorderBrush="{DynamicResource BorderColor}" BorderThickness="1" CornerRadius="4" Background="{DynamicResource CardBgColor}" Padding="16,12,16,3" Margin="0,0,0,16">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Text="Selected Changes" FontWeight="Bold" FontSize="14" Foreground="{DynamicResource FgColor}" Margin="0,0,0,12"/>
|
<TextBlock Text="Options" Style="{StaticResource CategoryHeaderTextBlock}"/>
|
||||||
<StackPanel x:Name="OverviewChangesPanel"/>
|
|
||||||
</StackPanel>
|
<!-- Restore Point Option -->
|
||||||
</Border>
|
<StackPanel>
|
||||||
|
<CheckBox x:Name="RestorePointCheckBox" Style="{StaticResource FeatureCheckboxStyle}" Content="Create a system restore point (Recommended)" AutomationProperties.Name="Create a system restore point (Recommended)"/>
|
||||||
<!-- System Restore Point -->
|
</StackPanel>
|
||||||
<Border BorderBrush="{DynamicResource BorderColor}" BorderThickness="1" CornerRadius="4" Background="{DynamicResource CardBgColor}" Padding="16,12" Margin="0,0,0,16">
|
|
||||||
<StackPanel>
|
<!-- Restart Explorer Option -->
|
||||||
<TextBlock Text="System Restore Point" FontWeight="Bold" FontSize="14" Foreground="{DynamicResource FgColor}" Margin="0,0,0,8"/>
|
<StackPanel>
|
||||||
<TextBlock Text="A restore point will allow you to revert your system to a previous state using the built-in System Restore feature. (Recommended)" Foreground="{DynamicResource FgColor}" FontSize="12" Margin="0,0,0,10" TextWrapping="Wrap"/>
|
<CheckBox x:Name="RestartExplorerCheckBox" Style="{StaticResource FeatureCheckboxStyle}" Content="Restart the Windows Explorer process to apply all changes immediately" AutomationProperties.Name="Restart the Windows Explorer process to apply all changes immediately"/>
|
||||||
<CheckBox x:Name="RestorePointCheckBox" Content="Create system restore point" Foreground="{DynamicResource FgColor}"/>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Apply Changes Button -->
|
<!-- Apply Changes Button -->
|
||||||
<Button x:Name="OverviewApplyBtn" Style="{StaticResource Win11Button}" Padding="14,8" Margin="0,0,0,15" HorizontalAlignment="Center">
|
<Button x:Name="OverviewApplyBtn" Style="{StaticResource Win11Button}" Width="190" Height="44" Margin="0,0,0,15" HorizontalAlignment="Center" AutomationProperties.Name="Apply Changes">
|
||||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||||
<TextBlock Text="Apply Changes" VerticalAlignment="Center" FontSize="16" Margin="0,0,0,2"/>
|
<TextBlock Text="" FontFamily="Segoe MDL2 Assets" FontSize="20" FontWeight="SemiBold" VerticalAlignment="Center"/>
|
||||||
<TextBlock Text="" FontFamily="Segoe MDL2 Assets" FontSize="16" Margin="8,0,0,0" VerticalAlignment="Center"/>
|
<TextBlock Text="Apply Changes" VerticalAlignment="Center" FontSize="18" FontWeight="SemiBold" Margin="8,0,0,4"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@@ -756,15 +932,17 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<StackPanel Grid.Row="0" Margin="20,10,20,10">
|
<Border DockPanel.Dock="Top" Padding="20,10,20,0">
|
||||||
<TextBlock Text="Applying Changes" FontWeight="Bold" FontSize="20" Margin="0,0,0,10" Foreground="{DynamicResource FgColor}"/>
|
<StackPanel Grid.Row="0">
|
||||||
<TextBlock Text="Sit back and relax while Win11Debloat applies your selected changes" FontSize="13" Margin="0,0,0,10" Foreground="{DynamicResource FgColor}" TextWrapping="Wrap"/>
|
<TextBlock Text="Applying Changes" FontWeight="Bold" FontSize="20" Margin="0,0,0,5" Foreground="{DynamicResource FgColor}"/>
|
||||||
</StackPanel>
|
<TextBlock Text="Sit back and relax while Win11Debloat applies your selected changes" FontSize="13" Margin="0,0,0,20" Foreground="{DynamicResource FgColor}" TextWrapping="Wrap"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
<!-- Console Output -->
|
<!-- Console Output -->
|
||||||
<Border Grid.Row="1" BorderBrush="{DynamicResource BorderColor}" BorderThickness="1" CornerRadius="4" Background="#0C0C0C" Margin="20,0">
|
<Border Grid.Row="1" BorderBrush="{DynamicResource BorderColor}" BorderThickness="1" CornerRadius="4" Background="#0C0C0C" Margin="20,0">
|
||||||
<ScrollViewer x:Name="ConsoleScrollViewer" VerticalScrollBarVisibility="Auto" Padding="10">
|
<ScrollViewer x:Name="ConsoleScrollViewer" VerticalScrollBarVisibility="Auto" Padding="10">
|
||||||
<TextBlock x:Name="ConsoleOutput" FontFamily="Consolas" FontSize="12" Foreground="#CCCCCC" TextWrapping="Wrap" Text=""/>
|
<TextBlock x:Name="ConsoleOutput" FontFamily="Consolas" FontSize="12" Foreground="#CCCCCC" TextWrapping="Wrap" Text="" AutomationProperties.LiveSetting="Polite"/>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
@@ -778,7 +956,7 @@
|
|||||||
|
|
||||||
<!-- Status and Finish Button -->
|
<!-- Status and Finish Button -->
|
||||||
<StackPanel Grid.Row="1" HorizontalAlignment="Center">
|
<StackPanel Grid.Row="1" HorizontalAlignment="Center">
|
||||||
<Button x:Name="FinishBtn" Width="200" Height="48" Style="{StaticResource Win11Button}" Margin="0" IsEnabled="False">
|
<Button x:Name="FinishBtn" Width="200" Height="48" Style="{StaticResource Win11Button}" Margin="0" IsEnabled="False" AutomationProperties.Name="Finish">
|
||||||
<TextBlock x:Name="FinishBtnText" Text="Applying changes..." VerticalAlignment="Center" FontSize="16" Margin="0,0,0,1"/>
|
<TextBlock x:Name="FinishBtnText" Text="Applying changes..." VerticalAlignment="Center" FontSize="16" Margin="0,0,0,1"/>
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@@ -796,7 +974,7 @@
|
|||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button x:Name="PreviousBtn" Grid.Column="0" Width="120" Height="36" Style="{StaticResource Win11ButtonSecondary}" Visibility="Collapsed" Margin="10,0,0,0">
|
<Button x:Name="PreviousBtn" Grid.Column="0" Width="120" Height="36" Style="{StaticResource Win11ButtonSecondary}" Visibility="Collapsed" Margin="10,0,0,0" AutomationProperties.Name="Previous">
|
||||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||||
<TextBlock Text="" FontFamily="Segoe MDL2 Assets" FontSize="12" Margin="0,0,8,0" VerticalAlignment="Center"/>
|
<TextBlock Text="" FontFamily="Segoe MDL2 Assets" FontSize="12" Margin="0,0,8,0" VerticalAlignment="Center"/>
|
||||||
<TextBlock Text="Previous" VerticalAlignment="Center" FontSize="14" Margin="0,0,0,1"/>
|
<TextBlock Text="Previous" VerticalAlignment="Center" FontSize="14" Margin="0,0,0,1"/>
|
||||||
@@ -804,7 +982,7 @@
|
|||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right">
|
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
<Button x:Name="NextBtn" Width="120" Height="36" Margin="0,0,10,0" Style="{StaticResource Win11Button}">
|
<Button x:Name="NextBtn" Width="120" Height="36" Margin="0,0,10,0" Style="{StaticResource Win11Button}" AutomationProperties.Name="Next">
|
||||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||||
<TextBlock Text="Next" VerticalAlignment="Center" FontSize="14" Margin="0,0,0,1"/>
|
<TextBlock Text="Next" VerticalAlignment="Center" FontSize="14" Margin="0,0,0,1"/>
|
||||||
<TextBlock Text="" FontFamily="Segoe MDL2 Assets" FontSize="12" Margin="8,0,0,0" VerticalAlignment="Center"/>
|
<TextBlock Text="" FontFamily="Segoe MDL2 Assets" FontSize="12" Margin="8,0,0,0" VerticalAlignment="Center"/>
|
||||||
|
|||||||
14
Get.ps1
14
Get.ps1
@@ -23,7 +23,11 @@ param (
|
|||||||
[switch]$DisableGameBarIntegration,
|
[switch]$DisableGameBarIntegration,
|
||||||
[switch]$DisableTelemetry,
|
[switch]$DisableTelemetry,
|
||||||
[switch]$DisableFastStartup,
|
[switch]$DisableFastStartup,
|
||||||
|
[switch]$DisableBitlockerAutoEncryption,
|
||||||
[switch]$DisableModernStandbyNetworking,
|
[switch]$DisableModernStandbyNetworking,
|
||||||
|
[switch]$DisableUpdateASAP,
|
||||||
|
[switch]$PreventUpdateAutoReboot,
|
||||||
|
[switch]$DisableDeliveryOptimization,
|
||||||
[switch]$DisableBing,
|
[switch]$DisableBing,
|
||||||
[switch]$DisableDesktopSpotlight,
|
[switch]$DisableDesktopSpotlight,
|
||||||
[switch]$DisableLockscreenTips,
|
[switch]$DisableLockscreenTips,
|
||||||
@@ -140,8 +144,16 @@ $arguments = $($PSBoundParameters.GetEnumerator() | ForEach-Object {
|
|||||||
Write-Output ""
|
Write-Output ""
|
||||||
Write-Output "> Running Win11Debloat..."
|
Write-Output "> Running Win11Debloat..."
|
||||||
|
|
||||||
|
# Minimize the powershell window when no parameters are provided
|
||||||
|
if ($arguments.Count -eq 0) {
|
||||||
|
$windowStyle = "Minimized"
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$windowStyle = "Normal"
|
||||||
|
}
|
||||||
|
|
||||||
# Run Win11Debloat script with the provided arguments
|
# Run Win11Debloat script with the provided arguments
|
||||||
$debloatProcess = Start-Process powershell.exe -PassThru -ArgumentList "-executionpolicy bypass -File $env:TEMP\Win11Debloat\Win11Debloat.ps1 $arguments" -Verb RunAs
|
$debloatProcess = Start-Process powershell.exe -WindowStyle $windowStyle -PassThru -ArgumentList "-executionpolicy bypass -File $env:TEMP\Win11Debloat\Win11Debloat.ps1 $arguments" -Verb RunAs
|
||||||
|
|
||||||
# Wait for the process to finish before continuing
|
# Wait for the process to finish before continuing
|
||||||
if ($null -ne $debloatProcess) {
|
if ($null -ne $debloatProcess) {
|
||||||
|
|||||||
21
README.md
21
README.md
@@ -1,17 +1,3 @@
|
|||||||
<div align="center" markdown="1">
|
|
||||||
<sup>Special thanks to:</sup>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<a href="https://www.warp.dev/windebloat">
|
|
||||||
<img alt="Warp sponsorship" width="400" src="https://github.com/user-attachments/assets/c21102f7-bab9-4344-a731-0cf6b341cab2">
|
|
||||||
</a>
|
|
||||||
|
|
||||||
### [Warp, the intelligent terminal for developers](https://www.warp.dev/windebloat)
|
|
||||||
[Available for MacOS, Linux, & Windows](https://www.warp.dev/windebloat)<br>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
# Win11Debloat
|
# Win11Debloat
|
||||||
|
|
||||||
[](https://github.com/Raphire/Win11Debloat/releases/latest)
|
[](https://github.com/Raphire/Win11Debloat/releases/latest)
|
||||||
@@ -122,8 +108,15 @@ Below is an overview of the key features and functionality offered by Win11Deblo
|
|||||||
- Turn off Enhance Pointer Precision, also known as mouse acceleration.
|
- Turn off Enhance Pointer Precision, also known as mouse acceleration.
|
||||||
- Disable the Sticky Keys keyboard shortcut. (W11 only)
|
- Disable the Sticky Keys keyboard shortcut. (W11 only)
|
||||||
- Disable fast start-up to ensure a full shutdown.
|
- Disable fast start-up to ensure a full shutdown.
|
||||||
|
- Disable BitLocker automatic device encryption.
|
||||||
- Disable network connectivity during Modern Standby to reduce battery drain. (W11 only)
|
- Disable network connectivity during Modern Standby to reduce battery drain. (W11 only)
|
||||||
|
|
||||||
|
#### Windows Update
|
||||||
|
|
||||||
|
- Prevent Windows from getting updates as soon as they're available.
|
||||||
|
- Prevent automatic restarts after updates while signed in.
|
||||||
|
- Disable sharing of downloaded updates with other PCs, also known as Delivery Optimization.
|
||||||
|
|
||||||
#### Appearance
|
#### Appearance
|
||||||
|
|
||||||
- Enable dark mode for system and apps.
|
- Enable dark mode for system and apps.
|
||||||
|
|||||||
4
Regfiles/Disable_Bitlocker_Auto_Encryption.reg
Normal file
4
Regfiles/Disable_Bitlocker_Auto_Encryption.reg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\BitLocker]
|
||||||
|
"PreventDeviceEncryption"=dword:00000001
|
||||||
5
Regfiles/Disable_Delivery_Optimization.reg
Normal file
5
Regfiles/Disable_Delivery_Optimization.reg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
; Disable sharing downloaded updates with other PCs (Delivery Optimization)
|
||||||
|
[HKEY_USERS\S-1-5-20\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Settings]
|
||||||
|
"DownloadMode"=dword:00000000
|
||||||
5
Regfiles/Disable_Update_ASAP.reg
Normal file
5
Regfiles/Disable_Update_ASAP.reg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
; Turn Off "Get the latest updates as soon as they're available"
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings]
|
||||||
|
"IsContinuousInnovationOptedIn"=dword:00000000
|
||||||
5
Regfiles/Prevent_Auto_Reboot.reg
Normal file
5
Regfiles/Prevent_Auto_Reboot.reg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
; Prevent automatic restarts after updates while signed in
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU]
|
||||||
|
"NoAutoRebootWithLoggedOnUsers"=dword:00000001
|
||||||
4
Regfiles/Sysprep/Disable_Bitlocker_Auto_Encryption.reg
Normal file
4
Regfiles/Sysprep/Disable_Bitlocker_Auto_Encryption.reg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\BitLocker]
|
||||||
|
"PreventDeviceEncryption"=dword:00000001
|
||||||
5
Regfiles/Sysprep/Disable_Delivery_Optimization.reg
Normal file
5
Regfiles/Sysprep/Disable_Delivery_Optimization.reg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
; Disable sharing downloaded updates with other PCs (Delivery Optimization)
|
||||||
|
[HKEY_USERS\S-1-5-20\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Settings]
|
||||||
|
"DownloadMode"=dword:00000000
|
||||||
5
Regfiles/Sysprep/Disable_Update_ASAP.reg
Normal file
5
Regfiles/Sysprep/Disable_Update_ASAP.reg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
; Turn Off "Get the latest updates as soon as they're available"
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings]
|
||||||
|
"IsContinuousInnovationOptedIn"=dword:00000000
|
||||||
5
Regfiles/Sysprep/Prevent_Auto_Reboot.reg
Normal file
5
Regfiles/Sysprep/Prevent_Auto_Reboot.reg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
; Prevent automatic restarts after updates while signed in
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU]
|
||||||
|
"NoAutoRebootWithLoggedOnUsers"=dword:00000001
|
||||||
5
Regfiles/Undo/Allow_Auto_Reboot.reg
Normal file
5
Regfiles/Undo/Allow_Auto_Reboot.reg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
; Allow automatic restarts after updates while signed in
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU]
|
||||||
|
"NoAutoRebootWithLoggedOnUsers"=-
|
||||||
4
Regfiles/Undo/Enable_Bitlocker_Auto_Encryption.reg
Normal file
4
Regfiles/Undo/Enable_Bitlocker_Auto_Encryption.reg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\BitLocker]
|
||||||
|
"PreventDeviceEncryption"=-
|
||||||
5
Regfiles/Undo/Enable_Delivery_Optimization.reg
Normal file
5
Regfiles/Undo/Enable_Delivery_Optimization.reg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
; Enable sharing downloaded updates with other PCs (Delivery Optimization)
|
||||||
|
[HKEY_USERS\S-1-5-20\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Settings]
|
||||||
|
"DownloadMode"=dword:00000001
|
||||||
@@ -17,4 +17,4 @@ Windows Registry Editor Version 5.00
|
|||||||
"URL Protocol"=""
|
"URL Protocol"=""
|
||||||
"NoOpenWith"=-
|
"NoOpenWith"=-
|
||||||
|
|
||||||
[-HKEY_CLASSES_ROOT\ms-gamebar\shell\open\command]
|
[-HKEY_CLASSES_ROOT\ms-gamebarservices\shell\open\command]
|
||||||
5
Regfiles/Undo/Enable_Update_ASAP.reg
Normal file
5
Regfiles/Undo/Enable_Update_ASAP.reg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
; Turn On "Get the latest updates as soon as they're available"
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings]
|
||||||
|
"IsContinuousInnovationOptedIn"=dword:00000001
|
||||||
533
Win11Debloat.ps1
533
Win11Debloat.ps1
@@ -25,7 +25,11 @@ param (
|
|||||||
[switch]$DisableGameBarIntegration,
|
[switch]$DisableGameBarIntegration,
|
||||||
[switch]$DisableTelemetry,
|
[switch]$DisableTelemetry,
|
||||||
[switch]$DisableFastStartup,
|
[switch]$DisableFastStartup,
|
||||||
|
[switch]$DisableBitlockerAutoEncryption,
|
||||||
[switch]$DisableModernStandbyNetworking,
|
[switch]$DisableModernStandbyNetworking,
|
||||||
|
[switch]$DisableUpdateASAP,
|
||||||
|
[switch]$PreventUpdateAutoReboot,
|
||||||
|
[switch]$DisableDeliveryOptimization,
|
||||||
[switch]$DisableBing,
|
[switch]$DisableBing,
|
||||||
[switch]$DisableDesktopSpotlight,
|
[switch]$DisableDesktopSpotlight,
|
||||||
[switch]$DisableLockscreenTips,
|
[switch]$DisableLockscreenTips,
|
||||||
@@ -101,6 +105,7 @@ $script:ControlParams = 'WhatIf', 'Confirm', 'Verbose', 'Debug', 'LogPath', 'Sil
|
|||||||
$script:GuiConsoleOutput = $null
|
$script:GuiConsoleOutput = $null
|
||||||
$script:GuiConsoleScrollViewer = $null
|
$script:GuiConsoleScrollViewer = $null
|
||||||
$script:GuiWindow = $null
|
$script:GuiWindow = $null
|
||||||
|
$script:CancelRequested = $false
|
||||||
|
|
||||||
# Check if current powershell environment is limited by security policies
|
# Check if current powershell environment is limited by security policies
|
||||||
if ($ExecutionContext.SessionState.LanguageMode -ne "FullLanguage") {
|
if ($ExecutionContext.SessionState.LanguageMode -ne "FullLanguage") {
|
||||||
@@ -555,7 +560,7 @@ function GetSystemUsesDarkMode {
|
|||||||
|
|
||||||
# Initializes and opens the main GUI window
|
# Initializes and opens the main GUI window
|
||||||
function OpenGUI {
|
function OpenGUI {
|
||||||
Add-Type -AssemblyName PresentationFramework,PresentationCore,WindowsBase | Out-Null
|
Add-Type -AssemblyName PresentationFramework,PresentationCore,WindowsBase,System.Windows.Forms | Out-Null
|
||||||
|
|
||||||
# Get current Windows build version
|
# Get current Windows build version
|
||||||
$WinVersion = Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' CurrentBuild
|
$WinVersion = Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' CurrentBuild
|
||||||
@@ -594,12 +599,140 @@ function OpenGUI {
|
|||||||
$window.Close()
|
$window.Close()
|
||||||
})
|
})
|
||||||
|
|
||||||
# Ensure closing the window via any means properly exits the script
|
# Ensure closing the main window stops all execution
|
||||||
$window.Add_Closing({
|
$window.Add_Closing({
|
||||||
Stop-Transcript
|
$script:CancelRequested = $true
|
||||||
Exit
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# Implement window resize functionality
|
||||||
|
$resizeLeft = $window.FindName('ResizeLeft')
|
||||||
|
$resizeRight = $window.FindName('ResizeRight')
|
||||||
|
$resizeTop = $window.FindName('ResizeTop')
|
||||||
|
$resizeBottom = $window.FindName('ResizeBottom')
|
||||||
|
$resizeTopLeft = $window.FindName('ResizeTopLeft')
|
||||||
|
$resizeTopRight = $window.FindName('ResizeTopRight')
|
||||||
|
$resizeBottomLeft = $window.FindName('ResizeBottomLeft')
|
||||||
|
$resizeBottomRight = $window.FindName('ResizeBottomRight')
|
||||||
|
|
||||||
|
$script:resizing = $false
|
||||||
|
$script:resizeEdges = $null
|
||||||
|
$script:resizeStart = $null
|
||||||
|
$script:windowStart = $null
|
||||||
|
$script:resizeElement = $null
|
||||||
|
|
||||||
|
$resizeHandler = {
|
||||||
|
param($sender, $e)
|
||||||
|
|
||||||
|
$script:resizing = $true
|
||||||
|
$script:resizeElement = $sender
|
||||||
|
$script:resizeStart = [System.Windows.Forms.Cursor]::Position
|
||||||
|
$script:windowStart = @{
|
||||||
|
Left = $window.Left
|
||||||
|
Top = $window.Top
|
||||||
|
Width = $window.ActualWidth
|
||||||
|
Height = $window.ActualHeight
|
||||||
|
}
|
||||||
|
|
||||||
|
# Parse direction tag into edge flags for cleaner resize logic
|
||||||
|
$direction = $sender.Tag
|
||||||
|
$script:resizeEdges = @{
|
||||||
|
Left = $direction -match 'Left'
|
||||||
|
Right = $direction -match 'Right'
|
||||||
|
Top = $direction -match 'Top'
|
||||||
|
Bottom = $direction -match 'Bottom'
|
||||||
|
}
|
||||||
|
|
||||||
|
$sender.CaptureMouse()
|
||||||
|
$e.Handled = $true
|
||||||
|
}
|
||||||
|
|
||||||
|
$moveHandler = {
|
||||||
|
param($sender, $e)
|
||||||
|
if (-not $script:resizing) { return }
|
||||||
|
|
||||||
|
$current = [System.Windows.Forms.Cursor]::Position
|
||||||
|
$deltaX = $current.X - $script:resizeStart.X
|
||||||
|
$deltaY = $current.Y - $script:resizeStart.Y
|
||||||
|
|
||||||
|
# Handle horizontal resize
|
||||||
|
if ($script:resizeEdges.Left) {
|
||||||
|
$newWidth = [Math]::Max($window.MinWidth, $script:windowStart.Width - $deltaX)
|
||||||
|
if ($newWidth -ne $window.Width) {
|
||||||
|
$window.Left = $script:windowStart.Left + ($script:windowStart.Width - $newWidth)
|
||||||
|
$window.Width = $newWidth
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif ($script:resizeEdges.Right) {
|
||||||
|
$window.Width = [Math]::Max($window.MinWidth, $script:windowStart.Width + $deltaX)
|
||||||
|
}
|
||||||
|
|
||||||
|
# Handle vertical resize
|
||||||
|
if ($script:resizeEdges.Top) {
|
||||||
|
$newHeight = [Math]::Max($window.MinHeight, $script:windowStart.Height - $deltaY)
|
||||||
|
if ($newHeight -ne $window.Height) {
|
||||||
|
$window.Top = $script:windowStart.Top + ($script:windowStart.Height - $newHeight)
|
||||||
|
$window.Height = $newHeight
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif ($script:resizeEdges.Bottom) {
|
||||||
|
$window.Height = [Math]::Max($window.MinHeight, $script:windowStart.Height + $deltaY)
|
||||||
|
}
|
||||||
|
|
||||||
|
$e.Handled = $true
|
||||||
|
}
|
||||||
|
|
||||||
|
$releaseHandler = {
|
||||||
|
param($sender, $e)
|
||||||
|
if ($script:resizing -and $script:resizeElement) {
|
||||||
|
$script:resizing = $false
|
||||||
|
$script:resizeEdges = $null
|
||||||
|
$script:resizeElement.ReleaseMouseCapture()
|
||||||
|
$script:resizeElement = $null
|
||||||
|
$e.Handled = $true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Set tags and add event handlers for resize borders
|
||||||
|
$resizeLeft.Tag = 'Left'
|
||||||
|
$resizeLeft.Add_PreviewMouseLeftButtonDown($resizeHandler)
|
||||||
|
$resizeLeft.Add_MouseMove($moveHandler)
|
||||||
|
$resizeLeft.Add_MouseLeftButtonUp($releaseHandler)
|
||||||
|
|
||||||
|
$resizeRight.Tag = 'Right'
|
||||||
|
$resizeRight.Add_PreviewMouseLeftButtonDown($resizeHandler)
|
||||||
|
$resizeRight.Add_MouseMove($moveHandler)
|
||||||
|
$resizeRight.Add_MouseLeftButtonUp($releaseHandler)
|
||||||
|
|
||||||
|
$resizeTop.Tag = 'Top'
|
||||||
|
$resizeTop.Add_PreviewMouseLeftButtonDown($resizeHandler)
|
||||||
|
$resizeTop.Add_MouseMove($moveHandler)
|
||||||
|
$resizeTop.Add_MouseLeftButtonUp($releaseHandler)
|
||||||
|
|
||||||
|
$resizeBottom.Tag = 'Bottom'
|
||||||
|
$resizeBottom.Add_PreviewMouseLeftButtonDown($resizeHandler)
|
||||||
|
$resizeBottom.Add_MouseMove($moveHandler)
|
||||||
|
$resizeBottom.Add_MouseLeftButtonUp($releaseHandler)
|
||||||
|
|
||||||
|
$resizeTopLeft.Tag = 'TopLeft'
|
||||||
|
$resizeTopLeft.Add_PreviewMouseLeftButtonDown($resizeHandler)
|
||||||
|
$resizeTopLeft.Add_MouseMove($moveHandler)
|
||||||
|
$resizeTopLeft.Add_MouseLeftButtonUp($releaseHandler)
|
||||||
|
|
||||||
|
$resizeTopRight.Tag = 'TopRight'
|
||||||
|
$resizeTopRight.Add_PreviewMouseLeftButtonDown($resizeHandler)
|
||||||
|
$resizeTopRight.Add_MouseMove($moveHandler)
|
||||||
|
$resizeTopRight.Add_MouseLeftButtonUp($releaseHandler)
|
||||||
|
|
||||||
|
$resizeBottomLeft.Tag = 'BottomLeft'
|
||||||
|
$resizeBottomLeft.Add_PreviewMouseLeftButtonDown($resizeHandler)
|
||||||
|
$resizeBottomLeft.Add_MouseMove($moveHandler)
|
||||||
|
$resizeBottomLeft.Add_MouseLeftButtonUp($releaseHandler)
|
||||||
|
|
||||||
|
$resizeBottomRight.Tag = 'BottomRight'
|
||||||
|
$resizeBottomRight.Add_PreviewMouseLeftButtonDown($resizeHandler)
|
||||||
|
$resizeBottomRight.Add_MouseMove($moveHandler)
|
||||||
|
$resizeBottomRight.Add_MouseLeftButtonUp($releaseHandler)
|
||||||
|
|
||||||
# Integrated App Selection UI
|
# Integrated App Selection UI
|
||||||
$appsPanel = $window.FindName('AppSelectionPanel')
|
$appsPanel = $window.FindName('AppSelectionPanel')
|
||||||
$onlyInstalledAppsBox = $window.FindName('OnlyInstalledAppsBox')
|
$onlyInstalledAppsBox = $window.FindName('OnlyInstalledAppsBox')
|
||||||
@@ -667,6 +800,7 @@ function OpenGUI {
|
|||||||
$checkbox = New-Object System.Windows.Controls.CheckBox
|
$checkbox = New-Object System.Windows.Controls.CheckBox
|
||||||
$checkbox.Content = $labelText
|
$checkbox.Content = $labelText
|
||||||
$checkbox.Name = $comboName
|
$checkbox.Name = $comboName
|
||||||
|
$checkbox.SetValue([System.Windows.Automation.AutomationProperties]::NameProperty, $labelText)
|
||||||
$checkbox.IsChecked = $false
|
$checkbox.IsChecked = $false
|
||||||
$checkbox.Style = $window.Resources["FeatureCheckboxStyle"]
|
$checkbox.Style = $window.Resources["FeatureCheckboxStyle"]
|
||||||
$parent.Children.Add($checkbox) | Out-Null
|
$parent.Children.Add($checkbox) | Out-Null
|
||||||
@@ -684,17 +818,25 @@ function OpenGUI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Otherwise use a combobox for multiple options
|
# Otherwise use a combobox for multiple options
|
||||||
|
# Wrap label in a Border for search highlighting
|
||||||
|
$lblBorder = New-Object System.Windows.Controls.Border
|
||||||
|
$lblBorder.Style = $window.Resources['LabelBorderStyle']
|
||||||
|
$lblBorderName = "$comboName`_LabelBorder"
|
||||||
|
$lblBorder.Name = $lblBorderName
|
||||||
|
|
||||||
$lbl = New-Object System.Windows.Controls.TextBlock
|
$lbl = New-Object System.Windows.Controls.TextBlock
|
||||||
$lbl.Text = $labelText
|
$lbl.Text = $labelText
|
||||||
$lbl.Style = $window.Resources['LabelStyle']
|
$lbl.Style = $window.Resources['LabelStyle']
|
||||||
$labelName = "$comboName`_Label"
|
$labelName = "$comboName`_Label"
|
||||||
$lbl.Name = $labelName
|
$lbl.Name = $labelName
|
||||||
$parent.Children.Add($lbl) | Out-Null
|
|
||||||
|
|
||||||
# Register the label with the window's name scope
|
$lblBorder.Child = $lbl
|
||||||
|
$parent.Children.Add($lblBorder) | Out-Null
|
||||||
|
|
||||||
|
# Register the label border with the window's name scope
|
||||||
try {
|
try {
|
||||||
[System.Windows.NameScope]::SetNameScope($lbl, [System.Windows.NameScope]::GetNameScope($window))
|
[System.Windows.NameScope]::SetNameScope($lblBorder, [System.Windows.NameScope]::GetNameScope($window))
|
||||||
$window.RegisterName($labelName, $lbl)
|
$window.RegisterName($lblBorderName, $lblBorder)
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
# Name might already be registered, ignore
|
# Name might already be registered, ignore
|
||||||
@@ -702,6 +844,7 @@ function OpenGUI {
|
|||||||
|
|
||||||
$combo = New-Object System.Windows.Controls.ComboBox
|
$combo = New-Object System.Windows.Controls.ComboBox
|
||||||
$combo.Name = $comboName
|
$combo.Name = $comboName
|
||||||
|
$combo.SetValue([System.Windows.Automation.AutomationProperties]::NameProperty, $labelText)
|
||||||
foreach ($it in $items) { $cbItem = New-Object System.Windows.Controls.ComboBoxItem; $cbItem.Content = $it; $combo.Items.Add($cbItem) | Out-Null }
|
foreach ($it in $items) { $cbItem = New-Object System.Windows.Controls.ComboBoxItem; $cbItem.Content = $it; $combo.Items.Add($cbItem) | Out-Null }
|
||||||
$combo.SelectedIndex = 0
|
$combo.SelectedIndex = 0
|
||||||
$parent.Children.Add($combo) | Out-Null
|
$parent.Children.Add($combo) | Out-Null
|
||||||
@@ -718,13 +861,24 @@ function OpenGUI {
|
|||||||
return $combo
|
return $combo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function GetWikiUrlForCategory($category) {
|
||||||
|
if (-not $category) { return 'https://github.com/Raphire/Win11Debloat/wiki/Features' }
|
||||||
|
|
||||||
|
$slug = $category.ToLowerInvariant()
|
||||||
|
$slug = $slug -replace '&', ''
|
||||||
|
$slug = $slug -replace '[^a-z0-9\s-]', ''
|
||||||
|
$slug = $slug -replace '\s', '-'
|
||||||
|
|
||||||
|
return "https://github.com/Raphire/Win11Debloat/wiki/Features#$slug"
|
||||||
|
}
|
||||||
|
|
||||||
function GetOrCreateCategoryCard($category) {
|
function GetOrCreateCategoryCard($category) {
|
||||||
if (-not $category) { $category = 'Other' }
|
if (-not $category) { $category = 'Other' }
|
||||||
|
|
||||||
if ($script:CategoryCardMap.ContainsKey($category)) { return $script:CategoryCardMap[$category] }
|
if ($script:CategoryCardMap.ContainsKey($category)) { return $script:CategoryCardMap[$category] }
|
||||||
|
|
||||||
# Create a new card Border + StackPanel and add to shortest column
|
# Create a new card Border + StackPanel and add to shortest column
|
||||||
$target = $columns | Sort-Object { $_.Children.Count } | Select-Object -First 1
|
$target = $columns | Sort-Object @{Expression={$_.Children.Count}; Ascending=$true}, @{Expression={$columns.IndexOf($_)}; Ascending=$true} | Select-Object -First 1
|
||||||
|
|
||||||
$border = New-Object System.Windows.Controls.Border
|
$border = New-Object System.Windows.Controls.Border
|
||||||
$border.Style = $window.Resources['CategoryCardBorderStyle']
|
$border.Style = $window.Resources['CategoryCardBorderStyle']
|
||||||
@@ -734,10 +888,30 @@ function OpenGUI {
|
|||||||
$safe = ($category -replace '[^a-zA-Z0-9_]','_')
|
$safe = ($category -replace '[^a-zA-Z0-9_]','_')
|
||||||
$panel.Name = "Category_{0}_Panel" -f $safe
|
$panel.Name = "Category_{0}_Panel" -f $safe
|
||||||
|
|
||||||
|
$headerRow = New-Object System.Windows.Controls.StackPanel
|
||||||
|
$headerRow.Orientation = 'Horizontal'
|
||||||
|
|
||||||
$header = New-Object System.Windows.Controls.TextBlock
|
$header = New-Object System.Windows.Controls.TextBlock
|
||||||
$header.Text = $category
|
$header.Text = $category
|
||||||
$header.Style = $window.Resources['CategoryHeaderTextBlock']
|
$header.Style = $window.Resources['CategoryHeaderTextBlock']
|
||||||
$panel.Children.Add($header) | Out-Null
|
$headerRow.Children.Add($header) | Out-Null
|
||||||
|
|
||||||
|
$helpIcon = New-Object System.Windows.Controls.TextBlock
|
||||||
|
$helpIcon.Text = '(?)'
|
||||||
|
$helpIcon.Style = $window.Resources['CategoryHelpLinkTextStyle']
|
||||||
|
|
||||||
|
$helpBtn = New-Object System.Windows.Controls.Button
|
||||||
|
$helpBtn.Content = $helpIcon
|
||||||
|
$helpBtn.ToolTip = "Open wiki for more info on $category features"
|
||||||
|
$helpBtn.Tag = (GetWikiUrlForCategory -category $category)
|
||||||
|
$helpBtn.Style = $window.Resources['CategoryHelpLinkButtonStyle']
|
||||||
|
$helpBtn.Add_Click({
|
||||||
|
param($sender, $e)
|
||||||
|
if ($sender.Tag) { Start-Process $sender.Tag }
|
||||||
|
})
|
||||||
|
$headerRow.Children.Add($helpBtn) | Out-Null
|
||||||
|
|
||||||
|
$panel.Children.Add($headerRow) | Out-Null
|
||||||
|
|
||||||
$border.Child = $panel
|
$border.Child = $panel
|
||||||
$target.Children.Add($border) | Out-Null
|
$target.Children.Add($border) | Out-Null
|
||||||
@@ -846,6 +1020,7 @@ function OpenGUI {
|
|||||||
$appsToAdd | Sort-Object -Property DisplayName | ForEach-Object {
|
$appsToAdd | Sort-Object -Property DisplayName | ForEach-Object {
|
||||||
$checkbox = New-Object System.Windows.Controls.CheckBox
|
$checkbox = New-Object System.Windows.Controls.CheckBox
|
||||||
$checkbox.Content = $_.DisplayName
|
$checkbox.Content = $_.DisplayName
|
||||||
|
$checkbox.SetValue([System.Windows.Automation.AutomationProperties]::NameProperty, $_.DisplayName)
|
||||||
$checkbox.Tag = $_.AppId
|
$checkbox.Tag = $_.AppId
|
||||||
$checkbox.IsChecked = $_.IsChecked
|
$checkbox.IsChecked = $_.IsChecked
|
||||||
$checkbox.ToolTip = $_.Description
|
$checkbox.ToolTip = $_.Description
|
||||||
@@ -982,21 +1157,74 @@ function OpenGUI {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# Shared search highlighting configuration
|
||||||
|
$script:SearchHighlightColor = [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#FFF4CE"))
|
||||||
|
$script:SearchHighlightColorDark = [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#4A4A2A"))
|
||||||
|
|
||||||
|
# Helper function to get the appropriate highlight brush based on theme
|
||||||
|
function GetSearchHighlightBrush {
|
||||||
|
if ($usesDarkMode) { return $script:SearchHighlightColorDark }
|
||||||
|
return $script:SearchHighlightColor
|
||||||
|
}
|
||||||
|
|
||||||
|
# Helper function to scroll to an item if it's not visible, centering it in the viewport
|
||||||
|
function ScrollToItemIfNotVisible {
|
||||||
|
param (
|
||||||
|
[System.Windows.Controls.ScrollViewer]$scrollViewer,
|
||||||
|
[System.Windows.UIElement]$item,
|
||||||
|
[System.Windows.UIElement]$container
|
||||||
|
)
|
||||||
|
|
||||||
|
if (-not $scrollViewer -or -not $item -or -not $container) { return }
|
||||||
|
|
||||||
|
try {
|
||||||
|
$itemPosition = $item.TransformToAncestor($container).Transform([System.Windows.Point]::new(0, 0)).Y
|
||||||
|
$viewportHeight = $scrollViewer.ViewportHeight
|
||||||
|
$itemHeight = $item.ActualHeight
|
||||||
|
$currentOffset = $scrollViewer.VerticalOffset
|
||||||
|
|
||||||
|
# Check if the item is currently visible in the viewport
|
||||||
|
$itemTop = $itemPosition - $currentOffset
|
||||||
|
$itemBottom = $itemTop + $itemHeight
|
||||||
|
|
||||||
|
$isVisible = ($itemTop -ge 0) -and ($itemBottom -le $viewportHeight)
|
||||||
|
|
||||||
|
# Only scroll if the item is not visible
|
||||||
|
if (-not $isVisible) {
|
||||||
|
# Center the item in the viewport
|
||||||
|
$targetOffset = $itemPosition - ($viewportHeight / 2) + ($itemHeight / 2)
|
||||||
|
$scrollViewer.ScrollToVerticalOffset([Math]::Max(0, $targetOffset))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
# Fallback to simple bring into view
|
||||||
|
$item.BringIntoView()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Helper function to find the parent ScrollViewer of an element
|
||||||
|
function FindParentScrollViewer {
|
||||||
|
param ([System.Windows.UIElement]$element)
|
||||||
|
|
||||||
|
$parent = [System.Windows.Media.VisualTreeHelper]::GetParent($element)
|
||||||
|
while ($null -ne $parent) {
|
||||||
|
if ($parent -is [System.Windows.Controls.ScrollViewer]) {
|
||||||
|
return $parent
|
||||||
|
}
|
||||||
|
$parent = [System.Windows.Media.VisualTreeHelper]::GetParent($parent)
|
||||||
|
}
|
||||||
|
return $null
|
||||||
|
}
|
||||||
|
|
||||||
# App Search Box functionality
|
# App Search Box functionality
|
||||||
$appSearchBox = $window.FindName('AppSearchBox')
|
$appSearchBox = $window.FindName('AppSearchBox')
|
||||||
$appSearchPlaceholder = $window.FindName('AppSearchPlaceholder')
|
$appSearchPlaceholder = $window.FindName('AppSearchPlaceholder')
|
||||||
$highlightColor = [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#FFF4CE"))
|
|
||||||
$highlightColorDark = [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#4A4A2A"))
|
|
||||||
|
|
||||||
$appSearchBox.Add_TextChanged({
|
$appSearchBox.Add_TextChanged({
|
||||||
$searchText = $appSearchBox.Text.ToLower().Trim()
|
$searchText = $appSearchBox.Text.ToLower().Trim()
|
||||||
|
|
||||||
# Show/hide placeholder
|
# Show/hide placeholder
|
||||||
if ([string]::IsNullOrWhiteSpace($appSearchBox.Text)) {
|
$appSearchPlaceholder.Visibility = if ([string]::IsNullOrWhiteSpace($appSearchBox.Text)) { 'Visible' } else { 'Collapsed' }
|
||||||
$appSearchPlaceholder.Visibility = 'Visible'
|
|
||||||
} else {
|
|
||||||
$appSearchPlaceholder.Visibility = 'Collapsed'
|
|
||||||
}
|
|
||||||
|
|
||||||
# Clear all highlights first
|
# Clear all highlights first
|
||||||
foreach ($child in $appsPanel.Children) {
|
foreach ($child in $appsPanel.Children) {
|
||||||
@@ -1005,57 +1233,154 @@ function OpenGUI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([string]::IsNullOrWhiteSpace($searchText)) {
|
if ([string]::IsNullOrWhiteSpace($searchText)) { return }
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
# Find and highlight all matching apps
|
# Find and highlight all matching apps
|
||||||
$firstMatch = $null
|
$firstMatch = $null
|
||||||
$highlightBrush = if ($usesDarkMode) { $highlightColorDark } else { $highlightColor }
|
$highlightBrush = GetSearchHighlightBrush
|
||||||
|
|
||||||
foreach ($child in $appsPanel.Children) {
|
foreach ($child in $appsPanel.Children) {
|
||||||
if ($child -is [System.Windows.Controls.CheckBox]) {
|
if ($child -is [System.Windows.Controls.CheckBox] -and $child.Visibility -eq 'Visible') {
|
||||||
# Only consider visible apps (not filtered out by installed filter)
|
if ($child.Content.ToString().ToLower().Contains($searchText)) {
|
||||||
if ($child.Visibility -eq 'Visible') {
|
$child.Background = $highlightBrush
|
||||||
$appName = $child.Content.ToString().ToLower()
|
if ($null -eq $firstMatch) { $firstMatch = $child }
|
||||||
if ($appName.Contains($searchText)) {
|
}
|
||||||
# Highlight the matching app
|
}
|
||||||
$child.Background = $highlightBrush
|
}
|
||||||
|
|
||||||
|
# Scroll to first match if not visible
|
||||||
|
if ($firstMatch) {
|
||||||
|
$scrollViewer = FindParentScrollViewer -element $appsPanel
|
||||||
|
if ($scrollViewer) {
|
||||||
|
ScrollToItemIfNotVisible -scrollViewer $scrollViewer -item $firstMatch -container $appsPanel
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
# Tweak Search Box functionality
|
||||||
|
$tweakSearchBox = $window.FindName('TweakSearchBox')
|
||||||
|
$tweakSearchPlaceholder = $window.FindName('TweakSearchPlaceholder')
|
||||||
|
$tweakSearchBorder = $window.FindName('TweakSearchBorder')
|
||||||
|
$tweaksScrollViewer = $window.FindName('TweaksScrollViewer')
|
||||||
|
$tweaksGrid = $window.FindName('TweaksGrid')
|
||||||
|
$col0 = $window.FindName('Column0Panel')
|
||||||
|
$col1 = $window.FindName('Column1Panel')
|
||||||
|
$col2 = $window.FindName('Column2Panel')
|
||||||
|
|
||||||
|
# Monitor scrollbar visibility and adjust searchbar margin
|
||||||
|
$tweaksScrollViewer.Add_ScrollChanged({
|
||||||
|
if ($tweaksScrollViewer.ScrollableHeight -gt 0) {
|
||||||
|
# The 17px accounts for the scrollbar width + some padding
|
||||||
|
$tweakSearchBorder.Margin = [System.Windows.Thickness]::new(0, 0, 17, 0)
|
||||||
|
} else {
|
||||||
|
$tweakSearchBorder.Margin = [System.Windows.Thickness]::new(0, 0, 0, 0)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
# Helper function to clear all tweak highlights
|
||||||
|
function ClearTweakHighlights {
|
||||||
|
$columns = @($col0, $col1, $col2) | Where-Object { $_ -ne $null }
|
||||||
|
foreach ($column in $columns) {
|
||||||
|
foreach ($card in $column.Children) {
|
||||||
|
if ($card -is [System.Windows.Controls.Border] -and $card.Child -is [System.Windows.Controls.StackPanel]) {
|
||||||
|
foreach ($control in $card.Child.Children) {
|
||||||
|
if ($control -is [System.Windows.Controls.CheckBox] -or
|
||||||
|
($control -is [System.Windows.Controls.Border] -and $control.Name -like '*_LabelBorder')) {
|
||||||
|
$control.Background = [System.Windows.Media.Brushes]::Transparent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Helper function to check if a ComboBox contains matching items
|
||||||
|
function ComboBoxContainsMatch {
|
||||||
|
param ([System.Windows.Controls.ComboBox]$comboBox, [string]$searchText)
|
||||||
|
|
||||||
|
foreach ($item in $comboBox.Items) {
|
||||||
|
$itemText = if ($item -is [System.Windows.Controls.ComboBoxItem]) { $item.Content.ToString().ToLower() } else { $item.ToString().ToLower() }
|
||||||
|
if ($itemText.Contains($searchText)) { return $true }
|
||||||
|
}
|
||||||
|
return $false
|
||||||
|
}
|
||||||
|
|
||||||
|
$tweakSearchBox.Add_TextChanged({
|
||||||
|
$searchText = $tweakSearchBox.Text.ToLower().Trim()
|
||||||
|
|
||||||
|
# Show/hide placeholder
|
||||||
|
$tweakSearchPlaceholder.Visibility = if ([string]::IsNullOrWhiteSpace($tweakSearchBox.Text)) { 'Visible' } else { 'Collapsed' }
|
||||||
|
|
||||||
|
# Clear all highlights
|
||||||
|
ClearTweakHighlights
|
||||||
|
|
||||||
|
if ([string]::IsNullOrWhiteSpace($searchText)) { return }
|
||||||
|
|
||||||
|
# Find and highlight all matching tweaks
|
||||||
|
$firstMatch = $null
|
||||||
|
$highlightBrush = GetSearchHighlightBrush
|
||||||
|
$columns = @($col0, $col1, $col2) | Where-Object { $_ -ne $null }
|
||||||
|
|
||||||
|
foreach ($column in $columns) {
|
||||||
|
foreach ($card in $column.Children) {
|
||||||
|
if ($card -is [System.Windows.Controls.Border] -and $card.Child -is [System.Windows.Controls.StackPanel]) {
|
||||||
|
$controlsList = @($card.Child.Children)
|
||||||
|
for ($i = 0; $i -lt $controlsList.Count; $i++) {
|
||||||
|
$control = $controlsList[$i]
|
||||||
|
$matchFound = $false
|
||||||
|
$controlToHighlight = $null
|
||||||
|
|
||||||
# Remember first match for scrolling
|
if ($control -is [System.Windows.Controls.CheckBox]) {
|
||||||
if ($null -eq $firstMatch) {
|
if ($control.Content.ToString().ToLower().Contains($searchText)) {
|
||||||
$firstMatch = $child
|
$matchFound = $true
|
||||||
|
$controlToHighlight = $control
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif ($control -is [System.Windows.Controls.Border] -and $control.Name -like '*_LabelBorder') {
|
||||||
|
$labelText = if ($control.Child) { $control.Child.Text.ToLower() } else { "" }
|
||||||
|
$comboBox = if ($i + 1 -lt $controlsList.Count -and $controlsList[$i + 1] -is [System.Windows.Controls.ComboBox]) { $controlsList[$i + 1] } else { $null }
|
||||||
|
|
||||||
|
# Check label text or combo box items
|
||||||
|
if ($labelText.Contains($searchText) -or ($comboBox -and (ComboBoxContainsMatch -comboBox $comboBox -searchText $searchText))) {
|
||||||
|
$matchFound = $true
|
||||||
|
$controlToHighlight = $control
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($matchFound -and $controlToHighlight) {
|
||||||
|
$controlToHighlight.Background = $highlightBrush
|
||||||
|
if ($null -eq $firstMatch) { $firstMatch = $controlToHighlight }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Scroll to first match - centered
|
# Scroll to first match if not visible
|
||||||
if ($firstMatch) {
|
if ($firstMatch -and $tweaksScrollViewer) {
|
||||||
# Get the ScrollViewer that contains the apps panel
|
ScrollToItemIfNotVisible -scrollViewer $tweaksScrollViewer -item $firstMatch -container $tweaksGrid
|
||||||
$scrollViewer = $null
|
}
|
||||||
$parent = [System.Windows.Media.VisualTreeHelper]::GetParent($appsPanel)
|
})
|
||||||
while ($null -ne $parent) {
|
|
||||||
if ($parent -is [System.Windows.Controls.ScrollViewer]) {
|
# Add Ctrl+F keyboard shortcut to focus search box on current tab
|
||||||
$scrollViewer = $parent
|
$window.Add_KeyDown({
|
||||||
break
|
param($sender, $e)
|
||||||
}
|
|
||||||
$parent = [System.Windows.Media.VisualTreeHelper]::GetParent($parent)
|
# Check if Ctrl+F was pressed
|
||||||
}
|
if ($e.Key -eq [System.Windows.Input.Key]::F -and
|
||||||
|
([System.Windows.Input.Keyboard]::Modifiers -band [System.Windows.Input.ModifierKeys]::Control)) {
|
||||||
|
|
||||||
if ($scrollViewer) {
|
$currentTab = $tabControl.SelectedItem
|
||||||
# Calculate the position to scroll to for centering
|
|
||||||
$itemPosition = $firstMatch.TransformToAncestor($appsPanel).Transform([System.Windows.Point]::new(0, 0)).Y
|
# Focus AppSearchBox if on App Removal tab
|
||||||
$viewportHeight = $scrollViewer.ViewportHeight
|
if ($currentTab.Header -eq "App Removal" -and $appSearchBox) {
|
||||||
$itemHeight = $firstMatch.ActualHeight
|
$appSearchBox.Focus()
|
||||||
|
$e.Handled = $true
|
||||||
# Center the item in the viewport
|
}
|
||||||
$targetOffset = $itemPosition - ($viewportHeight / 2) + ($itemHeight / 2)
|
# Focus TweakSearchBox if on Tweaks tab
|
||||||
$scrollViewer.ScrollToVerticalOffset([Math]::Max(0, $targetOffset))
|
elseif ($currentTab.Header -eq "Tweaks" -and $tweakSearchBox) {
|
||||||
} else {
|
$tweakSearchBox.Focus()
|
||||||
# Fallback to simple bring into view
|
$e.Handled = $true
|
||||||
$firstMatch.BringIntoView()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -1416,25 +1741,18 @@ function OpenGUI {
|
|||||||
try {
|
try {
|
||||||
ExecuteAllChanges
|
ExecuteAllChanges
|
||||||
|
|
||||||
if (-not $script:Params.ContainsKey("Sysprep") -and -not $script:Params.ContainsKey("User")) {
|
# Check if user wants to restart explorer (from checkbox)
|
||||||
# Ask user if they want to restart Explorer now
|
$restartExplorerCheckBox = $window.FindName('RestartExplorerCheckBox')
|
||||||
$result = [System.Windows.MessageBox]::Show(
|
if ($restartExplorerCheckBox -and $restartExplorerCheckBox.IsChecked -and -not $script:CancelRequested) {
|
||||||
'Would you like to restart the Windows Explorer process now to apply all changes? Some changes may not take effect until a restart is performed.',
|
RestartExplorer
|
||||||
'Restart Windows Explorer?',
|
|
||||||
[System.Windows.MessageBoxButton]::YesNo,
|
|
||||||
[System.Windows.MessageBoxImage]::Question
|
|
||||||
)
|
|
||||||
|
|
||||||
if ($result -eq [System.Windows.MessageBoxResult]::Yes) {
|
|
||||||
RestartExplorer
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Write-ToConsole "Explorer process restart was skipped, please manually reboot your PC to apply all changes"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-ToConsole ""
|
Write-ToConsole ""
|
||||||
Write-ToConsole "All changes have been applied. Please check the output above for any errors."
|
if ($script:CancelRequested) {
|
||||||
|
Write-ToConsole "Script execution was cancelled by the user. Some changes may not have been applied."
|
||||||
|
} else {
|
||||||
|
Write-ToConsole "All changes have been applied. Please check the output above for any errors."
|
||||||
|
}
|
||||||
|
|
||||||
$finishBtn.Dispatcher.Invoke([action]{
|
$finishBtn.Dispatcher.Invoke([action]{
|
||||||
$finishBtn.IsEnabled = $true
|
$finishBtn.IsEnabled = $true
|
||||||
@@ -1457,6 +1775,33 @@ function OpenGUI {
|
|||||||
|
|
||||||
LoadAppsIntoMainUI
|
LoadAppsIntoMainUI
|
||||||
|
|
||||||
|
# Update Current User label with username
|
||||||
|
if ($userSelectionCombo -and $userSelectionCombo.Items.Count -gt 0) {
|
||||||
|
$currentUserItem = $userSelectionCombo.Items[0]
|
||||||
|
if ($currentUserItem -is [System.Windows.Controls.ComboBoxItem]) {
|
||||||
|
$currentUserItem.Content = "Current User ($(GetUserName))"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Disable Restart Explorer option if NoRestartExplorer parameter is set
|
||||||
|
$restartExplorerCheckBox = $window.FindName('RestartExplorerCheckBox')
|
||||||
|
if ($restartExplorerCheckBox -and $script:Params.ContainsKey("NoRestartExplorer")) {
|
||||||
|
$restartExplorerCheckBox.IsChecked = $false
|
||||||
|
$restartExplorerCheckBox.IsEnabled = $false
|
||||||
|
}
|
||||||
|
|
||||||
|
# Force Apply Changes To setting if Sysprep or User parameters are set
|
||||||
|
if ($script:Params.ContainsKey("Sysprep")) {
|
||||||
|
$userSelectionCombo.SelectedIndex = 2
|
||||||
|
$userSelectionCombo.IsEnabled = $false
|
||||||
|
}
|
||||||
|
elseif ($script:Params.ContainsKey("User")) {
|
||||||
|
$userSelectionCombo.SelectedIndex = 1
|
||||||
|
$userSelectionCombo.IsEnabled = $false
|
||||||
|
$otherUsernameTextBox.Text = $script:Params.Item("User")
|
||||||
|
$otherUsernameTextBox.IsEnabled = $false
|
||||||
|
}
|
||||||
|
|
||||||
UpdateNavigationButtons
|
UpdateNavigationButtons
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -1626,6 +1971,7 @@ function OpenAppSelectionWindow {
|
|||||||
$appsToAdd | Sort-Object -Property DisplayName | ForEach-Object {
|
$appsToAdd | Sort-Object -Property DisplayName | ForEach-Object {
|
||||||
$checkbox = New-Object System.Windows.Controls.CheckBox
|
$checkbox = New-Object System.Windows.Controls.CheckBox
|
||||||
$checkbox.Content = $_.DisplayName
|
$checkbox.Content = $_.DisplayName
|
||||||
|
$checkbox.SetValue([System.Windows.Automation.AutomationProperties]::NameProperty, $_.DisplayName)
|
||||||
$checkbox.Tag = $_.AppId
|
$checkbox.Tag = $_.AppId
|
||||||
$checkbox.IsChecked = $_.IsChecked
|
$checkbox.IsChecked = $_.IsChecked
|
||||||
$checkbox.ToolTip = $_.Description
|
$checkbox.ToolTip = $_.Description
|
||||||
@@ -1875,6 +2221,10 @@ function RemoveApps {
|
|||||||
)
|
)
|
||||||
|
|
||||||
Foreach ($app in $appsList) {
|
Foreach ($app in $appsList) {
|
||||||
|
if ($script:CancelRequested) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
Write-ToConsole "Attempting to remove $app..."
|
Write-ToConsole "Attempting to remove $app..."
|
||||||
|
|
||||||
# Use WinGet only to remove OneDrive and Edge
|
# Use WinGet only to remove OneDrive and Edge
|
||||||
@@ -1899,10 +2249,21 @@ function RemoveApps {
|
|||||||
|
|
||||||
If (($app -eq "Microsoft.Edge") -and (Select-String -InputObject $wingetOutput -Pattern "Uninstall failed with exit code")) {
|
If (($app -eq "Microsoft.Edge") -and (Select-String -InputObject $wingetOutput -Pattern "Uninstall failed with exit code")) {
|
||||||
Write-ToConsole "Unable to uninstall Microsoft Edge via WinGet" -ForegroundColor Red
|
Write-ToConsole "Unable to uninstall Microsoft Edge via WinGet" -ForegroundColor Red
|
||||||
Write-ToConsole ""
|
|
||||||
|
|
||||||
# Only prompt in CLI mode (not GUI)
|
if ($script:GuiConsoleOutput) {
|
||||||
if (-not $script:GuiConsoleOutput -and $( Read-Host -Prompt "Would you like to forcefully uninstall Microsoft Edge? NOT RECOMMENDED! (y/n)" ) -eq 'y') {
|
$result = [System.Windows.MessageBox]::Show(
|
||||||
|
'Unable to uninstall Microsoft Edge via WinGet. Would you like to forcefully uninstall it? NOT RECOMMENDED!',
|
||||||
|
'Force Uninstall Microsoft Edge?',
|
||||||
|
[System.Windows.MessageBoxButton]::YesNo,
|
||||||
|
[System.Windows.MessageBoxImage]::Warning
|
||||||
|
)
|
||||||
|
|
||||||
|
if ($result -eq [System.Windows.MessageBoxResult]::Yes) {
|
||||||
|
Write-ToConsole ""
|
||||||
|
ForceRemoveEdge
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif ($( Read-Host -Prompt "Would you like to forcefully uninstall Microsoft Edge? NOT RECOMMENDED! (y/n)" ) -eq 'y') {
|
||||||
Write-ToConsole ""
|
Write-ToConsole ""
|
||||||
ForceRemoveEdge
|
ForceRemoveEdge
|
||||||
}
|
}
|
||||||
@@ -1953,7 +2314,7 @@ function ForceRemoveEdge {
|
|||||||
$hklm = [Microsoft.Win32.RegistryKey]::OpenBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine, $regView)
|
$hklm = [Microsoft.Win32.RegistryKey]::OpenBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine, $regView)
|
||||||
$hklm.CreateSubKey('SOFTWARE\Microsoft\EdgeUpdateDev').SetValue('AllowUninstall', '')
|
$hklm.CreateSubKey('SOFTWARE\Microsoft\EdgeUpdateDev').SetValue('AllowUninstall', '')
|
||||||
|
|
||||||
# Create stub (Creating this somehow allows uninstalling Edge)
|
# Create stub (This somehow allows uninstalling Edge)
|
||||||
$edgeStub = "$env:SystemRoot\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe"
|
$edgeStub = "$env:SystemRoot\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe"
|
||||||
New-Item $edgeStub -ItemType Directory | Out-Null
|
New-Item $edgeStub -ItemType Directory | Out-Null
|
||||||
New-Item "$edgeStub\MicrosoftEdge.exe" | Out-Null
|
New-Item "$edgeStub\MicrosoftEdge.exe" | Out-Null
|
||||||
@@ -1995,11 +2356,8 @@ function ForceRemoveEdge {
|
|||||||
Write-ToConsole "Microsoft Edge was uninstalled"
|
Write-ToConsole "Microsoft Edge was uninstalled"
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Write-ToConsole ""
|
Write-ToConsole "Unable to forcefully uninstall Microsoft Edge, uninstaller could not be found" -ForegroundColor Red
|
||||||
Write-ToConsole "Error: Unable to forcefully uninstall Microsoft Edge, uninstaller could not be found" -ForegroundColor Red
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-ToConsole ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2100,12 +2458,12 @@ function GetUserDirectory {
|
|||||||
$exitIfPathNotFound = $true
|
$exitIfPathNotFound = $true
|
||||||
)
|
)
|
||||||
|
|
||||||
if (-not (CheckIfUserExists -userName $userName)) {
|
|
||||||
Write-Error "User $userName does not exist on this system"
|
|
||||||
AwaitKeyToExit
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if (-not (CheckIfUserExists -userName $userName) -and $userName -ne "*") {
|
||||||
|
Write-Error "User $userName does not exist on this system"
|
||||||
|
AwaitKeyToExit
|
||||||
|
}
|
||||||
|
|
||||||
$userDirectoryExists = Test-Path "$env:SystemDrive\Users\$userName"
|
$userDirectoryExists = Test-Path "$env:SystemDrive\Users\$userName"
|
||||||
$userPath = "$env:SystemDrive\Users\$userName\$fileName"
|
$userPath = "$env:SystemDrive\Users\$userName\$fileName"
|
||||||
|
|
||||||
@@ -2612,10 +2970,15 @@ function ExecuteAllChanges {
|
|||||||
if ($script:Params.ContainsKey("CreateRestorePoint")) {
|
if ($script:Params.ContainsKey("CreateRestorePoint")) {
|
||||||
Write-ToConsole "> Attempting to create a system restore point..."
|
Write-ToConsole "> Attempting to create a system restore point..."
|
||||||
CreateSystemRestorePoint
|
CreateSystemRestorePoint
|
||||||
|
Write-ToConsole ""
|
||||||
}
|
}
|
||||||
|
|
||||||
# Execute all parameters
|
# Execute all parameters
|
||||||
foreach ($paramKey in $script:Params.Keys) {
|
foreach ($paramKey in $script:Params.Keys) {
|
||||||
|
if ($script:CancelRequested) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if ($script:ControlParams -contains $paramKey) {
|
if ($script:ControlParams -contains $paramKey) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -2707,8 +3070,6 @@ function CreateSystemRestorePoint {
|
|||||||
Write-ToConsole $result.Message -ForegroundColor Red
|
Write-ToConsole $result.Message -ForegroundColor Red
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-ToConsole ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user