mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-28 08:51:31 -06:00
Compare commits
15 Commits
4836f5f1ff
...
0fa7b6c9ef
Author | SHA1 | Date | |
---|---|---|---|
|
0fa7b6c9ef | ||
|
a6bababb43 | ||
|
ce1ef2a519 | ||
|
77cb0a14c4 | ||
|
c254a43f77 | ||
|
640d2ca107 | ||
|
c186642998 | ||
|
47a4f1547e | ||
|
1caf3111d3 | ||
|
7dcdc4dbb7 | ||
|
bfaba14191 | ||
|
5640f9d04c | ||
|
c6a832b006 | ||
|
fe19094395 | ||
|
fdd32f441f |
@ -51,32 +51,5 @@
|
||||
"Checked": true,
|
||||
"Order": "3",
|
||||
"Description": "If the selected package manager fails, automatically switch to the other one"
|
||||
},
|
||||
"DefaultScope": {
|
||||
"Content": "Default",
|
||||
"Category": "_Installation Scope",
|
||||
"Type": "RadioButton",
|
||||
"GroupName": "InstallationScopeGroup",
|
||||
"Checked": true,
|
||||
"Order": "1",
|
||||
"Description": "Use the default scope of the application"
|
||||
},
|
||||
"UserScope": {
|
||||
"Content": "User",
|
||||
"Category": "_Installation Scope",
|
||||
"Type": "RadioButton",
|
||||
"GroupName": "InstallationScopeGroup",
|
||||
"Checked": false,
|
||||
"Order": "2",
|
||||
"Description": "If possible, install the application only for the current user"
|
||||
},
|
||||
"GlobalMachineScope": {
|
||||
"Content": "Global (Machine)",
|
||||
"Category": "_Installation Scope",
|
||||
"Type": "RadioButton",
|
||||
"GroupName": "InstallationScopeGroup",
|
||||
"Checked": false,
|
||||
"Order": "3",
|
||||
"Description": "If possible, install the application globally for all users"
|
||||
}
|
||||
}
|
||||
|
@ -2584,6 +2584,36 @@
|
||||
],
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot"
|
||||
},
|
||||
"WPFTweaksRecallOff": {
|
||||
"Content": "Disable Recall",
|
||||
"Description": "Turn Recall off",
|
||||
"category": "Essential Tweaks",
|
||||
"panel": "1",
|
||||
"Order": "a011_",
|
||||
"registry": [
|
||||
{
|
||||
|
||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsAI",
|
||||
"Name": "DisableAIDataAnalysis",
|
||||
"Type": "DWord",
|
||||
"Value": "1",
|
||||
"OriginalValue": "0"
|
||||
}
|
||||
],
|
||||
"InvokeScript": [
|
||||
"
|
||||
Write-Host \"Disable Recall\"
|
||||
DISM /Online /Disable-Feature /FeatureName:Recall
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
Write-Host \"Enable Recall\"
|
||||
DISM /Online /Enable-Feature /FeatureName:Recall
|
||||
"
|
||||
],
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/DisableRecall"
|
||||
},
|
||||
"WPFTweaksDisableLMS1": {
|
||||
"Content": "Disable Intel MM (vPro LMS)",
|
||||
"Description": "Intel LMS service is always listening on all ports and could be a huge security risk. There is no need to run LMS on home machines and even in the Enterprise there are better solutions.",
|
||||
@ -3434,14 +3464,5 @@
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300",
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Performance-Plans/RemoveUltPerf"
|
||||
},
|
||||
"WPFWinUtilShortcut": {
|
||||
"Content": "Create WinUtil Shortcut",
|
||||
"category": "Shortcuts",
|
||||
"panel": "2",
|
||||
"Order": "a082_",
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300",
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Shortcuts/Shortcut"
|
||||
}
|
||||
}
|
||||
|
91
docs/dev/tweaks/Essential-Tweaks/DisableRecall.md
Normal file
91
docs/dev/tweaks/Essential-Tweaks/DisableRecall.md
Normal file
@ -0,0 +1,91 @@
|
||||
# Disable Microsoft Recall
|
||||
|
||||
Last Updated: 2024-10-24
|
||||
|
||||
|
||||
!!! info
|
||||
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||
## Description
|
||||
|
||||
Disables MS Recall built into Windows since 24H2.
|
||||
|
||||
<!-- BEGIN CUSTOM CONTENT -->
|
||||
|
||||
<!-- END CUSTOM CONTENT -->
|
||||
|
||||
<details>
|
||||
<summary>Preview Code</summary>
|
||||
|
||||
```json
|
||||
"WPFTweaksRecallOff": {
|
||||
"Content": "Disable Recall",
|
||||
"Description": "Turn Recall off",
|
||||
"category": "Essential Tweaks",
|
||||
"panel": "1",
|
||||
"Order": "a011_",
|
||||
"registry": [
|
||||
{
|
||||
|
||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsAI",
|
||||
"Name": "DisableAIDataAnalysis",
|
||||
"Type": "DWord",
|
||||
"Value": "1",
|
||||
"OriginalValue": "0"
|
||||
}
|
||||
],
|
||||
"InvokeScript": [
|
||||
"
|
||||
Write-Host \"Disable Recall\"
|
||||
DISM /Online /Disable-Feature /FeatureName:Recall
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
Write-Host \"Enable Recall\"
|
||||
DISM /Online /Enable-Feature /FeatureName:Recall
|
||||
"
|
||||
],
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/DisableRecall"
|
||||
},
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## Invoke Script
|
||||
|
||||
```powershell
|
||||
|
||||
Write-Host "Disable Recall"
|
||||
DISM /Online /Disable-Feature /FeatureName:Recall
|
||||
|
||||
|
||||
```
|
||||
## Undo Script
|
||||
|
||||
```powershell
|
||||
|
||||
Write-Host "Enable Recall"
|
||||
DISM /Online /Enable-Feature /FeatureName:Recall
|
||||
|
||||
|
||||
```
|
||||
## Registry Changes
|
||||
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
|
||||
|
||||
|
||||
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).
|
||||
|
||||
### Registry Key: DisableAIDataAnalysis
|
||||
|
||||
**Type:** DWord
|
||||
|
||||
**Original Value:** 0
|
||||
|
||||
**New Value:** 1
|
||||
|
||||
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||
|
||||
<!-- END SECOND CUSTOM CONTENT -->
|
||||
|
||||
|
||||
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
@ -1,113 +0,0 @@
|
||||
# Create WinUtil Shortcut
|
||||
|
||||
Last Updated: 2024-08-07
|
||||
|
||||
|
||||
!!! info
|
||||
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||
|
||||
|
||||
<!-- BEGIN CUSTOM CONTENT -->
|
||||
|
||||
<!-- END CUSTOM CONTENT -->
|
||||
|
||||
<details>
|
||||
<summary>Preview Code</summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"Content": "Create WinUtil Shortcut",
|
||||
"category": "Shortcuts",
|
||||
"panel": "2",
|
||||
"Order": "a082_",
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300",
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Shortcuts/Shortcut"
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## Function: Invoke-WPFShortcut
|
||||
|
||||
```powershell
|
||||
function Invoke-WPFShortcut {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Creates a shortcut and prompts for a save location
|
||||
|
||||
.PARAMETER ShortcutToAdd
|
||||
The name of the shortcut to add
|
||||
|
||||
.PARAMETER RunAsAdmin
|
||||
A boolean value to make 'Run as administrator' property on (true) or off (false), defaults to off
|
||||
|
||||
#>
|
||||
param(
|
||||
$ShortcutToAdd,
|
||||
[bool]$RunAsAdmin = $false
|
||||
)
|
||||
|
||||
# Preper the Shortcut Fields and add an a Custom Icon if it's available, else don't add a Custom Icon.
|
||||
|
||||
Switch ($ShortcutToAdd) {
|
||||
"WinUtil" {
|
||||
# Use Powershell 7 if installed and fallback to PS5 if not
|
||||
if (Get-Command "pwsh" -ErrorAction SilentlyContinue) {
|
||||
$shell = "pwsh.exe"
|
||||
} else {
|
||||
$shell = "powershell.exe"
|
||||
}
|
||||
|
||||
$shellArgs = "-ExecutionPolicy Bypass -Command `"Start-Process $shell -verb runas -ArgumentList `'-Command `"irm https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1 | iex`"`'"
|
||||
|
||||
$DestinationName = "WinUtil.lnk"
|
||||
}
|
||||
}
|
||||
|
||||
# Show a File Dialog Browser, to let the User choose the Name and Location of where to save the Shortcut
|
||||
$FileBrowser = New-Object System.Windows.Forms.SaveFileDialog
|
||||
$FileBrowser.InitialDirectory = [Environment]::GetFolderPath('Desktop')
|
||||
$FileBrowser.Filter = "Shortcut Files (*.lnk)|*.lnk"
|
||||
$FileBrowser.FileName = $DestinationName
|
||||
|
||||
# Do an Early Return if the Save Operation was canceled by User's Input.
|
||||
$FileBrowserResult = $FileBrowser.ShowDialog()
|
||||
$DialogResultEnum = New-Object System.Windows.Forms.DialogResult
|
||||
if (-not ($FileBrowserResult -eq $DialogResultEnum::OK)) {
|
||||
return
|
||||
}
|
||||
|
||||
# Prepare the Shortcut paramter
|
||||
$WshShell = New-Object -comObject WScript.Shell
|
||||
$Shortcut = $WshShell.CreateShortcut($FileBrowser.FileName)
|
||||
$Shortcut.TargetPath = $shell
|
||||
$Shortcut.Arguments = $shellArgs
|
||||
if (Test-Path -Path $winutildir["logo.ico"]) {
|
||||
$shortcut.IconLocation = $winutildir["logo.ico"]
|
||||
}
|
||||
|
||||
# Save the Shortcut to disk
|
||||
$Shortcut.Save()
|
||||
|
||||
if ($RunAsAdmin -eq $true) {
|
||||
$bytes = [System.IO.File]::ReadAllBytes($FileBrowser.FileName)
|
||||
# Set byte value at position 0x15 in hex, or 21 in decimal, from the value 0x00 to 0x20 in hex
|
||||
$bytes[0x15] = $bytes[0x15] -bor 0x20
|
||||
[System.IO.File]::WriteAllBytes($FileBrowser.FileName, $bytes)
|
||||
}
|
||||
|
||||
Write-Host "Shortcut for $ShortcutToAdd has been saved to $($FileBrowser.FileName) with 'Run as administrator' set to $RunAsAdmin"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
|
||||
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||
|
||||
<!-- END SECOND CUSTOM CONTENT -->
|
||||
|
||||
|
||||
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||
|
@ -110,7 +110,6 @@ function Remove-Features() {
|
||||
$_.FeatureName -NotLike "*NFS*" -AND
|
||||
$_.FeatureName -NotLike "*SearchEngine*" -AND
|
||||
$_.FeatureName -NotLike "*RemoteDesktop*" -AND
|
||||
$_.FeatureName -NotLike "*Recall*" -AND
|
||||
$_.State -ne "Disabled"
|
||||
}
|
||||
|
||||
@ -277,6 +276,31 @@ function Remove-ProvisionedPackages() {
|
||||
}
|
||||
}
|
||||
|
||||
function Get-LocalizedUsers
|
||||
{
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Gets a localized user group representation for ICACLS commands (Port from DISMTools PE Helper)
|
||||
.PARAMETER admins
|
||||
Determines whether to get a localized user group representation for the Administrators user group
|
||||
.OUTPUTS
|
||||
A string containing the localized user group
|
||||
.EXAMPLE
|
||||
Get-LocalizedUsers -admins $true
|
||||
#>
|
||||
param (
|
||||
[Parameter(Mandatory = $true, Position = 0)] [bool]$admins
|
||||
)
|
||||
if ($admins)
|
||||
{
|
||||
return (Get-LocalGroup | Where-Object { $_.SID.Value -like "S-1-5-32-544" }).Name
|
||||
}
|
||||
else
|
||||
{
|
||||
return (Get-LocalGroup | Where-Object { $_.SID.Value -like "S-1-5-32-545" }).Name
|
||||
}
|
||||
}
|
||||
|
||||
function Copy-ToUSB([string]$fileToCopy) {
|
||||
foreach ($volume in Get-Volume) {
|
||||
if ($volume -and $volume.FileSystemLabel -ieq "ventoy") {
|
||||
@ -783,41 +807,6 @@ function New-FirstRun {
|
||||
Remove-Item -Path "$env:USERPROFILE\Desktop\*.lnk"
|
||||
Remove-Item -Path "$env:HOMEDRIVE\Users\Default\Desktop\*.lnk"
|
||||
|
||||
# ************************************************
|
||||
# Create WinUtil shortcut on the desktop
|
||||
#
|
||||
$desktopPath = "$($env:USERPROFILE)\Desktop"
|
||||
# Specify the target PowerShell command
|
||||
$command = "powershell.exe -NoProfile -ExecutionPolicy Bypass -Command 'irm https://christitus.com/win | iex'"
|
||||
# Specify the path for the shortcut
|
||||
$shortcutPath = Join-Path $desktopPath 'winutil.lnk'
|
||||
# Create a shell object
|
||||
$shell = New-Object -ComObject WScript.Shell
|
||||
|
||||
# Create a shortcut object
|
||||
$shortcut = $shell.CreateShortcut($shortcutPath)
|
||||
|
||||
if (Test-Path -Path "$env:HOMEDRIVE\Windows\cttlogo.png") {
|
||||
$shortcut.IconLocation = "$env:HOMEDRIVE\Windows\cttlogo.png"
|
||||
}
|
||||
|
||||
# Set properties of the shortcut
|
||||
$shortcut.TargetPath = "powershell.exe"
|
||||
$shortcut.Arguments = "-NoProfile -ExecutionPolicy Bypass -Command `"$command`""
|
||||
# Save the shortcut
|
||||
$shortcut.Save()
|
||||
|
||||
# Make the shortcut have 'Run as administrator' property on
|
||||
$bytes = [System.IO.File]::ReadAllBytes($shortcutPath)
|
||||
# Set byte value at position 0x15 in hex, or 21 in decimal, from the value 0x00 to 0x20 in hex
|
||||
$bytes[0x15] = $bytes[0x15] -bor 0x20
|
||||
[System.IO.File]::WriteAllBytes($shortcutPath, $bytes)
|
||||
|
||||
Write-Host "Shortcut created at: $shortcutPath"
|
||||
#
|
||||
# Done create WinUtil shortcut on the desktop
|
||||
# ************************************************
|
||||
|
||||
try
|
||||
{
|
||||
if ((Get-WindowsOptionalFeature -Online | Where-Object { $_.FeatureName -like "Recall" }).Count -gt 0)
|
||||
|
@ -51,7 +51,6 @@ function Invoke-WPFButton {
|
||||
"WPFFixesNetwork" {Invoke-WPFFixesNetwork}
|
||||
"WPFUpdatesdisable" {Invoke-WPFUpdatesdisable}
|
||||
"WPFUpdatessecurity" {Invoke-WPFUpdatessecurity}
|
||||
"WPFWinUtilShortcut" {Invoke-WPFShortcut -ShortcutToAdd "WinUtil" -RunAsAdmin $true}
|
||||
"WPFGetInstalled" {Invoke-WPFGetInstalled -CheckBox "winget"}
|
||||
"WPFGetInstalledTweaks" {Invoke-WPFGetInstalled -CheckBox "tweaks"}
|
||||
"WPFGetIso" {Invoke-WPFGetIso}
|
||||
|
@ -162,6 +162,35 @@ public class PowerManagement {
|
||||
Write-Host "Removing Appx Bloat"
|
||||
Remove-ProvisionedPackages
|
||||
|
||||
# Detect Windows 11 24H2 and add dependency to FileExp to prevent Explorer look from going back - thanks @WitherOrNot and @thecatontheceiling
|
||||
if ((Test-CompatibleImage $imgVersion $([System.Version]::new(10,0,26100,1))) -eq $true)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Test-Path "$scratchDir\Windows\SystemApps\MicrosoftWindows.Client.FileExp_cw5n1h2txyewy\appxmanifest.xml" -PathType Leaf)
|
||||
{
|
||||
# Found the culprit. Do the following:
|
||||
|
||||
# 1. Take ownership of the file, from TrustedInstaller to Administrators
|
||||
takeown /F "$scratchDir\Windows\SystemApps\MicrosoftWindows.Client.FileExp_cw5n1h2txyewy\appxmanifest.xml" /A
|
||||
|
||||
# 2. Set ACLs so that we can write to it
|
||||
icacls "$scratchDir\Windows\SystemApps\MicrosoftWindows.Client.FileExp_cw5n1h2txyewy\appxmanifest.xml" /grant "$(Get-LocalizedUsers -admins $true):(M)" | Out-Host
|
||||
|
||||
# 3. Open the file and do the modification
|
||||
$appxManifest = Get-Content -Path "$scratchDir\Windows\SystemApps\MicrosoftWindows.Client.FileExp_cw5n1h2txyewy\appxmanifest.xml"
|
||||
$originalLine = $appxManifest[13]
|
||||
$dependency = "`n <PackageDependency Name=`"Microsoft.WindowsAppRuntime.CBS`" MinVersion=`"1.0.0.0`" Publisher=`"CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US`" />"
|
||||
$appxManifest[13] = "$originalLine$dependency"
|
||||
Set-Content -Path "$scratchDir\Windows\SystemApps\MicrosoftWindows.Client.FileExp_cw5n1h2txyewy\appxmanifest.xml" -Value $appxManifest -Force -Encoding utf8
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\LogFiles\WMI\RtBackup" -Directory
|
||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\DiagTrack" -Directory
|
||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\InboxApps" -Directory
|
||||
|
@ -1,72 +0,0 @@
|
||||
function Invoke-WPFShortcut {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Creates a shortcut and prompts for a save location
|
||||
|
||||
.PARAMETER ShortcutToAdd
|
||||
The name of the shortcut to add
|
||||
|
||||
.PARAMETER RunAsAdmin
|
||||
A boolean value to make 'Run as administrator' property on (true) or off (false), defaults to off
|
||||
|
||||
#>
|
||||
param(
|
||||
$ShortcutToAdd,
|
||||
[bool]$RunAsAdmin = $false
|
||||
)
|
||||
|
||||
# Preper the Shortcut Fields and add an a Custom Icon if it's available, else don't add a Custom Icon.
|
||||
|
||||
Switch ($ShortcutToAdd) {
|
||||
"WinUtil" {
|
||||
# Use Powershell 7 if installed and fallback to PS5 if not
|
||||
if (Get-Command "pwsh" -ErrorAction SilentlyContinue) {
|
||||
$shell = "pwsh.exe"
|
||||
} else {
|
||||
$shell = "powershell.exe"
|
||||
}
|
||||
|
||||
$shellArgs = "-ExecutionPolicy Bypass -Command `"Start-Process $shell -verb runas -ArgumentList `'-Command `"irm https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1 | iex`"`'"
|
||||
|
||||
$DestinationName = "WinUtil.lnk"
|
||||
}
|
||||
}
|
||||
|
||||
# Show a File Dialog Browser, to let the User choose the Name and Location of where to save the Shortcut
|
||||
$FileBrowser = New-Object System.Windows.Forms.SaveFileDialog
|
||||
$FileBrowser.InitialDirectory = [Environment]::GetFolderPath('Desktop')
|
||||
$FileBrowser.Filter = "Shortcut Files (*.lnk)|*.lnk"
|
||||
$FileBrowser.FileName = $DestinationName
|
||||
|
||||
# Do an Early Return if the Save Operation was canceled by User's Input.
|
||||
$FileBrowserResult = $FileBrowser.ShowDialog()
|
||||
$DialogResultEnum = New-Object System.Windows.Forms.DialogResult
|
||||
if (-not ($FileBrowserResult -eq $DialogResultEnum::OK)) {
|
||||
return
|
||||
}
|
||||
|
||||
# Prepare the Shortcut paramter
|
||||
$WshShell = New-Object -comObject WScript.Shell
|
||||
$Shortcut = $WshShell.CreateShortcut($FileBrowser.FileName)
|
||||
$Shortcut.TargetPath = $shell
|
||||
$Shortcut.Arguments = $shellArgs
|
||||
if (-NOT (Test-Path -Path $winutildir["logo.ico"])) {
|
||||
Invoke-WebRequest -Uri "https://christitus.com/images/logo-full.ico" -OutFile $winutildir["logo.ico"]
|
||||
}
|
||||
if (Test-Path -Path $winutildir["logo.ico"]) {
|
||||
$shortcut.IconLocation = $winutildir["logo.ico"]
|
||||
}
|
||||
|
||||
# Save the Shortcut to disk
|
||||
$Shortcut.Save()
|
||||
|
||||
if ($RunAsAdmin -eq $true) {
|
||||
$bytes = [System.IO.File]::ReadAllBytes($FileBrowser.FileName)
|
||||
# Set byte value at position 0x15 in hex, or 21 in decimal, from the value 0x00 to 0x20 in hex
|
||||
$bytes[0x15] = $bytes[0x15] -bor 0x20
|
||||
[System.IO.File]::WriteAllBytes($FileBrowser.FileName, $bytes)
|
||||
}
|
||||
|
||||
Write-Host "Shortcut for $ShortcutToAdd has been saved to $($FileBrowser.FileName) with 'Run as administrator' set to $RunAsAdmin"
|
||||
}
|
@ -42,4 +42,24 @@ function Invoke-WPFUpdatesdefault {
|
||||
Write-Host "==================================================="
|
||||
Write-Host "--- Windows Update Settings Reset to Default ---"
|
||||
Write-Host "==================================================="
|
||||
|
||||
Start-Process -FilePath "secedit" -ArgumentList "/configure /cfg $env:windir\inf\defltbase.inf /db defltbase.sdb /verbose" -Wait
|
||||
Start-Process -FilePath "cmd.exe" -ArgumentList "/c RD /S /Q $env:WinDir\System32\GroupPolicyUsers" -Wait
|
||||
Start-Process -FilePath "cmd.exe" -ArgumentList "/c RD /S /Q $env:WinDir\System32\GroupPolicy" -Wait
|
||||
Start-Process -FilePath "gpupdate" -ArgumentList "/force" -Wait
|
||||
Remove-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKCU:\Software\Microsoft\WindowsSelfHost" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKCU:\Software\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKLM:\Software\Microsoft\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKLM:\Software\Microsoft\WindowsSelfHost" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKLM:\Software\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKLM:\Software\WOW6432Node\Microsoft\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
|
||||
Write-Host "==================================================="
|
||||
Write-Host "--- Windows Local Policies Reset to Default ---"
|
||||
Write-Host "==================================================="
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
{{ super() }}
|
||||
<div style="color: red; text-align: center; padding: 10px; font-size: 20px;">
|
||||
<strong>Announcement:</strong> We are currently not adding any applications to WinUtil and any apps that will be added through a PR will be declined by the maintainer.
|
||||
<strong>Announcement:</strong> We are currently reworking the docs to use Hugo rather then mkdocs.
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user