mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-08-23 16:12:08 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fff1fcd0b2 | ||
|
|
4a50e52be9 | ||
|
|
26d2bcb4a6 | ||
|
|
460eb75e1e |
+68
-6
@@ -63,6 +63,33 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"UiGroups": [
|
"UiGroups": [
|
||||||
|
{
|
||||||
|
"GroupId": "DesktopSpotlight",
|
||||||
|
"Label": "Windows spotlight on the desktop",
|
||||||
|
"ToolTip": "This setting controls the Windows spotlight desktop background option. Keep the rotating wallpaper with or without the 'Learn about this picture' shortcut, or disable Windows spotlight entirely.",
|
||||||
|
"Category": "Appearance",
|
||||||
|
"Priority": 4,
|
||||||
|
"Values": [
|
||||||
|
{
|
||||||
|
"Label": "Show 'Learn about this picture' shortcut (Default)",
|
||||||
|
"FeatureIds": [
|
||||||
|
"EnableDesktopSpotlight"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Label": "Hide 'Learn about this picture' shortcut",
|
||||||
|
"FeatureIds": [
|
||||||
|
"HideDesktopSpotlightIcon"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Label": "Disable Windows spotlight desktop background",
|
||||||
|
"FeatureIds": [
|
||||||
|
"DisableDesktopSpotlight"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"GroupId": "SearchIcon",
|
"GroupId": "SearchIcon",
|
||||||
"Label": "Taskbar search style",
|
"Label": "Taskbar search style",
|
||||||
@@ -392,6 +419,7 @@
|
|||||||
"Label": "Disable telemetry, tracking & targeted ads",
|
"Label": "Disable telemetry, tracking & targeted ads",
|
||||||
"ToolTip": "This setting disables telemetry, diagnostic data collection, activity history, app-launch tracking, targeted ads and more. It limits the data that is sent to Microsoft about your device and usage. If you are a Windows Insider, updates may be blocked until optional diagnostic data collection is turned back on.",
|
"ToolTip": "This setting disables telemetry, diagnostic data collection, activity history, app-launch tracking, targeted ads and more. It limits the data that is sent to Microsoft about your device and usage. If you are a Windows Insider, updates may be blocked until optional diagnostic data collection is turned back on.",
|
||||||
"Category": "Privacy & Suggested Content",
|
"Category": "Privacy & Suggested Content",
|
||||||
|
"Priority": 1,
|
||||||
"RegistryKey": "Disable_Telemetry.reg",
|
"RegistryKey": "Disable_Telemetry.reg",
|
||||||
"ApplyText": "Disabling telemetry and diagnostic data collection",
|
"ApplyText": "Disabling telemetry and diagnostic data collection",
|
||||||
"UndoLabel": "Enable telemetry, tracking & targeted ads",
|
"UndoLabel": "Enable telemetry, tracking & targeted ads",
|
||||||
@@ -405,6 +433,7 @@
|
|||||||
"Label": "Disable tips, tricks & suggested content throughout Windows",
|
"Label": "Disable tips, tricks & suggested content throughout Windows",
|
||||||
"ToolTip": "This setting removes many annoying distractions from Windows. This includes things like notifications, reminders and sync provider ads. It also prevents automated installation of suggested apps.",
|
"ToolTip": "This setting removes many annoying distractions from Windows. This includes things like notifications, reminders and sync provider ads. It also prevents automated installation of suggested apps.",
|
||||||
"Category": "Privacy & Suggested Content",
|
"Category": "Privacy & Suggested Content",
|
||||||
|
"Priority": 2,
|
||||||
"RegistryKey": "Disable_Windows_Suggestions.reg",
|
"RegistryKey": "Disable_Windows_Suggestions.reg",
|
||||||
"ApplyText": "Disabling tips, tricks, suggestions and ads throughout Windows",
|
"ApplyText": "Disabling tips, tricks, suggestions and ads throughout Windows",
|
||||||
"UndoLabel": "Enable tips, tricks & suggested content throughout Windows",
|
"UndoLabel": "Enable tips, tricks & suggested content throughout Windows",
|
||||||
@@ -418,6 +447,7 @@
|
|||||||
"Label": "Disable Windows Notifications (From apps and other senders)",
|
"Label": "Disable Windows Notifications (From apps and other senders)",
|
||||||
"ToolTip": "Disables native Windows notifications from apps and other senders, this includes notifications from apps like Discord, WhatsApp, Teams, and Slack.",
|
"ToolTip": "Disables native Windows notifications from apps and other senders, this includes notifications from apps like Discord, WhatsApp, Teams, and Slack.",
|
||||||
"Category": "Privacy & Suggested Content",
|
"Category": "Privacy & Suggested Content",
|
||||||
|
"Priority": 3,
|
||||||
"RegistryKey": "Disable_Notifications.reg",
|
"RegistryKey": "Disable_Notifications.reg",
|
||||||
"ApplyText": "Disabling Windows notifications and reminders",
|
"ApplyText": "Disabling Windows notifications and reminders",
|
||||||
"UndoLabel": "Enable Windows notifications and reminders",
|
"UndoLabel": "Enable Windows notifications and reminders",
|
||||||
@@ -431,6 +461,7 @@
|
|||||||
"Label": "Disable Windows location services & app location access",
|
"Label": "Disable Windows location services & app location access",
|
||||||
"ToolTip": "This will turn off Windows Location Services and deny apps access to your location. This feature uses policies, which will lock down certain settings.",
|
"ToolTip": "This will turn off Windows Location Services and deny apps access to your location. This feature uses policies, which will lock down certain settings.",
|
||||||
"Category": "Privacy & Suggested Content",
|
"Category": "Privacy & Suggested Content",
|
||||||
|
"Priority": 4,
|
||||||
"RegistryKey": "Disable_Location_Services.reg",
|
"RegistryKey": "Disable_Location_Services.reg",
|
||||||
"ApplyText": "Disabling Windows location services and app location access",
|
"ApplyText": "Disabling Windows location services and app location access",
|
||||||
"UndoLabel": "Enable Windows location services & app location access",
|
"UndoLabel": "Enable Windows location services & app location access",
|
||||||
@@ -444,6 +475,7 @@
|
|||||||
"Label": "Disable Find My Device location tracking",
|
"Label": "Disable Find My Device location tracking",
|
||||||
"ToolTip": "This will turn off the 'Find My Device' feature, which periodically sends your device's location to Microsoft. This feature uses policies, which will lock down certain settings.",
|
"ToolTip": "This will turn off the 'Find My Device' feature, which periodically sends your device's location to Microsoft. This feature uses policies, which will lock down certain settings.",
|
||||||
"Category": "Privacy & Suggested Content",
|
"Category": "Privacy & Suggested Content",
|
||||||
|
"Priority": 5,
|
||||||
"RegistryKey": "Disable_Find_My_Device.reg",
|
"RegistryKey": "Disable_Find_My_Device.reg",
|
||||||
"ApplyText": "Disabling Find My Device location tracking",
|
"ApplyText": "Disabling Find My Device location tracking",
|
||||||
"UndoLabel": "Enable Find My Device location tracking",
|
"UndoLabel": "Enable Find My Device location tracking",
|
||||||
@@ -457,6 +489,7 @@
|
|||||||
"Label": "Disable tips & tricks on the lock screen",
|
"Label": "Disable tips & tricks on the lock screen",
|
||||||
"ToolTip": "This will turn off the lockscreen spotlight option and disable the tips, tricks and fun facts that appear on the lock screen.",
|
"ToolTip": "This will turn off the lockscreen spotlight option and disable the tips, tricks and fun facts that appear on the lock screen.",
|
||||||
"Category": "Privacy & Suggested Content",
|
"Category": "Privacy & Suggested Content",
|
||||||
|
"Priority": 6,
|
||||||
"RegistryKey": "Disable_Lockscreen_Tips.reg",
|
"RegistryKey": "Disable_Lockscreen_Tips.reg",
|
||||||
"ApplyText": "Disabling tips & tricks on the lock screen",
|
"ApplyText": "Disabling tips & tricks on the lock screen",
|
||||||
"UndoLabel": "Enable tips & tricks on the lock screen",
|
"UndoLabel": "Enable tips & tricks on the lock screen",
|
||||||
@@ -465,19 +498,45 @@
|
|||||||
"MinVersion": null,
|
"MinVersion": null,
|
||||||
"MaxVersion": null
|
"MaxVersion": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"FeatureId": "EnableDesktopSpotlight",
|
||||||
|
"Label": "Enable Windows spotlight desktop background and shortcut",
|
||||||
|
"ToolTip": "Restores the Windows spotlight desktop background and the 'Learn about this picture' shortcut.",
|
||||||
|
"Category": "Appearance",
|
||||||
|
"RegistryKey": "Enable_Desktop_Spotlight.reg",
|
||||||
|
"ApplyText": "Restoring the Windows spotlight desktop background and shortcut",
|
||||||
|
"UndoLabel": null,
|
||||||
|
"ApplyUndoText": null,
|
||||||
|
"RegistryUndoKey": null,
|
||||||
|
"MinVersion": null,
|
||||||
|
"MaxVersion": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"FeatureId": "DisableDesktopSpotlight",
|
"FeatureId": "DisableDesktopSpotlight",
|
||||||
"Label": "Disable Windows Spotlight for desktop",
|
"Label": "Disable Windows spotlight desktop background",
|
||||||
"ToolTip": "This will turn off the 'Windows Spotlight' feature for the desktop background, which shows different background images and occasionally tips and fun facts on the desktop. This feature uses policies, which will lock down certain settings.",
|
"ToolTip": "Turns off Windows spotlight for the desktop background, which displays rotating images and may show tips and fun facts. This feature uses policies, which will lock down certain settings.",
|
||||||
"Category": "Privacy & Suggested Content",
|
"Category": "Appearance",
|
||||||
"RegistryKey": "Disable_Desktop_Spotlight.reg",
|
"RegistryKey": "Disable_Desktop_Spotlight.reg",
|
||||||
"ApplyText": "Disabling the 'Windows Spotlight' desktop background option",
|
"ApplyText": "Disabling the Windows spotlight desktop background",
|
||||||
"UndoLabel": "Enable Windows Spotlight for desktop",
|
"UndoLabel": "Enable Windows spotlight desktop background",
|
||||||
"ApplyUndoText": "Enabling the 'Windows Spotlight' desktop background option",
|
"ApplyUndoText": "Restoring the Windows spotlight desktop background and shortcut",
|
||||||
"RegistryUndoKey": "Enable_Desktop_Spotlight.reg",
|
"RegistryUndoKey": "Enable_Desktop_Spotlight.reg",
|
||||||
"MinVersion": null,
|
"MinVersion": null,
|
||||||
"MaxVersion": null
|
"MaxVersion": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"FeatureId": "HideDesktopSpotlightIcon",
|
||||||
|
"Label": "Hide the 'Learn about this picture' desktop shortcut",
|
||||||
|
"ToolTip": "Hides the 'Learn about this picture' desktop shortcut while keeping Windows spotlight wallpaper rotation enabled. It does not disable Windows spotlight.",
|
||||||
|
"Category": "Appearance",
|
||||||
|
"RegistryKey": "Hide_Desktop_Spotlight_Icon.reg",
|
||||||
|
"ApplyText": "Hiding the Windows spotlight 'Learn about this picture' desktop shortcut",
|
||||||
|
"UndoLabel": "Show the 'Learn about this picture' desktop shortcut",
|
||||||
|
"ApplyUndoText": "Showing the Windows spotlight 'Learn about this picture' desktop shortcut",
|
||||||
|
"RegistryUndoKey": "Show_Desktop_Spotlight_Icon.reg",
|
||||||
|
"MinVersion": null,
|
||||||
|
"MaxVersion": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"FeatureId": "DisableEdgeAds",
|
"FeatureId": "DisableEdgeAds",
|
||||||
"Label": "Disable ads, suggestions and newsfeed in Edge",
|
"Label": "Disable ads, suggestions and newsfeed in Edge",
|
||||||
@@ -757,6 +816,7 @@
|
|||||||
"UndoLabel": "Disable dark theme for system and apps",
|
"UndoLabel": "Disable dark theme for system and apps",
|
||||||
"ApplyUndoText": "Disabling dark mode for system and apps",
|
"ApplyUndoText": "Disabling dark mode for system and apps",
|
||||||
"RegistryUndoKey": "Enable_Light_Mode.reg",
|
"RegistryUndoKey": "Enable_Light_Mode.reg",
|
||||||
|
"Priority": 1,
|
||||||
"MinVersion": null,
|
"MinVersion": null,
|
||||||
"MaxVersion": null
|
"MaxVersion": null
|
||||||
},
|
},
|
||||||
@@ -1326,6 +1386,7 @@
|
|||||||
"UndoLabel": "Enable transparency effects",
|
"UndoLabel": "Enable transparency effects",
|
||||||
"ApplyUndoText": "Enabling transparency effects",
|
"ApplyUndoText": "Enabling transparency effects",
|
||||||
"RegistryUndoKey": "Enable_Transparency.reg",
|
"RegistryUndoKey": "Enable_Transparency.reg",
|
||||||
|
"Priority": 2,
|
||||||
"MinVersion": null,
|
"MinVersion": null,
|
||||||
"MaxVersion": null
|
"MaxVersion": null
|
||||||
},
|
},
|
||||||
@@ -1339,6 +1400,7 @@
|
|||||||
"UndoLabel": "Enable animations and visual effects",
|
"UndoLabel": "Enable animations and visual effects",
|
||||||
"ApplyUndoText": "Enabling animations and visual effects",
|
"ApplyUndoText": "Enabling animations and visual effects",
|
||||||
"RegistryUndoKey": "Enable_Animations.reg",
|
"RegistryUndoKey": "Enable_Animations.reg",
|
||||||
|
"Priority": 3,
|
||||||
"RequiresReboot": true,
|
"RequiresReboot": true,
|
||||||
"MinVersion": null,
|
"MinVersion": null,
|
||||||
"MaxVersion": null
|
"MaxVersion": null
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ Below is an overview of the key features and functionality offered by Win11Deblo
|
|||||||
|
|
||||||
- Enable dark mode for system and apps.
|
- Enable dark mode for system and apps.
|
||||||
- Disable transparency, animations and visual effects.
|
- Disable transparency, animations and visual effects.
|
||||||
|
- Hide the 'Learn about this picture' shortcut for desktop spotlight, or disable the Windows spotlight background option entirely.
|
||||||
|
|
||||||
#### Start Menu & Search
|
#### Start Menu & Search
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,7 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\CloudContent]
|
||||||
|
"DisableSpotlightCollectionOnDesktop"=-
|
||||||
|
|
||||||
|
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel]
|
||||||
|
"{2cc5ca98-6485-489a-920e-b3e88a6ccce3}"=-
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\CloudContent]
|
||||||
|
"DisableSpotlightCollectionOnDesktop"=-
|
||||||
|
|
||||||
|
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel]
|
||||||
|
"{2cc5ca98-6485-489a-920e-b3e88a6ccce3}"=dword:00000001
|
||||||
Binary file not shown.
@@ -0,0 +1,7 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[hkey_users\default\Software\Policies\Microsoft\Windows\CloudContent]
|
||||||
|
"DisableSpotlightCollectionOnDesktop"=-
|
||||||
|
|
||||||
|
[hkey_users\default\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel]
|
||||||
|
"{2cc5ca98-6485-489a-920e-b3e88a6ccce3}"=-
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[hkey_users\default\Software\Policies\Microsoft\Windows\CloudContent]
|
||||||
|
"DisableSpotlightCollectionOnDesktop"=-
|
||||||
|
|
||||||
|
[hkey_users\default\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel]
|
||||||
|
"{2cc5ca98-6485-489a-920e-b3e88a6ccce3}"=dword:00000001
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[hkey_users\default\Software\Policies\Microsoft\Windows\CloudContent]
|
||||||
|
"DisableSpotlightCollectionOnDesktop"=-
|
||||||
|
|
||||||
|
[hkey_users\default\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel]
|
||||||
|
"{2cc5ca98-6485-489a-920e-b3e88a6ccce3}"=-
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[hkey_users\default\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel]
|
||||||
|
"{2cc5ca98-6485-489a-920e-b3e88a6ccce3}"=-
|
||||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel]
|
||||||
|
"{2cc5ca98-6485-489a-920e-b3e88a6ccce3}"=-
|
||||||
+4
-1
@@ -39,6 +39,8 @@ param (
|
|||||||
[switch]$DisableBing,
|
[switch]$DisableBing,
|
||||||
[switch]$DisableStoreSearchSuggestions,
|
[switch]$DisableStoreSearchSuggestions,
|
||||||
[switch]$DisableDesktopSpotlight,
|
[switch]$DisableDesktopSpotlight,
|
||||||
|
[switch]$HideDesktopSpotlightIcon,
|
||||||
|
[switch]$EnableDesktopSpotlight,
|
||||||
[switch]$DisableLockscreenTips,
|
[switch]$DisableLockscreenTips,
|
||||||
[switch]$DisableSuggestions,
|
[switch]$DisableSuggestions,
|
||||||
[switch]$DisableLocationServices,
|
[switch]$DisableLocationServices,
|
||||||
@@ -134,7 +136,8 @@ try {
|
|||||||
Invoke-RestMethod $sourceUri -OutFile $tempArchivePath
|
Invoke-RestMethod $sourceUri -OutFile $tempArchivePath
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
Write-Host "Error: Unable to fetch required files from GitHub. Please check your internet connection and try again." -ForegroundColor Red
|
Write-Host "Unable to fetch required files from GitHub. Please check your internet connection and try again." -ForegroundColor Red
|
||||||
|
Write-Error -ErrorRecord $_
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
Write-Output "Press enter to exit..."
|
Write-Output "Press enter to exit..."
|
||||||
Read-Host | Out-Null
|
Read-Host | Out-Null
|
||||||
|
|||||||
@@ -0,0 +1,92 @@
|
|||||||
|
BeforeAll {
|
||||||
|
$script:RepoRoot = Join-Path $PSScriptRoot '..'
|
||||||
|
$script:FeaturesPath = Join-Path $script:RepoRoot 'Config\Features.json'
|
||||||
|
$script:Win11DebloatPath = Join-Path $script:RepoRoot 'Win11Debloat.ps1'
|
||||||
|
$script:GetScriptPath = Join-Path $script:RepoRoot 'Scripts\Get.ps1'
|
||||||
|
$script:RegfilesPath = Join-Path $script:RepoRoot 'Regfiles'
|
||||||
|
$script:Features = @((Get-Content -LiteralPath $script:FeaturesPath -Raw | ConvertFrom-Json).Features)
|
||||||
|
$script:LauncherOnlyParameters = @('Dev', 'Verbose', 'WhatIf')
|
||||||
|
|
||||||
|
function Get-ScriptParameterNames {
|
||||||
|
param(
|
||||||
|
[Parameter(Mandatory)]
|
||||||
|
[string]$Path
|
||||||
|
)
|
||||||
|
|
||||||
|
$tokens = $null
|
||||||
|
$parseErrors = $null
|
||||||
|
$ast = [System.Management.Automation.Language.Parser]::ParseFile($Path, [ref]$tokens, [ref]$parseErrors)
|
||||||
|
$parseErrors | Should -BeNullOrEmpty
|
||||||
|
|
||||||
|
@($ast.ParamBlock.Parameters | ForEach-Object { $_.Name.VariablePath.UserPath })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Describe 'FeatureId parameter contracts' {
|
||||||
|
It 'declares every FeatureId as a parameter on Win11Debloat.ps1' {
|
||||||
|
$parameterNames = Get-ScriptParameterNames -Path $script:Win11DebloatPath
|
||||||
|
$missing = @($script:Features.FeatureId | Where-Object { $parameterNames -notcontains $_ })
|
||||||
|
|
||||||
|
$missing | Should -HaveCount 0 -Because ($missing -join ', ')
|
||||||
|
}
|
||||||
|
|
||||||
|
It 'declares every FeatureId as a parameter on Scripts/Get.ps1' {
|
||||||
|
$parameterNames = Get-ScriptParameterNames -Path $script:GetScriptPath
|
||||||
|
$missing = @($script:Features.FeatureId | Where-Object { $parameterNames -notcontains $_ })
|
||||||
|
|
||||||
|
$missing | Should -HaveCount 0 -Because ($missing -join ', ')
|
||||||
|
}
|
||||||
|
|
||||||
|
It 'keeps Scripts/Get.ps1 aligned with Win11Debloat.ps1 plus launcher-only switches' {
|
||||||
|
$win11DebloatParameters = Get-ScriptParameterNames -Path $script:Win11DebloatPath
|
||||||
|
$getParameters = Get-ScriptParameterNames -Path $script:GetScriptPath
|
||||||
|
$missingFromGet = @($win11DebloatParameters | Where-Object { $getParameters -notcontains $_ })
|
||||||
|
$missingLauncherOnly = @(
|
||||||
|
$script:LauncherOnlyParameters |
|
||||||
|
Where-Object { $getParameters -notcontains $_ }
|
||||||
|
)
|
||||||
|
$unexpectedOnGet = @(
|
||||||
|
$getParameters |
|
||||||
|
Where-Object { $win11DebloatParameters -notcontains $_ -and $script:LauncherOnlyParameters -notcontains $_ }
|
||||||
|
)
|
||||||
|
|
||||||
|
$missingFromGet | Should -HaveCount 0 -Because ($missingFromGet -join ', ')
|
||||||
|
$missingLauncherOnly | Should -HaveCount 0 -Because ($missingLauncherOnly -join ', ')
|
||||||
|
$unexpectedOnGet | Should -HaveCount 0 -Because ($unexpectedOnGet -join ', ')
|
||||||
|
}
|
||||||
|
|
||||||
|
It 'keeps every RegistryKey file in Regfiles and Regfiles/Sysprep' {
|
||||||
|
$missing = @(
|
||||||
|
foreach ($feature in $script:Features) {
|
||||||
|
if ([string]::IsNullOrWhiteSpace($feature.RegistryKey)) { continue }
|
||||||
|
|
||||||
|
$applyPath = Join-Path $script:RegfilesPath $feature.RegistryKey
|
||||||
|
$sysprepPath = Join-Path (Join-Path $script:RegfilesPath 'Sysprep') $feature.RegistryKey
|
||||||
|
if (-not (Test-Path -LiteralPath $applyPath -PathType Leaf)) {
|
||||||
|
"$($feature.FeatureId) missing Regfiles\$($feature.RegistryKey)"
|
||||||
|
}
|
||||||
|
if (-not (Test-Path -LiteralPath $sysprepPath -PathType Leaf)) {
|
||||||
|
"$($feature.FeatureId) missing Regfiles\Sysprep\$($feature.RegistryKey)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
$missing | Should -HaveCount 0 -Because ($missing -join '; ')
|
||||||
|
}
|
||||||
|
|
||||||
|
It 'keeps every RegistryUndoKey file in Regfiles/Undo or Regfiles' {
|
||||||
|
$missing = @(
|
||||||
|
foreach ($feature in $script:Features) {
|
||||||
|
if ([string]::IsNullOrWhiteSpace($feature.RegistryUndoKey)) { continue }
|
||||||
|
|
||||||
|
$undoPath = Join-Path (Join-Path $script:RegfilesPath 'Undo') $feature.RegistryUndoKey
|
||||||
|
$rootPath = Join-Path $script:RegfilesPath $feature.RegistryUndoKey
|
||||||
|
if (-not ((Test-Path -LiteralPath $undoPath -PathType Leaf) -or (Test-Path -LiteralPath $rootPath -PathType Leaf))) {
|
||||||
|
"$($feature.FeatureId) missing undo file $($feature.RegistryUndoKey)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
$missing | Should -HaveCount 0 -Because ($missing -join '; ')
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -38,6 +38,8 @@ param (
|
|||||||
[switch]$DisableStoreSearchSuggestions,
|
[switch]$DisableStoreSearchSuggestions,
|
||||||
[switch]$DisableSearchHighlights,
|
[switch]$DisableSearchHighlights,
|
||||||
[switch]$DisableDesktopSpotlight,
|
[switch]$DisableDesktopSpotlight,
|
||||||
|
[switch]$HideDesktopSpotlightIcon,
|
||||||
|
[switch]$EnableDesktopSpotlight,
|
||||||
[switch]$DisableLockscreenTips,
|
[switch]$DisableLockscreenTips,
|
||||||
[switch]$DisableSuggestions,
|
[switch]$DisableSuggestions,
|
||||||
[switch]$DisableLocationServices,
|
[switch]$DisableLocationServices,
|
||||||
|
|||||||
Reference in New Issue
Block a user