diff --git a/.gitignore b/.gitignore index be0e02ba..7f1f81ed 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ bin/x64/ctt-toolbox.zip win10debloat.ps1.psbuild ctt-toolbox.exe winget-latest.appxbundle +.vs \ No newline at end of file diff --git a/win10debloat.ps1 b/win10debloat.ps1 index 741c1fc3..0070c1f8 100644 --- a/win10debloat.ps1 +++ b/win10debloat.ps1 @@ -1085,6 +1085,18 @@ Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies Write-Host "Showing known file extensions..." Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "HideFileExt" -Type DWord -Value 0 + if(($(Get-WMIObject -class Win32_ComputerSystem | select username).username).IndexOf('Administrator') -eq -1){ + net user administrator /active:no + } + + if(!(((Get-ComputerInfo).WindowsEditionId).IndexOf('Core') -eq -1) -or !(((Get-ComputerInfo).WindowsEditionId).IndexOf('Home') -eq -1)){ # Not sure if home edition is Core or Home + Write-Host "Enabling gpedit.msc..." + Get-ChildItem @( + "C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package*.mum", + "C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package*.mum" + ) | ForEach-Object { dism.exe /online /norestart /add-package:"$_" } + } + # Service tweaks to Manual $services = @(