mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-17 18:27:42 -06:00
Compile Winutil
This commit is contained in:
parent
e0b7551eaa
commit
00ffad0e41
562
winutil.ps1
562
winutil.ps1
@ -8459,267 +8459,6 @@ $sync.configs.tweaks = '{
|
||||
}
|
||||
]
|
||||
},
|
||||
"WPFTweaksDebloatAdobe": {
|
||||
"Content": "Debloat Adobe",
|
||||
"Description": "Manages Adobe Services, Adobe Desktop Service, and Acrobat Updates",
|
||||
"category": "Essential Tweaks",
|
||||
"panel": "1",
|
||||
"Order": "a009_",
|
||||
"InvokeScript": [
|
||||
"
|
||||
function CCStopper {
|
||||
$path = \"C:\\Program Files (x86)\\Common Files\\Adobe\\Adobe Desktop Common\\ADS\\Adobe Desktop Service.exe\"
|
||||
|
||||
# Test if the path exists before proceeding
|
||||
if (Test-Path $path) {
|
||||
Takeown /f $path
|
||||
$acl = Get-Acl $path
|
||||
$acl.SetOwner([System.Security.Principal.NTAccount]\"Administrators\")
|
||||
$acl | Set-Acl $path
|
||||
|
||||
Rename-Item -Path $path -NewName \"Adobe Desktop Service.exe.old\" -Force
|
||||
} else {
|
||||
Write-Host \"Adobe Desktop Service is not in the default location.\"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function AcrobatUpdates {
|
||||
# Editing Acrobat Updates. The last folder before the key is dynamic, therefore using a script.
|
||||
# Possible Values for the edited key:
|
||||
# 0 = Do not download or install updates automatically
|
||||
# 2 = Automatically download updates but let the user choose when to install them
|
||||
# 3 = Automatically download and install updates (default value)
|
||||
# 4 = Notify the user when an update is available but don''t download or install it automatically
|
||||
# = It notifies the user using Windows Notifications. It runs on startup without having to have a Service/Acrobat/Reader running, therefore 0 is the next best thing.
|
||||
|
||||
$rootPath = \"HKLM:\\SOFTWARE\\WOW6432Node\\Adobe\\Adobe ARM\\Legacy\\Acrobat\"
|
||||
|
||||
# Get all subkeys under the specified root path
|
||||
$subKeys = Get-ChildItem -Path $rootPath | Where-Object { $_.PSChildName -like \"{*}\" }
|
||||
|
||||
# Loop through each subkey
|
||||
foreach ($subKey in $subKeys) {
|
||||
# Get the full registry path
|
||||
$fullPath = Join-Path -Path $rootPath -ChildPath $subKey.PSChildName
|
||||
try {
|
||||
Set-ItemProperty -Path $fullPath -Name Mode -Value 0
|
||||
Write-Host \"Acrobat Updates have been disabled.\"
|
||||
} catch {
|
||||
Write-Host \"Registry Key for changing Acrobat Updates does not exist in $fullPath\"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CCStopper
|
||||
AcrobatUpdates
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
function RestoreCCService {
|
||||
$originalPath = \"C:\\Program Files (x86)\\Common Files\\Adobe\\Adobe Desktop Common\\ADS\\Adobe Desktop Service.exe.old\"
|
||||
$newPath = \"C:\\Program Files (x86)\\Common Files\\Adobe\\Adobe Desktop Common\\ADS\\Adobe Desktop Service.exe\"
|
||||
|
||||
if (Test-Path -Path $originalPath) {
|
||||
Rename-Item -Path $originalPath -NewName \"Adobe Desktop Service.exe\" -Force
|
||||
Write-Host \"Adobe Desktop Service has been restored.\"
|
||||
} else {
|
||||
Write-Host \"Backup file does not exist. No changes were made.\"
|
||||
}
|
||||
}
|
||||
|
||||
function AcrobatUpdates {
|
||||
# Default Value:
|
||||
# 3 = Automatically download and install updates
|
||||
|
||||
$rootPath = \"HKLM:\\SOFTWARE\\WOW6432Node\\Adobe\\Adobe ARM\\Legacy\\Acrobat\"
|
||||
|
||||
# Get all subkeys under the specified root path
|
||||
$subKeys = Get-ChildItem -Path $rootPath | Where-Object { $_.PSChildName -like \"{*}\" }
|
||||
|
||||
# Loop through each subkey
|
||||
foreach ($subKey in $subKeys) {
|
||||
# Get the full registry path
|
||||
$fullPath = Join-Path -Path $rootPath -ChildPath $subKey.PSChildName
|
||||
try {
|
||||
Set-ItemProperty -Path $fullPath -Name Mode -Value 3
|
||||
} catch {
|
||||
Write-Host \"Registry Key for changing Acrobat Updates does not exist in $fullPath\"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RestoreCCService
|
||||
AcrobatUpdates
|
||||
"
|
||||
],
|
||||
"service": [
|
||||
{
|
||||
"Name": "AGSService",
|
||||
"StartupType": "Disabled",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "AGMService",
|
||||
"StartupType": "Disabled",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "AdobeUpdateService",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "Adobe Acrobat Update",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "Adobe Genuine Monitor Service",
|
||||
"StartupType": "Disabled",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "AdobeARMservice",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "Adobe Licensing Console",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "CCXProcess",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "AdobeIPCBroker",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "CoreSync",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Automatic"
|
||||
}
|
||||
]
|
||||
},
|
||||
"WPFTweaksBlockAdobeNet": {
|
||||
"Content": "Block Adobe Networking",
|
||||
"Description": "Reduce user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. ",
|
||||
"category": "Essential Tweaks",
|
||||
"panel": "1",
|
||||
"Order": "a010_",
|
||||
"InvokeScript": [
|
||||
"
|
||||
# Define the URL of the remote HOSTS file and the local paths
|
||||
$remoteHostsUrl = \"https://raw.githubusercontent.com/Ruddernation-Designs/Adobe-URL-Block-List/master/hosts\"
|
||||
$localHostsPath = \"C:\\Windows\\System32\\drivers\\etc\\hosts\"
|
||||
$tempHostsPath = \"C:\\Windows\\System32\\drivers\\etc\\temp_hosts\"
|
||||
|
||||
# Download the remote HOSTS file to a temporary location
|
||||
try {
|
||||
Invoke-WebRequest -Uri $remoteHostsUrl -OutFile $tempHostsPath
|
||||
Write-Output \"Downloaded the remote HOSTS file to a temporary location.\"
|
||||
}
|
||||
catch {
|
||||
Write-Error \"Failed to download the HOSTS file. Error: $_\"
|
||||
}
|
||||
|
||||
# Check if the AdobeNetBlock has already been started
|
||||
try {
|
||||
$localHostsContent = Get-Content $localHostsPath -ErrorAction Stop
|
||||
|
||||
# Check if AdobeNetBlock markers exist
|
||||
$blockStartExists = $localHostsContent -like \"*#AdobeNetBlock-start*\"
|
||||
if ($blockStartExists) {
|
||||
Write-Output \"AdobeNetBlock-start already exists. Skipping addition of new block.\"
|
||||
} else {
|
||||
# Load the new block from the downloaded file
|
||||
$newBlockContent = Get-Content $tempHostsPath -ErrorAction Stop
|
||||
$newBlockContent = $newBlockContent | Where-Object { $_ -notmatch \"^\\s*#\" -and $_ -ne \"\" } # Exclude empty lines and comments
|
||||
$newBlockHeader = \"#AdobeNetBlock-start\"
|
||||
$newBlockFooter = \"#AdobeNetBlock-end\"
|
||||
|
||||
# Combine the contents, ensuring new block is properly formatted
|
||||
$combinedContent = $localHostsContent + $newBlockHeader, $newBlockContent, $newBlockFooter | Out-String
|
||||
|
||||
# Write the combined content back to the original HOSTS file
|
||||
$combinedContent | Set-Content $localHostsPath -Encoding ASCII
|
||||
Write-Output \"Successfully added the AdobeNetBlock.\"
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Error \"Error during processing: $_\"
|
||||
}
|
||||
|
||||
# Clean up temporary file
|
||||
Remove-Item $tempHostsPath -ErrorAction Ignore
|
||||
|
||||
# Flush the DNS resolver cache
|
||||
try {
|
||||
Invoke-Expression \"ipconfig /flushdns\"
|
||||
Write-Output \"DNS cache flushed successfully.\"
|
||||
}
|
||||
catch {
|
||||
Write-Error \"Failed to flush DNS cache. Error: $_\"
|
||||
}
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
# Define the local path of the HOSTS file
|
||||
$localHostsPath = \"C:\\Windows\\System32\\drivers\\etc\\hosts\"
|
||||
|
||||
# Load the content of the HOSTS file
|
||||
try {
|
||||
$hostsContent = Get-Content $localHostsPath -ErrorAction Stop
|
||||
}
|
||||
catch {
|
||||
Write-Error \"Failed to load the HOSTS file. Error: $_\"
|
||||
return
|
||||
}
|
||||
|
||||
# Initialize flags and buffer for new content
|
||||
$recording = $true
|
||||
$newContent = @()
|
||||
|
||||
# Iterate over each line of the HOSTS file
|
||||
foreach ($line in $hostsContent) {
|
||||
if ($line -match \"#AdobeNetBlock-start\") {
|
||||
$recording = $false
|
||||
}
|
||||
if ($recording) {
|
||||
$newContent += $line
|
||||
}
|
||||
if ($line -match \"#AdobeNetBlock-end\") {
|
||||
$recording = $true
|
||||
}
|
||||
}
|
||||
|
||||
# Write the filtered content back to the HOSTS file
|
||||
try {
|
||||
$newContent | Set-Content $localHostsPath -Encoding ASCII
|
||||
Write-Output \"Successfully removed the AdobeNetBlock section from the HOSTS file.\"
|
||||
}
|
||||
catch {
|
||||
Write-Error \"Failed to write back to the HOSTS file. Error: $_\"
|
||||
}
|
||||
|
||||
# Flush the DNS resolver cache
|
||||
try {
|
||||
Invoke-Expression \"ipconfig /flushdns\"
|
||||
Write-Output \"DNS cache flushed successfully.\"
|
||||
}
|
||||
catch {
|
||||
Write-Error \"Failed to flush DNS cache. Error: $_\"
|
||||
}
|
||||
"
|
||||
]
|
||||
},
|
||||
"WPFTweaksLoc": {
|
||||
"Content": "Disable Location Tracking",
|
||||
"Description": "Disables Location Tracking...DUH!",
|
||||
@ -10587,7 +10326,7 @@ $sync.configs.tweaks = '{
|
||||
"Description": "Essential for computers that are dual booting. Fixes the time sync with Linux Systems.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a022_",
|
||||
"Order": "a027_",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation",
|
||||
@ -10603,7 +10342,7 @@ $sync.configs.tweaks = '{
|
||||
"Description": "Sets the system preferences to performance. You can do this manually with sysdm.cpl as well.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a021_",
|
||||
"Order": "a027_",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKCU:\\Control Panel\\Desktop",
|
||||
@ -10709,7 +10448,7 @@ $sync.configs.tweaks = '{
|
||||
"Description": "USE WITH CAUTION!!!!! This will remove ALL Microsoft store apps other than the essentials to make winget work. Games installed by MS Store ARE INCLUDED!",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a025_",
|
||||
"Order": "a028_",
|
||||
"appx": [
|
||||
"Microsoft.Microsoft3DViewer",
|
||||
"Microsoft.AppConnector",
|
||||
@ -10928,7 +10667,7 @@ $sync.configs.tweaks = '{
|
||||
"Description": "Removes MS Edge when it gets reinstalled by updates.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a026_",
|
||||
"Order": "a029_",
|
||||
"InvokeScript": [
|
||||
"
|
||||
#:: Standalone script by AveYo Source: https://raw.githubusercontent.com/AveYo/fox/main/Edge_Removal.bat
|
||||
@ -10969,7 +10708,7 @@ $sync.configs.tweaks = '{
|
||||
"Description": "Copies OneDrive files to Default Home Folders and Uninstalls it.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a027_",
|
||||
"Order": "a030_",
|
||||
"InvokeScript": [
|
||||
"
|
||||
|
||||
@ -11052,7 +10791,7 @@ $sync.configs.tweaks = '{
|
||||
"Description": "Disables all Notifications INCLUDING Calendar",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a024_",
|
||||
"Order": "a026_",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKCU:\\Software\\Policies\\Microsoft\\Windows\\Explorer",
|
||||
@ -11070,12 +10809,273 @@ $sync.configs.tweaks = '{
|
||||
}
|
||||
]
|
||||
},
|
||||
"WPFTweaksDebloatAdobe": {
|
||||
"Content": "Adobe Debloat",
|
||||
"Description": "Manages Adobe Services, Adobe Desktop Service, and Acrobat Updates",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a021_",
|
||||
"InvokeScript": [
|
||||
"
|
||||
function CCStopper {
|
||||
$path = \"C:\\Program Files (x86)\\Common Files\\Adobe\\Adobe Desktop Common\\ADS\\Adobe Desktop Service.exe\"
|
||||
|
||||
# Test if the path exists before proceeding
|
||||
if (Test-Path $path) {
|
||||
Takeown /f $path
|
||||
$acl = Get-Acl $path
|
||||
$acl.SetOwner([System.Security.Principal.NTAccount]\"Administrators\")
|
||||
$acl | Set-Acl $path
|
||||
|
||||
Rename-Item -Path $path -NewName \"Adobe Desktop Service.exe.old\" -Force
|
||||
} else {
|
||||
Write-Host \"Adobe Desktop Service is not in the default location.\"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function AcrobatUpdates {
|
||||
# Editing Acrobat Updates. The last folder before the key is dynamic, therefore using a script.
|
||||
# Possible Values for the edited key:
|
||||
# 0 = Do not download or install updates automatically
|
||||
# 2 = Automatically download updates but let the user choose when to install them
|
||||
# 3 = Automatically download and install updates (default value)
|
||||
# 4 = Notify the user when an update is available but don''t download or install it automatically
|
||||
# = It notifies the user using Windows Notifications. It runs on startup without having to have a Service/Acrobat/Reader running, therefore 0 is the next best thing.
|
||||
|
||||
$rootPath = \"HKLM:\\SOFTWARE\\WOW6432Node\\Adobe\\Adobe ARM\\Legacy\\Acrobat\"
|
||||
|
||||
# Get all subkeys under the specified root path
|
||||
$subKeys = Get-ChildItem -Path $rootPath | Where-Object { $_.PSChildName -like \"{*}\" }
|
||||
|
||||
# Loop through each subkey
|
||||
foreach ($subKey in $subKeys) {
|
||||
# Get the full registry path
|
||||
$fullPath = Join-Path -Path $rootPath -ChildPath $subKey.PSChildName
|
||||
try {
|
||||
Set-ItemProperty -Path $fullPath -Name Mode -Value 0
|
||||
Write-Host \"Acrobat Updates have been disabled.\"
|
||||
} catch {
|
||||
Write-Host \"Registry Key for changing Acrobat Updates does not exist in $fullPath\"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CCStopper
|
||||
AcrobatUpdates
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
function RestoreCCService {
|
||||
$originalPath = \"C:\\Program Files (x86)\\Common Files\\Adobe\\Adobe Desktop Common\\ADS\\Adobe Desktop Service.exe.old\"
|
||||
$newPath = \"C:\\Program Files (x86)\\Common Files\\Adobe\\Adobe Desktop Common\\ADS\\Adobe Desktop Service.exe\"
|
||||
|
||||
if (Test-Path -Path $originalPath) {
|
||||
Rename-Item -Path $originalPath -NewName \"Adobe Desktop Service.exe\" -Force
|
||||
Write-Host \"Adobe Desktop Service has been restored.\"
|
||||
} else {
|
||||
Write-Host \"Backup file does not exist. No changes were made.\"
|
||||
}
|
||||
}
|
||||
|
||||
function AcrobatUpdates {
|
||||
# Default Value:
|
||||
# 3 = Automatically download and install updates
|
||||
|
||||
$rootPath = \"HKLM:\\SOFTWARE\\WOW6432Node\\Adobe\\Adobe ARM\\Legacy\\Acrobat\"
|
||||
|
||||
# Get all subkeys under the specified root path
|
||||
$subKeys = Get-ChildItem -Path $rootPath | Where-Object { $_.PSChildName -like \"{*}\" }
|
||||
|
||||
# Loop through each subkey
|
||||
foreach ($subKey in $subKeys) {
|
||||
# Get the full registry path
|
||||
$fullPath = Join-Path -Path $rootPath -ChildPath $subKey.PSChildName
|
||||
try {
|
||||
Set-ItemProperty -Path $fullPath -Name Mode -Value 3
|
||||
} catch {
|
||||
Write-Host \"Registry Key for changing Acrobat Updates does not exist in $fullPath\"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RestoreCCService
|
||||
AcrobatUpdates
|
||||
"
|
||||
],
|
||||
"service": [
|
||||
{
|
||||
"Name": "AGSService",
|
||||
"StartupType": "Disabled",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "AGMService",
|
||||
"StartupType": "Disabled",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "AdobeUpdateService",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "Adobe Acrobat Update",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "Adobe Genuine Monitor Service",
|
||||
"StartupType": "Disabled",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "AdobeARMservice",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "Adobe Licensing Console",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "CCXProcess",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "AdobeIPCBroker",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Automatic"
|
||||
},
|
||||
{
|
||||
"Name": "CoreSync",
|
||||
"StartupType": "Manual",
|
||||
"OriginalType": "Automatic"
|
||||
}
|
||||
]
|
||||
},
|
||||
"WPFTweaksBlockAdobeNet": {
|
||||
"Content": "Adobe Network Block",
|
||||
"Description": "Reduce user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. ",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a021_",
|
||||
"InvokeScript": [
|
||||
"
|
||||
# Define the URL of the remote HOSTS file and the local paths
|
||||
$remoteHostsUrl = \"https://raw.githubusercontent.com/Ruddernation-Designs/Adobe-URL-Block-List/master/hosts\"
|
||||
$localHostsPath = \"C:\\Windows\\System32\\drivers\\etc\\hosts\"
|
||||
$tempHostsPath = \"C:\\Windows\\System32\\drivers\\etc\\temp_hosts\"
|
||||
|
||||
# Download the remote HOSTS file to a temporary location
|
||||
try {
|
||||
Invoke-WebRequest -Uri $remoteHostsUrl -OutFile $tempHostsPath
|
||||
Write-Output \"Downloaded the remote HOSTS file to a temporary location.\"
|
||||
}
|
||||
catch {
|
||||
Write-Error \"Failed to download the HOSTS file. Error: $_\"
|
||||
}
|
||||
|
||||
# Check if the AdobeNetBlock has already been started
|
||||
try {
|
||||
$localHostsContent = Get-Content $localHostsPath -ErrorAction Stop
|
||||
|
||||
# Check if AdobeNetBlock markers exist
|
||||
$blockStartExists = $localHostsContent -like \"*#AdobeNetBlock-start*\"
|
||||
if ($blockStartExists) {
|
||||
Write-Output \"AdobeNetBlock-start already exists. Skipping addition of new block.\"
|
||||
} else {
|
||||
# Load the new block from the downloaded file
|
||||
$newBlockContent = Get-Content $tempHostsPath -ErrorAction Stop
|
||||
$newBlockContent = $newBlockContent | Where-Object { $_ -notmatch \"^\\s*#\" -and $_ -ne \"\" } # Exclude empty lines and comments
|
||||
$newBlockHeader = \"#AdobeNetBlock-start\"
|
||||
$newBlockFooter = \"#AdobeNetBlock-end\"
|
||||
|
||||
# Combine the contents, ensuring new block is properly formatted
|
||||
$combinedContent = $localHostsContent + $newBlockHeader, $newBlockContent, $newBlockFooter | Out-String
|
||||
|
||||
# Write the combined content back to the original HOSTS file
|
||||
$combinedContent | Set-Content $localHostsPath -Encoding ASCII
|
||||
Write-Output \"Successfully added the AdobeNetBlock.\"
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Error \"Error during processing: $_\"
|
||||
}
|
||||
|
||||
# Clean up temporary file
|
||||
Remove-Item $tempHostsPath -ErrorAction Ignore
|
||||
|
||||
# Flush the DNS resolver cache
|
||||
try {
|
||||
Invoke-Expression \"ipconfig /flushdns\"
|
||||
Write-Output \"DNS cache flushed successfully.\"
|
||||
}
|
||||
catch {
|
||||
Write-Error \"Failed to flush DNS cache. Error: $_\"
|
||||
}
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
# Define the local path of the HOSTS file
|
||||
$localHostsPath = \"C:\\Windows\\System32\\drivers\\etc\\hosts\"
|
||||
|
||||
# Load the content of the HOSTS file
|
||||
try {
|
||||
$hostsContent = Get-Content $localHostsPath -ErrorAction Stop
|
||||
}
|
||||
catch {
|
||||
Write-Error \"Failed to load the HOSTS file. Error: $_\"
|
||||
return
|
||||
}
|
||||
|
||||
# Initialize flags and buffer for new content
|
||||
$recording = $true
|
||||
$newContent = @()
|
||||
|
||||
# Iterate over each line of the HOSTS file
|
||||
foreach ($line in $hostsContent) {
|
||||
if ($line -match \"#AdobeNetBlock-start\") {
|
||||
$recording = $false
|
||||
}
|
||||
if ($recording) {
|
||||
$newContent += $line
|
||||
}
|
||||
if ($line -match \"#AdobeNetBlock-end\") {
|
||||
$recording = $true
|
||||
}
|
||||
}
|
||||
|
||||
# Write the filtered content back to the HOSTS file
|
||||
try {
|
||||
$newContent | Set-Content $localHostsPath -Encoding ASCII
|
||||
Write-Output \"Successfully removed the AdobeNetBlock section from the HOSTS file.\"
|
||||
}
|
||||
catch {
|
||||
Write-Error \"Failed to write back to the HOSTS file. Error: $_\"
|
||||
}
|
||||
|
||||
# Flush the DNS resolver cache
|
||||
try {
|
||||
Invoke-Expression \"ipconfig /flushdns\"
|
||||
Write-Output \"DNS cache flushed successfully.\"
|
||||
}
|
||||
catch {
|
||||
Write-Error \"Failed to flush DNS cache. Error: $_\"
|
||||
}
|
||||
"
|
||||
]
|
||||
},
|
||||
"WPFTweaksRightClickMenu": {
|
||||
"Content": "Set Classic Right-Click Menu ",
|
||||
"Description": "Great Windows 11 tweak to bring back good context menus when right clicking things in explorer.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a028_",
|
||||
"Order": "a027_",
|
||||
"InvokeScript": [
|
||||
"
|
||||
New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"\"
|
||||
@ -11189,7 +11189,7 @@ $sync.configs.tweaks = '{
|
||||
"Description": "Disables IPv6.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a031_",
|
||||
"Order": "a023_",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
|
||||
@ -11211,7 +11211,7 @@ $sync.configs.tweaks = '{
|
||||
"Description": "Disables FSO in all applications. NOTE: This will disable Color Management in Exclusive Fullscreen",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a032_",
|
||||
"Order": "a024_",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKCU:\\System\\GameConfigStore",
|
||||
@ -11227,7 +11227,7 @@ $sync.configs.tweaks = '{
|
||||
"Description": "Enables IPv6.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a030_",
|
||||
"Order": "a023_",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
|
||||
@ -13653,8 +13653,6 @@ $inputXML = '<Window x:Class="WinUtility.MainWindow"
|
||||
<CheckBox Name="WPFTweaksDeleteTempFiles" Content="Delete Temporary Files" Margin="5,0" ToolTip="Erases TEMP Folders"/>
|
||||
<CheckBox Name="WPFTweaksDiskCleanup" Content="Run Disk Cleanup" Margin="5,0" ToolTip="Runs Disk Cleanup on Drive C: and removes old Windows Updates."/>
|
||||
<CheckBox Name="WPFTweaksLoc" Content="Disable Location Tracking" Margin="5,0" ToolTip="Disables Location Tracking...DUH!"/>
|
||||
<CheckBox Name="WPFTweaksDebloatAdobe" Content="Debloat Adobe" Margin="5,0" ToolTip="Manages Adobe Services, Adobe Desktop Service, and Acrobat Updates"/>
|
||||
<CheckBox Name="WPFTweaksBlockAdobeNet" Content="Block Adobe Networking" Margin="5,0" ToolTip="Reduce user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. "/>
|
||||
<CheckBox Name="WPFTweaksStorage" Content="Disable Storage Sense" Margin="5,0" ToolTip="Storage Sense deletes temp files automatically."/>
|
||||
<CheckBox Name="WPFTweaksHome" Content="Disable Homegroup" Margin="5,0" ToolTip="Disables HomeGroup - HomeGroup is a password-protected home networking service that lets you share your stuff with other PCs that are currently running and connected to your network."/>
|
||||
<CheckBox Name="WPFTweaksDVR" Content="Disable GameDVR" Margin="5,0" ToolTip="GameDVR is a Windows App that is a dependency for some Store Games. I've never met someone that likes it, but it's there for the XBOX crowd."/>
|
||||
@ -13662,17 +13660,19 @@ $inputXML = '<Window x:Class="WinUtility.MainWindow"
|
||||
<CheckBox Name="WPFTweaksTeredo" Content="Disable Teredo" Margin="5,0" ToolTip="Teredo network tunneling is a ipv6 feature that can cause additional latency."/>
|
||||
<CheckBox Name="WPFTweaksServices" Content="Set Services to Manual" Margin="5,0" ToolTip="Turns a bunch of system services to manual that don't need to be running all the time. This is pretty harmless as if the service is needed, it will simply start on demand."/>
|
||||
<Label Content="Advanced Tweaks - CAUTION" FontSize="16"/>
|
||||
<CheckBox Name="WPFTweaksDisplay" Content="Set Display for Performance" Margin="5,0" ToolTip="Sets the system preferences to performance. You can do this manually with sysdm.cpl as well."/>
|
||||
<CheckBox Name="WPFTweaksUTC" Content="Set Time to UTC (Dual Boot)" Margin="5,0" ToolTip="Essential for computers that are dual booting. Fixes the time sync with Linux Systems."/>
|
||||
<CheckBox Name="WPFTweaksDisableNotifications" Content="Disable Notification Tray/Calendar" Margin="5,0" ToolTip="Disables all Notifications INCLUDING Calendar"/>
|
||||
<CheckBox Name="WPFTweaksDeBloat" Content="Remove ALL MS Store Apps - NOT RECOMMENDED" Margin="5,0" ToolTip="USE WITH CAUTION!!!!! This will remove ALL Microsoft store apps other than the essentials to make winget work. Games installed by MS Store ARE INCLUDED!"/>
|
||||
<CheckBox Name="WPFTweaksBlockAdobeNet" Content="Adobe Network Block" Margin="5,0" ToolTip="Reduce user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. "/>
|
||||
<CheckBox Name="WPFTweaksDebloatAdobe" Content="Adobe Debloat" Margin="5,0" ToolTip="Manages Adobe Services, Adobe Desktop Service, and Acrobat Updates"/>
|
||||
<CheckBox Name="WPFTweaksDisableipsix" Content="Disable IPv6" Margin="5,0" ToolTip="Disables IPv6."/>
|
||||
<CheckBox Name="WPFTweaksEnableipsix" Content="Enable IPv6" Margin="5,0" ToolTip="Enables IPv6."/>
|
||||
<CheckBox Name="WPFTweaksDisableFSO" Content="Disable Fullscreen Optimizations" Margin="5,0" ToolTip="Disables FSO in all applications. NOTE: This will disable Color Management in Exclusive Fullscreen"/>
|
||||
<CheckBox Name="WPFTweaksRemoveCopilot" Content="Disables Microsoft Copilot" Margin="5,0" ToolTip="Disables MS Copilot AI built into Windows since 23H2."/>
|
||||
<CheckBox Name="WPFTweaksDisableNotifications" Content="Disable Notification Tray/Calendar" Margin="5,0" ToolTip="Disables all Notifications INCLUDING Calendar"/>
|
||||
<CheckBox Name="WPFTweaksDisplay" Content="Set Display for Performance" Margin="5,0" ToolTip="Sets the system preferences to performance. You can do this manually with sysdm.cpl as well."/>
|
||||
<CheckBox Name="WPFTweaksRightClickMenu" Content="Set Classic Right-Click Menu " Margin="5,0" ToolTip="Great Windows 11 tweak to bring back good context menus when right clicking things in explorer."/>
|
||||
<CheckBox Name="WPFTweaksUTC" Content="Set Time to UTC (Dual Boot)" Margin="5,0" ToolTip="Essential for computers that are dual booting. Fixes the time sync with Linux Systems."/>
|
||||
<CheckBox Name="WPFTweaksDeBloat" Content="Remove ALL MS Store Apps - NOT RECOMMENDED" Margin="5,0" ToolTip="USE WITH CAUTION!!!!! This will remove ALL Microsoft store apps other than the essentials to make winget work. Games installed by MS Store ARE INCLUDED!"/>
|
||||
<CheckBox Name="WPFTweaksRemoveEdge" Content="Remove Microsoft Edge - NOT RECOMMENDED" Margin="5,0" ToolTip="Removes MS Edge when it gets reinstalled by updates."/>
|
||||
<CheckBox Name="WPFTweaksRemoveOnedrive" Content="Remove OneDrive" Margin="5,0" ToolTip="Copies OneDrive files to Default Home Folders and Uninstalls it."/>
|
||||
<CheckBox Name="WPFTweaksRightClickMenu" Content="Set Classic Right-Click Menu " Margin="5,0" ToolTip="Great Windows 11 tweak to bring back good context menus when right clicking things in explorer."/>
|
||||
<CheckBox Name="WPFTweaksEnableipsix" Content="Enable IPv6" Margin="5,0" ToolTip="Enables IPv6."/>
|
||||
<CheckBox Name="WPFTweaksDisableipsix" Content="Disable IPv6" Margin="5,0" ToolTip="Disables IPv6."/>
|
||||
<CheckBox Name="WPFTweaksDisableFSO" Content="Disable Fullscreen Optimizations" Margin="5,0" ToolTip="Disables FSO in all applications. NOTE: This will disable Color Management in Exclusive Fullscreen"/>
|
||||
<Button Name="WPFOOSUbutton" Content="Customize OO Shutup Tweaks" HorizontalAlignment = "Left" Width="220" Margin="5" Padding="20,5" />
|
||||
<StackPanel Orientation="Horizontal" Margin="0,5,0,0">
|
||||
<Label Content="DNS" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
||||
|
@ -14,8 +14,6 @@
|
||||
<CheckBox Name="WPFTweaksDeleteTempFiles" Content="Delete Temporary Files" Margin="5,0" ToolTip="Erases TEMP Folders"/>
|
||||
<CheckBox Name="WPFTweaksDiskCleanup" Content="Run Disk Cleanup" Margin="5,0" ToolTip="Runs Disk Cleanup on Drive C: and removes old Windows Updates."/>
|
||||
<CheckBox Name="WPFTweaksLoc" Content="Disable Location Tracking" Margin="5,0" ToolTip="Disables Location Tracking...DUH!"/>
|
||||
<CheckBox Name="WPFTweaksDebloatAdobe" Content="Debloat Adobe" Margin="5,0" ToolTip="Manages Adobe Services, Adobe Desktop Service, and Acrobat Updates"/>
|
||||
<CheckBox Name="WPFTweaksBlockAdobeNet" Content="Block Adobe Networking" Margin="5,0" ToolTip="Reduce user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. "/>
|
||||
<CheckBox Name="WPFTweaksStorage" Content="Disable Storage Sense" Margin="5,0" ToolTip="Storage Sense deletes temp files automatically."/>
|
||||
<CheckBox Name="WPFTweaksHome" Content="Disable Homegroup" Margin="5,0" ToolTip="Disables HomeGroup - HomeGroup is a password-protected home networking service that lets you share your stuff with other PCs that are currently running and connected to your network."/>
|
||||
<CheckBox Name="WPFTweaksDVR" Content="Disable GameDVR" Margin="5,0" ToolTip="GameDVR is a Windows App that is a dependency for some Store Games. I've never met someone that likes it, but it's there for the XBOX crowd."/>
|
||||
@ -23,17 +21,19 @@
|
||||
<CheckBox Name="WPFTweaksTeredo" Content="Disable Teredo" Margin="5,0" ToolTip="Teredo network tunneling is a ipv6 feature that can cause additional latency."/>
|
||||
<CheckBox Name="WPFTweaksServices" Content="Set Services to Manual" Margin="5,0" ToolTip="Turns a bunch of system services to manual that don't need to be running all the time. This is pretty harmless as if the service is needed, it will simply start on demand."/>
|
||||
<Label Content="Advanced Tweaks - CAUTION" FontSize="16"/>
|
||||
<CheckBox Name="WPFTweaksDisplay" Content="Set Display for Performance" Margin="5,0" ToolTip="Sets the system preferences to performance. You can do this manually with sysdm.cpl as well."/>
|
||||
<CheckBox Name="WPFTweaksUTC" Content="Set Time to UTC (Dual Boot)" Margin="5,0" ToolTip="Essential for computers that are dual booting. Fixes the time sync with Linux Systems."/>
|
||||
<CheckBox Name="WPFTweaksDisableNotifications" Content="Disable Notification Tray/Calendar" Margin="5,0" ToolTip="Disables all Notifications INCLUDING Calendar"/>
|
||||
<CheckBox Name="WPFTweaksDeBloat" Content="Remove ALL MS Store Apps - NOT RECOMMENDED" Margin="5,0" ToolTip="USE WITH CAUTION!!!!! This will remove ALL Microsoft store apps other than the essentials to make winget work. Games installed by MS Store ARE INCLUDED!"/>
|
||||
<CheckBox Name="WPFTweaksBlockAdobeNet" Content="Adobe Network Block" Margin="5,0" ToolTip="Reduce user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. "/>
|
||||
<CheckBox Name="WPFTweaksDebloatAdobe" Content="Adobe Debloat" Margin="5,0" ToolTip="Manages Adobe Services, Adobe Desktop Service, and Acrobat Updates"/>
|
||||
<CheckBox Name="WPFTweaksDisableipsix" Content="Disable IPv6" Margin="5,0" ToolTip="Disables IPv6."/>
|
||||
<CheckBox Name="WPFTweaksEnableipsix" Content="Enable IPv6" Margin="5,0" ToolTip="Enables IPv6."/>
|
||||
<CheckBox Name="WPFTweaksDisableFSO" Content="Disable Fullscreen Optimizations" Margin="5,0" ToolTip="Disables FSO in all applications. NOTE: This will disable Color Management in Exclusive Fullscreen"/>
|
||||
<CheckBox Name="WPFTweaksRemoveCopilot" Content="Disables Microsoft Copilot" Margin="5,0" ToolTip="Disables MS Copilot AI built into Windows since 23H2."/>
|
||||
<CheckBox Name="WPFTweaksDisableNotifications" Content="Disable Notification Tray/Calendar" Margin="5,0" ToolTip="Disables all Notifications INCLUDING Calendar"/>
|
||||
<CheckBox Name="WPFTweaksDisplay" Content="Set Display for Performance" Margin="5,0" ToolTip="Sets the system preferences to performance. You can do this manually with sysdm.cpl as well."/>
|
||||
<CheckBox Name="WPFTweaksRightClickMenu" Content="Set Classic Right-Click Menu " Margin="5,0" ToolTip="Great Windows 11 tweak to bring back good context menus when right clicking things in explorer."/>
|
||||
<CheckBox Name="WPFTweaksUTC" Content="Set Time to UTC (Dual Boot)" Margin="5,0" ToolTip="Essential for computers that are dual booting. Fixes the time sync with Linux Systems."/>
|
||||
<CheckBox Name="WPFTweaksDeBloat" Content="Remove ALL MS Store Apps - NOT RECOMMENDED" Margin="5,0" ToolTip="USE WITH CAUTION!!!!! This will remove ALL Microsoft store apps other than the essentials to make winget work. Games installed by MS Store ARE INCLUDED!"/>
|
||||
<CheckBox Name="WPFTweaksRemoveEdge" Content="Remove Microsoft Edge - NOT RECOMMENDED" Margin="5,0" ToolTip="Removes MS Edge when it gets reinstalled by updates."/>
|
||||
<CheckBox Name="WPFTweaksRemoveOnedrive" Content="Remove OneDrive" Margin="5,0" ToolTip="Copies OneDrive files to Default Home Folders and Uninstalls it."/>
|
||||
<CheckBox Name="WPFTweaksRightClickMenu" Content="Set Classic Right-Click Menu " Margin="5,0" ToolTip="Great Windows 11 tweak to bring back good context menus when right clicking things in explorer."/>
|
||||
<CheckBox Name="WPFTweaksEnableipsix" Content="Enable IPv6" Margin="5,0" ToolTip="Enables IPv6."/>
|
||||
<CheckBox Name="WPFTweaksDisableipsix" Content="Disable IPv6" Margin="5,0" ToolTip="Disables IPv6."/>
|
||||
<CheckBox Name="WPFTweaksDisableFSO" Content="Disable Fullscreen Optimizations" Margin="5,0" ToolTip="Disables FSO in all applications. NOTE: This will disable Color Management in Exclusive Fullscreen"/>
|
||||
<Button Name="WPFOOSUbutton" Content="Customize OO Shutup Tweaks" HorizontalAlignment = "Left" Width="220" Margin="5" Padding="20,5" />
|
||||
<StackPanel Orientation="Horizontal" Margin="0,5,0,0">
|
||||
<Label Content="DNS" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
||||
|
Loading…
Reference in New Issue
Block a user