mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-24 06:51:30 -06:00
add reg params for toggles into tweaks.json
- add all reg keys to tweaks.json into existing toggle entry - remove unneeded scripts
This commit is contained in:
parent
f0afb6735a
commit
a93d44a6dc
@ -3293,6 +3293,28 @@
|
||||
"panel": "2",
|
||||
"Order": "a100_",
|
||||
"Type": "Toggle",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize",
|
||||
"Name": "AppsUseLightTheme",
|
||||
"Value": "0",
|
||||
"OriginalValue": "1",
|
||||
"Type": "DWord"
|
||||
},
|
||||
{
|
||||
"Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize",
|
||||
"Name": "SystemUsesLightTheme",
|
||||
"Value": "0",
|
||||
"OriginalValue": "1",
|
||||
"Type": "DWord"
|
||||
}
|
||||
],
|
||||
"InvokeScript": [
|
||||
"Invoke-WinUtilExplorerRefresh"
|
||||
],
|
||||
"UndoScript": [
|
||||
"Invoke-WinUtilExplorerRefresh"
|
||||
],
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/DarkMode"
|
||||
},
|
||||
"WPFToggleBingSearch": {
|
||||
@ -3320,6 +3342,22 @@
|
||||
"panel": "2",
|
||||
"Order": "a102_",
|
||||
"Type": "Toggle",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKU:\\.Default\\Control Panel\\Keyboard",
|
||||
"Name": "InitialKeyboardIndicators",
|
||||
"Value": "2",
|
||||
"OriginalValue": "0",
|
||||
"Type": "DWord"
|
||||
},
|
||||
{
|
||||
"Path": "HKCU:\\Control Panel\\Keyboard",
|
||||
"Name": "InitialKeyboardIndicators",
|
||||
"Value": "2",
|
||||
"OriginalValue": "0",
|
||||
"Type": "DWord"
|
||||
}
|
||||
],
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/NumLock"
|
||||
},
|
||||
"WPFToggleVerboseLogon": {
|
||||
@ -3329,6 +3367,15 @@
|
||||
"panel": "2",
|
||||
"Order": "a103_",
|
||||
"Type": "Toggle",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System",
|
||||
"Name": "VerboseStatus",
|
||||
"Value": "1",
|
||||
"OriginalValue": "0",
|
||||
"Type": "DWord"
|
||||
}
|
||||
],
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/VerboseLogon"
|
||||
},
|
||||
"WPFToggleSnapWindow": {
|
||||
@ -3338,6 +3385,15 @@
|
||||
"panel": "2",
|
||||
"Order": "a104_",
|
||||
"Type": "Toggle",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKCU:\\Control Panel\\Desktop",
|
||||
"Name": "WindowArrangementActive",
|
||||
"Value": "1",
|
||||
"OriginalValue": "0",
|
||||
"Type": "DWord"
|
||||
}
|
||||
],
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/SnapWindow"
|
||||
},
|
||||
"WPFToggleSnapFlyout": {
|
||||
@ -3347,6 +3403,15 @@
|
||||
"panel": "2",
|
||||
"Order": "a105_",
|
||||
"Type": "Toggle",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
|
||||
"Name": "EnableSnapAssistFlyout",
|
||||
"Value": "1",
|
||||
"OriginalValue": "0",
|
||||
"Type": "DWord"
|
||||
}
|
||||
],
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/SnapFlyout"
|
||||
},
|
||||
"WPFToggleSnapSuggestion": {
|
||||
@ -3356,6 +3421,15 @@
|
||||
"panel": "2",
|
||||
"Order": "a106_",
|
||||
"Type": "Toggle",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
|
||||
"Name": "SnapAssist",
|
||||
"Value": "1",
|
||||
"OriginalValue": "0",
|
||||
"Type": "DWord"
|
||||
}
|
||||
],
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/SnapSuggestion"
|
||||
},
|
||||
"WPFToggleMouseAcceleration": {
|
||||
@ -3365,6 +3439,29 @@
|
||||
"panel": "2",
|
||||
"Order": "a107_",
|
||||
"Type": "Toggle",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKCU:\\Control Panel\\Mouse",
|
||||
"Name": "MouseSpeed",
|
||||
"Value": "1",
|
||||
"OriginalValue": "0",
|
||||
"Type": "DWord"
|
||||
},
|
||||
{
|
||||
"Path": "HKCU:\\Control Panel\\Mouse",
|
||||
"Name": "MouseThreshold1",
|
||||
"Value": "6",
|
||||
"OriginalValue": "0",
|
||||
"Type": "DWord"
|
||||
},
|
||||
{
|
||||
"Path": "HKCU:\\Control Panel\\Mouse",
|
||||
"Name": "MouseThreshold2",
|
||||
"Value": "10",
|
||||
"OriginalValue": "0",
|
||||
"Type": "DWord"
|
||||
}
|
||||
],
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/MouseAcceleration"
|
||||
},
|
||||
"WPFToggleStickyKeys": {
|
||||
@ -3374,6 +3471,15 @@
|
||||
"panel": "2",
|
||||
"Order": "a108_",
|
||||
"Type": "Toggle",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKCU:\\Control Panel\\Accessibility\\StickyKeys",
|
||||
"Name": "Flags",
|
||||
"Value": "510",
|
||||
"OriginalValue": "58",
|
||||
"Type": "DWord"
|
||||
}
|
||||
],
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/StickyKeys"
|
||||
},
|
||||
"WPFToggleHiddenFiles": {
|
||||
@ -3383,6 +3489,15 @@
|
||||
"panel": "2",
|
||||
"Order": "a200_",
|
||||
"Type": "Toggle",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
|
||||
"Name": "Hidden",
|
||||
"Value": "1",
|
||||
"OriginalValue": "0",
|
||||
"Type": "DWord"
|
||||
}
|
||||
],
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/HiddenFiles"
|
||||
},
|
||||
"WPFToggleShowExt": {
|
||||
@ -3392,6 +3507,15 @@
|
||||
"panel": "2",
|
||||
"Order": "a201_",
|
||||
"Type": "Toggle",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
|
||||
"Name": "HideFileExt",
|
||||
"Value": "0",
|
||||
"OriginalValue": "1",
|
||||
"Type": "DWord"
|
||||
}
|
||||
],
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/ShowExt"
|
||||
},
|
||||
"WPFToggleTaskbarSearch": {
|
||||
@ -3401,6 +3525,15 @@
|
||||
"panel": "2",
|
||||
"Order": "a202_",
|
||||
"Type": "Toggle",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Search",
|
||||
"Name": "SearchboxTaskbarMode",
|
||||
"Value": "1",
|
||||
"OriginalValue": "0",
|
||||
"Type": "DWord"
|
||||
}
|
||||
],
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskbarSearch"
|
||||
},
|
||||
"WPFToggleTaskView": {
|
||||
@ -3410,6 +3543,15 @@
|
||||
"panel": "2",
|
||||
"Order": "a203_",
|
||||
"Type": "Toggle",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
|
||||
"Name": "ShowTaskViewButton",
|
||||
"Value": "1",
|
||||
"OriginalValue": "0",
|
||||
"Type": "DWord"
|
||||
}
|
||||
],
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskView"
|
||||
},
|
||||
"WPFToggleTaskbarWidgets": {
|
||||
@ -3419,6 +3561,15 @@
|
||||
"panel": "2",
|
||||
"Order": "a204_",
|
||||
"Type": "Toggle",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
|
||||
"Name": "TaskbarDa",
|
||||
"Value": "1",
|
||||
"OriginalValue": "0",
|
||||
"Type": "DWord"
|
||||
}
|
||||
],
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskbarWidgets"
|
||||
},
|
||||
"WPFToggleTaskbarAlignment": {
|
||||
@ -3428,6 +3579,15 @@
|
||||
"panel": "2",
|
||||
"Order": "a204_",
|
||||
"Type": "Toggle",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
|
||||
"Name": "TaskbarAl",
|
||||
"Value": "1",
|
||||
"OriginalValue": "0",
|
||||
"Type": "DWord"
|
||||
}
|
||||
],
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskbarAlignment"
|
||||
},
|
||||
"WPFToggleDetailedBSoD": {
|
||||
@ -3437,6 +3597,22 @@
|
||||
"panel": "2",
|
||||
"Order": "a205_",
|
||||
"Type": "Toggle",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\CrashControl",
|
||||
"Name": "DisplayParameters",
|
||||
"Value": "1",
|
||||
"OriginalValue": "0",
|
||||
"Type": "DWord"
|
||||
},
|
||||
{
|
||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\CrashControl",
|
||||
"Name": "DisableEmoticon",
|
||||
"Value": "1",
|
||||
"OriginalValue": "0",
|
||||
"Type": "DWord"
|
||||
}
|
||||
],
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/DetailedBSoD"
|
||||
},
|
||||
"WPFOOSUbutton": {
|
||||
|
@ -1,30 +0,0 @@
|
||||
function Invoke-WinUtilBingSearch {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Disables/Enables Bing Search
|
||||
|
||||
.PARAMETER Enabled
|
||||
Indicates whether to enable or disable Bing Search
|
||||
|
||||
#>
|
||||
Param($Enabled)
|
||||
try {
|
||||
if ($Enabled -eq $false) {
|
||||
Write-Host "Enabling Bing Search"
|
||||
$value = 1
|
||||
} else {
|
||||
Write-Host "Disabling Bing Search"
|
||||
$value = 0
|
||||
}
|
||||
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search"
|
||||
Set-ItemProperty -Path $Path -Name BingSearchEnabled -Value $value
|
||||
} catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||
} catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
} catch {
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
Function Invoke-WinUtilDarkMode {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Enables/Disables Dark Mode
|
||||
|
||||
.PARAMETER DarkMoveEnabled
|
||||
Indicates the current dark mode state
|
||||
|
||||
#>
|
||||
Param($DarkMoveEnabled)
|
||||
try {
|
||||
if ($DarkMoveEnabled -eq $false) {
|
||||
Write-Host "Enabling Dark Mode"
|
||||
$DarkMoveValue = 0
|
||||
} else {
|
||||
Write-Host "Disabling Dark Mode"
|
||||
$DarkMoveValue = 1
|
||||
}
|
||||
|
||||
$Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
|
||||
Set-ItemProperty -Path $Path -Name AppsUseLightTheme -Value $DarkMoveValue
|
||||
Set-ItemProperty -Path $Path -Name SystemUsesLightTheme -Value $DarkMoveValue
|
||||
Invoke-WinUtilExplorerRefresh
|
||||
# Update Winutil Theme if the Theme Button shows the Icon for Auto
|
||||
if ($sync.ThemeButton.Content -eq [char]0xF08C) {
|
||||
Invoke-WinutilThemeChange -theme "Auto"
|
||||
}
|
||||
} catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||
} catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
} catch {
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
Function Invoke-WinUtilDetailedBSoD {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Enables/Disables Detailed BSoD
|
||||
(Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl' -Name 'DisplayParameters').DisplayParameters
|
||||
|
||||
|
||||
#>
|
||||
Param($Enabled)
|
||||
try {
|
||||
if ($Enabled -eq $false) {
|
||||
Write-Host "Enabling Detailed BSoD"
|
||||
$value = 1
|
||||
} else {
|
||||
Write-Host "Disabling Detailed BSoD"
|
||||
$value =0
|
||||
}
|
||||
|
||||
$Path = "HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl"
|
||||
$dwords = ("DisplayParameters", "DisableEmoticon")
|
||||
foreach ($name in $dwords) {
|
||||
Set-ItemProperty -Path $Path -Name $name -Value $value
|
||||
}
|
||||
Set-ItemProperty -Path $Path -Name DisplayParameters -Value $value
|
||||
} catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||
} catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
} catch {
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
function Invoke-WinUtilHiddenFiles {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Enable/Disable Hidden Files
|
||||
|
||||
.PARAMETER Enabled
|
||||
Indicates whether to enable or disable Hidden Files
|
||||
|
||||
#>
|
||||
Param($Enabled)
|
||||
try {
|
||||
if ($Enabled -eq $false) {
|
||||
Write-Host "Enabling Hidden Files"
|
||||
$value = 1
|
||||
} else {
|
||||
Write-Host "Disabling Hidden Files"
|
||||
$value = 0
|
||||
}
|
||||
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||
Set-ItemProperty -Path $Path -Name Hidden -Value $value
|
||||
} catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||
} catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
} catch {
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
Function Invoke-WinUtilMouseAcceleration {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Enables/Disables Mouse Acceleration
|
||||
|
||||
.PARAMETER DarkMoveEnabled
|
||||
Indicates the current Mouse Acceleration State
|
||||
|
||||
#>
|
||||
Param($MouseAccelerationEnabled)
|
||||
try {
|
||||
if ($MouseAccelerationEnabled -eq $false) {
|
||||
Write-Host "Enabling Mouse Acceleration"
|
||||
$MouseSpeed = 1
|
||||
$MouseThreshold1 = 6
|
||||
$MouseThreshold2 = 10
|
||||
} else {
|
||||
Write-Host "Disabling Mouse Acceleration"
|
||||
$MouseSpeed = 0
|
||||
$MouseThreshold1 = 0
|
||||
$MouseThreshold2 = 0
|
||||
|
||||
}
|
||||
|
||||
$Path = "HKCU:\Control Panel\Mouse"
|
||||
Set-ItemProperty -Path $Path -Name MouseSpeed -Value $MouseSpeed
|
||||
Set-ItemProperty -Path $Path -Name MouseThreshold1 -Value $MouseThreshold1
|
||||
Set-ItemProperty -Path $Path -Name MouseThreshold2 -Value $MouseThreshold2
|
||||
} catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||
} catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
} catch {
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
function Invoke-WinUtilShowExt {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Disables/Enables Show file Extentions
|
||||
.PARAMETER Enabled
|
||||
Indicates whether to enable or disable Show file extentions
|
||||
#>
|
||||
Param($Enabled)
|
||||
try {
|
||||
if ($Enabled -eq $false) {
|
||||
Write-Host "Showing file extentions"
|
||||
$value = 0
|
||||
} else {
|
||||
Write-Host "hiding file extensions"
|
||||
$value = 1
|
||||
}
|
||||
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||
Set-ItemProperty -Path $Path -Name HideFileExt -Value $value
|
||||
} catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||
} catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
} catch {
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
function Invoke-WinUtilSnapFlyout {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Disables/Enables Snap Assist Flyout on startup
|
||||
.PARAMETER Enabled
|
||||
Indicates whether to enable or disable Snap Assist Flyout on startup
|
||||
#>
|
||||
Param($Enabled)
|
||||
try {
|
||||
if ($Enabled -eq $false) {
|
||||
Write-Host "Enabling Snap Assist Flyout On startup"
|
||||
$value = 1
|
||||
} else {
|
||||
Write-Host "Disabling Snap Assist Flyout On startup"
|
||||
$value = 0
|
||||
}
|
||||
|
||||
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||
taskkill.exe /F /IM "explorer.exe"
|
||||
Set-ItemProperty -Path $Path -Name EnableSnapAssistFlyout -Value $value
|
||||
Start-Process "explorer.exe"
|
||||
} catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||
} catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
} catch {
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
function Invoke-WinUtilSnapSuggestion {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Disables/Enables Snap Assist Suggestions on startup
|
||||
.PARAMETER Enabled
|
||||
Indicates whether to enable or disable Snap Assist Suggestions on startup
|
||||
#>
|
||||
Param($Enabled)
|
||||
try {
|
||||
if ($Enabled -eq $false) {
|
||||
Write-Host "Enabling Snap Assist Suggestion On startup"
|
||||
$value = 1
|
||||
} else {
|
||||
Write-Host "Disabling Snap Assist Suggestion On startup"
|
||||
$value = 0
|
||||
}
|
||||
# taskkill.exe /F /IM "explorer.exe"
|
||||
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||
taskkill.exe /F /IM "explorer.exe"
|
||||
Set-ItemProperty -Path $Path -Name SnapAssist -Value $value
|
||||
Start-Process "explorer.exe"
|
||||
} catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||
} catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
} catch {
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
function Invoke-WinUtilSnapWindow {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Disables/Enables Snapping Windows on startup
|
||||
.PARAMETER Enabled
|
||||
Indicates whether to enable or disable Snapping Windows on startup
|
||||
#>
|
||||
Param($Enabled)
|
||||
try {
|
||||
if ($Enabled -eq $false) {
|
||||
Write-Host "Enabling Snap Windows On startup | Relogin Required"
|
||||
$value = 1
|
||||
} else {
|
||||
Write-Host "Disabling Snap Windows On startup | Relogin Required"
|
||||
$value = 0
|
||||
}
|
||||
$Path = "HKCU:\Control Panel\Desktop"
|
||||
Set-ItemProperty -Path $Path -Name WindowArrangementActive -Value $value
|
||||
} catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||
} catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
} catch {
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
Function Invoke-WinUtilStickyKeys {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Disables/Enables Sticky Keyss on startup
|
||||
.PARAMETER Enabled
|
||||
Indicates whether to enable or disable Sticky Keys on startup
|
||||
#>
|
||||
Param($Enabled)
|
||||
try {
|
||||
if ($Enabled -eq $false) {
|
||||
Write-Host "Enabling Sticky Keys On startup"
|
||||
$value = 510
|
||||
} else {
|
||||
Write-Host "Disabling Sticky Keys On startup"
|
||||
$value = 58
|
||||
}
|
||||
$Path = "HKCU:\Control Panel\Accessibility\StickyKeys"
|
||||
Set-ItemProperty -Path $Path -Name Flags -Value $value
|
||||
} catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||
} catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
} catch {
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
function Invoke-WinUtilTaskView {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Enable/Disable Task View
|
||||
|
||||
.PARAMETER Enabled
|
||||
Indicates whether to enable or disable Task View
|
||||
|
||||
#>
|
||||
Param($Enabled)
|
||||
try {
|
||||
if ($Enabled -eq $false) {
|
||||
Write-Host "Enabling Task View"
|
||||
$value = 1
|
||||
} else {
|
||||
Write-Host "Disabling Task View"
|
||||
$value = 0
|
||||
}
|
||||
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||
Set-ItemProperty -Path $Path -Name ShowTaskViewButton -Value $value
|
||||
} catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||
} catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
} catch {
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
function Invoke-WinUtilTaskbarAlignment {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Switches between Center & Left Taskbar Alignment
|
||||
|
||||
.PARAMETER Enabled
|
||||
Indicates whether to make Taskbar Alignment Center or Left
|
||||
|
||||
#>
|
||||
Param($Enabled)
|
||||
try {
|
||||
if ($Enabled -eq $false) {
|
||||
Write-Host "Making Taskbar Alignment to the Center"
|
||||
$value = 1
|
||||
} else {
|
||||
Write-Host "Making Taskbar Alignment to the Left"
|
||||
$value = 0
|
||||
}
|
||||
$Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||
Set-ItemProperty -Path $Path -Name "TaskbarAl" -Value $value
|
||||
} catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $value due to a Security Exception"
|
||||
} catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
} catch {
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
function Invoke-WinUtilTaskbarSearch {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Enable/Disable Taskbar Search Button.
|
||||
|
||||
.PARAMETER Enabled
|
||||
Indicates whether to enable or disable Taskbar Search Button.
|
||||
|
||||
#>
|
||||
Param($Enabled)
|
||||
try {
|
||||
if ($Enabled -eq $false) {
|
||||
Write-Host "Enabling Search Button"
|
||||
$value = 1
|
||||
} else {
|
||||
Write-Host "Disabling Search Button"
|
||||
$value = 0
|
||||
}
|
||||
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search\"
|
||||
Set-ItemProperty -Path $Path -Name SearchboxTaskbarMode -Value $value
|
||||
} catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||
} catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
} catch {
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
function Invoke-WinUtilTaskbarWidgets {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Enable/Disable Taskbar Widgets
|
||||
|
||||
.PARAMETER Enabled
|
||||
Indicates whether to enable or disable Taskbar Widgets
|
||||
|
||||
#>
|
||||
Param($Enabled)
|
||||
try {
|
||||
if ($Enabled -eq $false) {
|
||||
Write-Host "Enabling Taskbar Widgets"
|
||||
$value = 1
|
||||
} else {
|
||||
Write-Host "Disabling Taskbar Widgets"
|
||||
$value = 0
|
||||
}
|
||||
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||
Set-ItemProperty -Path $Path -Name TaskbarDa -Value $value
|
||||
} catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||
} catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
} catch {
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
function Invoke-WinUtilVerboseLogon {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Disables/Enables VerboseLogon Messages
|
||||
.PARAMETER Enabled
|
||||
Indicates whether to enable or disable VerboseLogon messages
|
||||
#>
|
||||
Param($Enabled)
|
||||
try {
|
||||
if ($Enabled -eq $false) {
|
||||
Write-Host "Enabling Verbose Logon Messages"
|
||||
$value = 1
|
||||
} else {
|
||||
Write-Host "Disabling Verbose Logon Messages"
|
||||
$value = 0
|
||||
}
|
||||
$Path = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
|
||||
Set-ItemProperty -Path $Path -Name VerboseStatus -Value $value
|
||||
} catch [System.Security.SecurityException] {
|
||||
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||
} catch [System.Management.Automation.ItemNotFoundException] {
|
||||
Write-Warning $psitem.Exception.ErrorRecord
|
||||
} catch {
|
||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||
Write-Warning $psitem.Exception.StackTrace
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user