mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-17 18:27:42 -06:00
Reorder Tweaks
This commit is contained in:
parent
ed56090a69
commit
2568d5fe8b
@ -77,267 +77,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"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": {
|
"WPFTweaksLoc": {
|
||||||
"Content": "Disable Location Tracking",
|
"Content": "Disable Location Tracking",
|
||||||
"Description": "Disables Location Tracking...DUH!",
|
"Description": "Disables Location Tracking...DUH!",
|
||||||
@ -2327,7 +2066,7 @@
|
|||||||
"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!",
|
"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",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a025_",
|
"Order": "a028_",
|
||||||
"appx": [
|
"appx": [
|
||||||
"Microsoft.Microsoft3DViewer",
|
"Microsoft.Microsoft3DViewer",
|
||||||
"Microsoft.AppConnector",
|
"Microsoft.AppConnector",
|
||||||
@ -2546,7 +2285,7 @@
|
|||||||
"Description": "Removes MS Edge when it gets reinstalled by updates.",
|
"Description": "Removes MS Edge when it gets reinstalled by updates.",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a026_",
|
"Order": "a029_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
#:: Standalone script by AveYo Source: https://raw.githubusercontent.com/AveYo/fox/main/Edge_Removal.bat
|
#:: Standalone script by AveYo Source: https://raw.githubusercontent.com/AveYo/fox/main/Edge_Removal.bat
|
||||||
@ -2587,7 +2326,7 @@
|
|||||||
"Description": "Copies OneDrive files to Default Home Folders and Uninstalls it.",
|
"Description": "Copies OneDrive files to Default Home Folders and Uninstalls it.",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a027_",
|
"Order": "a030_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
|
|
||||||
@ -2670,7 +2409,7 @@
|
|||||||
"Description": "Disables all Notifications INCLUDING Calendar",
|
"Description": "Disables all Notifications INCLUDING Calendar",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a024_",
|
"Order": "a026_",
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKCU:\\Software\\Policies\\Microsoft\\Windows\\Explorer",
|
"Path": "HKCU:\\Software\\Policies\\Microsoft\\Windows\\Explorer",
|
||||||
@ -2688,12 +2427,273 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"WPFTweaksDebloatAdobe": {
|
||||||
|
"Content": "Debloat Adobe",
|
||||||
|
"Description": "Manages Adobe Services, Adobe Desktop Service, and Acrobat Updates",
|
||||||
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a022_",
|
||||||
|
"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": "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": {
|
"WPFTweaksRightClickMenu": {
|
||||||
"Content": "Set Classic Right-Click Menu ",
|
"Content": "Set Classic Right-Click Menu ",
|
||||||
"Description": "Great Windows 11 tweak to bring back good context menus when right clicking things in explorer.",
|
"Description": "Great Windows 11 tweak to bring back good context menus when right clicking things in explorer.",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a028_",
|
"Order": "a027_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"\"
|
New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"\"
|
||||||
@ -2808,7 +2808,7 @@
|
|||||||
"Description": "Disables IPv6.",
|
"Description": "Disables IPv6.",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a031_",
|
"Order": "a024_",
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
|
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
|
||||||
@ -2846,7 +2846,7 @@
|
|||||||
"Description": "Enables IPv6.",
|
"Description": "Enables IPv6.",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a030_",
|
"Order": "a023_",
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
|
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
|
||||||
|
Loading…
Reference in New Issue
Block a user