mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-09-07 11:45:46 -05:00
Compare commits
25 Commits
24.10.01
...
667d96c397
Author | SHA1 | Date | |
---|---|---|---|
667d96c397 | |||
feff1078d8 | |||
a4fccd3c85 | |||
5c2d5fae1e | |||
a93d44a6dc | |||
f0afb6735a | |||
ce1ef2a519 | |||
77cb0a14c4 | |||
c254a43f77 | |||
640d2ca107 | |||
c186642998 | |||
47a4f1547e | |||
1caf3111d3 | |||
7dcdc4dbb7 | |||
bfaba14191 | |||
5640f9d04c | |||
c6a832b006 | |||
fe19094395 | |||
fdd32f441f | |||
e4565f1f6f | |||
1404efab26 | |||
1deb863f40 | |||
de73efa868 | |||
59097fc7e1 | |||
207ce43428 |
@ -445,7 +445,7 @@
|
|||||||
"category": "Utilities",
|
"category": "Utilities",
|
||||||
"content": "Dual Monitor Tools",
|
"content": "Dual Monitor Tools",
|
||||||
"link": "https://dualmonitortool.sourceforge.net/",
|
"link": "https://dualmonitortool.sourceforge.net/",
|
||||||
"description": "Dual Monitor Tools (DMT) is a FOSS app that customize handling multiple monitors and even lock the mouse on specific monitor. Useful for full screen games and apps that does not handle well a second monitor or helps the workflow."
|
"description": "Dual Monitor Tools (DMT) is a FOSS app that allows you to customize the handling of multiple monitors. Useful for fullscreen games and apps that handle a second monitor poorly and can improve your workflow."
|
||||||
},
|
},
|
||||||
"duplicati": {
|
"duplicati": {
|
||||||
"category": "Utilities",
|
"category": "Utilities",
|
||||||
|
@ -321,5 +321,5 @@
|
|||||||
"Order": "a084_",
|
"Order": "a084_",
|
||||||
"Type": "Button",
|
"Type": "Button",
|
||||||
"ButtonWidth": "300"
|
"ButtonWidth": "300"
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
@ -2584,6 +2584,36 @@
|
|||||||
],
|
],
|
||||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot"
|
"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": {
|
"WPFTweaksDisableLMS1": {
|
||||||
"Content": "Disable Intel MM (vPro LMS)",
|
"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.",
|
"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.",
|
||||||
@ -3263,6 +3293,32 @@
|
|||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a100_",
|
"Order": "a100_",
|
||||||
"Type": "Toggle",
|
"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"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/DarkMode"
|
||||||
},
|
},
|
||||||
"WPFToggleBingSearch": {
|
"WPFToggleBingSearch": {
|
||||||
@ -3272,6 +3328,15 @@
|
|||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a101_",
|
"Order": "a101_",
|
||||||
"Type": "Toggle",
|
"Type": "Toggle",
|
||||||
|
"registry": [
|
||||||
|
{
|
||||||
|
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Search",
|
||||||
|
"Name": "BingSearchEnabled",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1",
|
||||||
|
"Type": "DWord"
|
||||||
|
}
|
||||||
|
],
|
||||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/BingSearch"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/BingSearch"
|
||||||
},
|
},
|
||||||
"WPFToggleNumLock": {
|
"WPFToggleNumLock": {
|
||||||
@ -3281,6 +3346,22 @@
|
|||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a102_",
|
"Order": "a102_",
|
||||||
"Type": "Toggle",
|
"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"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/NumLock"
|
||||||
},
|
},
|
||||||
"WPFToggleVerboseLogon": {
|
"WPFToggleVerboseLogon": {
|
||||||
@ -3290,6 +3371,15 @@
|
|||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a103_",
|
"Order": "a103_",
|
||||||
"Type": "Toggle",
|
"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"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/VerboseLogon"
|
||||||
},
|
},
|
||||||
"WPFToggleSnapWindow": {
|
"WPFToggleSnapWindow": {
|
||||||
@ -3299,6 +3389,15 @@
|
|||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a104_",
|
"Order": "a104_",
|
||||||
"Type": "Toggle",
|
"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"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/SnapWindow"
|
||||||
},
|
},
|
||||||
"WPFToggleSnapFlyout": {
|
"WPFToggleSnapFlyout": {
|
||||||
@ -3308,6 +3407,15 @@
|
|||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a105_",
|
"Order": "a105_",
|
||||||
"Type": "Toggle",
|
"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"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/SnapFlyout"
|
||||||
},
|
},
|
||||||
"WPFToggleSnapSuggestion": {
|
"WPFToggleSnapSuggestion": {
|
||||||
@ -3317,6 +3425,15 @@
|
|||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a106_",
|
"Order": "a106_",
|
||||||
"Type": "Toggle",
|
"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"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/SnapSuggestion"
|
||||||
},
|
},
|
||||||
"WPFToggleMouseAcceleration": {
|
"WPFToggleMouseAcceleration": {
|
||||||
@ -3326,6 +3443,29 @@
|
|||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a107_",
|
"Order": "a107_",
|
||||||
"Type": "Toggle",
|
"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"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/MouseAcceleration"
|
||||||
},
|
},
|
||||||
"WPFToggleStickyKeys": {
|
"WPFToggleStickyKeys": {
|
||||||
@ -3335,6 +3475,15 @@
|
|||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a108_",
|
"Order": "a108_",
|
||||||
"Type": "Toggle",
|
"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"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/StickyKeys"
|
||||||
},
|
},
|
||||||
"WPFToggleHiddenFiles": {
|
"WPFToggleHiddenFiles": {
|
||||||
@ -3344,6 +3493,15 @@
|
|||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a200_",
|
"Order": "a200_",
|
||||||
"Type": "Toggle",
|
"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"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/HiddenFiles"
|
||||||
},
|
},
|
||||||
"WPFToggleShowExt": {
|
"WPFToggleShowExt": {
|
||||||
@ -3353,6 +3511,15 @@
|
|||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a201_",
|
"Order": "a201_",
|
||||||
"Type": "Toggle",
|
"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"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/ShowExt"
|
||||||
},
|
},
|
||||||
"WPFToggleTaskbarSearch": {
|
"WPFToggleTaskbarSearch": {
|
||||||
@ -3362,6 +3529,15 @@
|
|||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a202_",
|
"Order": "a202_",
|
||||||
"Type": "Toggle",
|
"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"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskbarSearch"
|
||||||
},
|
},
|
||||||
"WPFToggleTaskView": {
|
"WPFToggleTaskView": {
|
||||||
@ -3371,6 +3547,15 @@
|
|||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a203_",
|
"Order": "a203_",
|
||||||
"Type": "Toggle",
|
"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"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskView"
|
||||||
},
|
},
|
||||||
"WPFToggleTaskbarWidgets": {
|
"WPFToggleTaskbarWidgets": {
|
||||||
@ -3380,6 +3565,15 @@
|
|||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a204_",
|
"Order": "a204_",
|
||||||
"Type": "Toggle",
|
"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"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskbarWidgets"
|
||||||
},
|
},
|
||||||
"WPFToggleTaskbarAlignment": {
|
"WPFToggleTaskbarAlignment": {
|
||||||
@ -3389,6 +3583,15 @@
|
|||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a204_",
|
"Order": "a204_",
|
||||||
"Type": "Toggle",
|
"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"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskbarAlignment"
|
||||||
},
|
},
|
||||||
"WPFToggleDetailedBSoD": {
|
"WPFToggleDetailedBSoD": {
|
||||||
@ -3398,6 +3601,22 @@
|
|||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a205_",
|
"Order": "a205_",
|
||||||
"Type": "Toggle",
|
"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"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/DetailedBSoD"
|
||||||
},
|
},
|
||||||
"WPFOOSUbutton": {
|
"WPFOOSUbutton": {
|
||||||
@ -3434,14 +3653,5 @@
|
|||||||
"Type": "Button",
|
"Type": "Button",
|
||||||
"ButtonWidth": "300",
|
"ButtonWidth": "300",
|
||||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Performance-Plans/RemoveUltPerf"
|
"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)
|
|
||||||
|
|
@ -19,10 +19,10 @@ function Copy-Files {
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
$files = Get-ChildItem -Path $path -Recurse:$recurse
|
$files = Get-ChildItem -Path $path -Recurse:$recurse
|
||||||
Write-Host "Copy $($files.Count)(s) from $path to $destination"
|
Write-Host "Copy $($files.Count) file(s) from $path to $destination"
|
||||||
|
|
||||||
foreach ($file in $files) {
|
foreach ($file in $files) {
|
||||||
$status = "Copy files {0} on {1}: {2}" -f $counter, $files.Count, $file.Name
|
$status = "Copying file {0} of {1}: {2}" -f $counter, $files.Count, $file.Name
|
||||||
Write-Progress -Activity "Copy Windows files" -Status $status -PercentComplete ($counter++/$files.count*100)
|
Write-Progress -Activity "Copy Windows files" -Status $status -PercentComplete ($counter++/$files.count*100)
|
||||||
$restpath = $file.FullName -Replace $path, ''
|
$restpath = $file.FullName -Replace $path, ''
|
||||||
|
|
||||||
@ -37,7 +37,11 @@ function Copy-Files {
|
|||||||
}
|
}
|
||||||
Write-Progress -Activity "Copy Windows files" -Status "Ready" -Completed
|
Write-Progress -Activity "Copy Windows files" -Status "Ready" -Completed
|
||||||
} catch {
|
} catch {
|
||||||
Write-Warning "Unable to Copy all the files due to unhandled exception"
|
Write-Host "Unable to Copy all the files due to an unhandled exception" -ForegroundColor Yellow
|
||||||
Write-Warning $psitem.Exception.StackTrace
|
Write-Host "Error information: $($_.Exception.Message)`n" -ForegroundColor Yellow
|
||||||
|
Write-Host "Additional information:" -ForegroundColor Yellow
|
||||||
|
Write-Host $PSItem.Exception.StackTrace
|
||||||
|
# Write possible suggestions
|
||||||
|
Write-Host "`nIf you are using an antivirus, try configuring exclusions"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,75 +13,39 @@ Function Get-WinUtilToggleStatus {
|
|||||||
#>
|
#>
|
||||||
|
|
||||||
Param($ToggleSwitch)
|
Param($ToggleSwitch)
|
||||||
if($ToggleSwitch -eq "WPFToggleDarkMode") {
|
|
||||||
$app = (Get-ItemProperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize').AppsUseLightTheme
|
|
||||||
$system = (Get-ItemProperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize').SystemUsesLightTheme
|
|
||||||
return $app -eq 0 -and $system -eq 0
|
|
||||||
}
|
|
||||||
if($ToggleSwitch -eq "WPFToggleBingSearch") {
|
|
||||||
$bingsearch = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Search').BingSearchEnabled
|
|
||||||
return $bingsearch -ne 0
|
|
||||||
}
|
|
||||||
if($ToggleSwitch -eq "WPFToggleNumLock") {
|
|
||||||
$numlockvalue = (Get-ItemProperty -path 'HKCU:\Control Panel\Keyboard').InitialKeyboardIndicators
|
|
||||||
return $numlockvalue -eq 2
|
|
||||||
}
|
|
||||||
if($ToggleSwitch -eq "WPFToggleVerboseLogon") {
|
|
||||||
$VerboseStatusvalue = (Get-ItemProperty -path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System').VerboseStatus
|
|
||||||
return $VerboseStatusvalue -eq 1
|
|
||||||
}
|
|
||||||
if($ToggleSwitch -eq "WPFToggleShowExt") {
|
|
||||||
$hideextvalue = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').HideFileExt
|
|
||||||
return $hideextvalue -eq 0
|
|
||||||
}
|
|
||||||
if($ToggleSwitch -eq "WPFToggleSnapWindow") {
|
|
||||||
$hidesnap = (Get-ItemProperty -path 'HKCU:\Control Panel\Desktop').WindowArrangementActive
|
|
||||||
return $hidesnap -ne 0
|
|
||||||
}
|
|
||||||
if($ToggleSwitch -eq "WPFToggleSnapFlyout") {
|
|
||||||
$hidesnap = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').EnableSnapAssistFlyout
|
|
||||||
return $hidesnap -ne 0
|
|
||||||
}
|
|
||||||
if($ToggleSwitch -eq "WPFToggleSnapSuggestion") {
|
|
||||||
$hidesnap = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').SnapAssist
|
|
||||||
return $hidesnap -ne 0
|
|
||||||
}
|
|
||||||
if($ToggleSwitch -eq "WPFToggleMouseAcceleration") {
|
|
||||||
$MouseSpeed = (Get-ItemProperty -path 'HKCU:\Control Panel\Mouse').MouseSpeed
|
|
||||||
$MouseThreshold1 = (Get-ItemProperty -path 'HKCU:\Control Panel\Mouse').MouseThreshold1
|
|
||||||
$MouseThreshold2 = (Get-ItemProperty -path 'HKCU:\Control Panel\Mouse').MouseThreshold2
|
|
||||||
|
|
||||||
return $MouseSpeed -eq 1 -and $MouseThreshold1 -eq 6 -and $MouseThreshold2 -eq 10
|
$ToggleSwitchReg = $sync.configs.tweaks.$ToggleSwitch.registry
|
||||||
}
|
|
||||||
if($ToggleSwitch -eq "WPFToggleTaskbarSearch") {
|
if (($ToggleSwitchReg.path -imatch "hku") -and !(Get-PSDrive -Name HKU -ErrorAction SilentlyContinue)) {
|
||||||
$SearchButton = (Get-ItemProperty -path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search").SearchboxTaskbarMode
|
$null = (New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS)
|
||||||
return $SearchButton -ne 0
|
if (Get-PSDrive -Name HKU -ErrorAction SilentlyContinue) {
|
||||||
}
|
Write-Debug "HKU drive created successfully"
|
||||||
if ($ToggleSwitch -eq "WPFToggleStickyKeys") {
|
} else {
|
||||||
$StickyKeys = (Get-ItemProperty -path 'HKCU:\Control Panel\Accessibility\StickyKeys').Flags
|
Write-Debug "Failed to create HKU drive"
|
||||||
return $StickyKeys -ne 58
|
}
|
||||||
}
|
|
||||||
if ($ToggleSwitch -eq "WPFToggleTaskView") {
|
|
||||||
$TaskView = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').ShowTaskViewButton
|
|
||||||
return $TaskView -ne 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ToggleSwitch -eq "WPFToggleHiddenFiles") {
|
if ($ToggleSwitchReg) {
|
||||||
$HiddenFiles = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').Hidden
|
$count = 0
|
||||||
return $HiddenFiles -ne 0
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($ToggleSwitch -eq "WPFToggleTaskbarWidgets") {
|
foreach ($regentry in $ToggleSwitchReg) {
|
||||||
$TaskbarWidgets = (Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced").TaskBarDa
|
$regstate = (Get-ItemProperty -path $regentry.Path).$($regentry.Name)
|
||||||
return $TaskbarWidgets -ne 0
|
if ($regstate -eq $regentry.Value) {
|
||||||
}
|
$count += 1
|
||||||
if ($ToggleSwitch -eq "WPFToggleTaskbarAlignment") {
|
Write-Debug "$($regentry.Name) is true (state: $regstate, value: $($regentry.Value), original: $($regentry.OriginalValue))"
|
||||||
$TaskbarAlignment = (Get-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced").TaskbarAl
|
} else {
|
||||||
return $TaskbarAlignment -ne 0
|
Write-Debug "$($regentry.Name) is false (state: $regstate, value: $($regentry.Value), original: $($regentry.OriginalValue))"
|
||||||
}
|
}
|
||||||
if ($ToggleSwitch -eq "WPFToggleDetailedBSoD") {
|
}
|
||||||
$DetailedBSoD1 = (Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl').DisplayParameters
|
|
||||||
$DetailedBSoD2 = (Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl').DisableEmoticon
|
if ($count -eq $ToggleSwitchReg.Count) {
|
||||||
return !(($DetailedBSoD1 -eq 0) -or ($DetailedBSoD2 -eq 0) -or !$DetailedBSoD1 -or !$DetailedBSoD2)
|
Write-Debug "$($ToggleSwitchReg.Name) is true (count: $count)"
|
||||||
|
return $true
|
||||||
|
} else {
|
||||||
|
Write-Debug "$($ToggleSwitchReg.Name) is false (count: $count)"
|
||||||
|
return $false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return $false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
|
||||||
}
|
|
||||||
}
|
|
@ -43,7 +43,7 @@ Function Invoke-WinUtilCurrentSystem {
|
|||||||
|
|
||||||
if($CheckBox -eq "tweaks") {
|
if($CheckBox -eq "tweaks") {
|
||||||
|
|
||||||
if(!(Test-Path 'HKU:\')) {New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS}
|
if(!(Test-Path 'HKU:\')) {$null = (New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS)}
|
||||||
$ScheduledTasks = Get-ScheduledTask
|
$ScheduledTasks = Get-ScheduledTask
|
||||||
|
|
||||||
$sync.configs.tweaks | Get-Member -MemberType NoteProperty | ForEach-Object {
|
$sync.configs.tweaks | Get-Member -MemberType NoteProperty | ForEach-Object {
|
||||||
|
@ -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
|
|
||||||
}
|
|
||||||
}
|
|
@ -25,6 +25,17 @@ function Test-CompatibleImage() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ErroredPackage {
|
||||||
|
[string]$PackageName
|
||||||
|
[string]$ErrorMessage
|
||||||
|
ErroredPackage() { $this.Init(@{} )}
|
||||||
|
# Constructor for packages that have errored out
|
||||||
|
ErroredPackage([string]$pkgName, [string]$reason) {
|
||||||
|
$this.PackageName = $pkgName
|
||||||
|
$this.ErrorMessage = $reason
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function Get-FidoLangFromCulture {
|
function Get-FidoLangFromCulture {
|
||||||
|
|
||||||
param (
|
param (
|
||||||
@ -98,6 +109,7 @@ function Remove-Features() {
|
|||||||
$_.FeatureName -NotLike "*Media*" -AND
|
$_.FeatureName -NotLike "*Media*" -AND
|
||||||
$_.FeatureName -NotLike "*NFS*" -AND
|
$_.FeatureName -NotLike "*NFS*" -AND
|
||||||
$_.FeatureName -NotLike "*SearchEngine*" -AND
|
$_.FeatureName -NotLike "*SearchEngine*" -AND
|
||||||
|
$_.FeatureName -NotLike "*RemoteDesktop*" -AND
|
||||||
$_.State -ne "Disabled"
|
$_.State -ne "Disabled"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,27 +169,54 @@ function Remove-Packages {
|
|||||||
$_ -NotLike "*WMIC*" -AND
|
$_ -NotLike "*WMIC*" -AND
|
||||||
$_ -NotLike "*UI.XaML*" -AND
|
$_ -NotLike "*UI.XaML*" -AND
|
||||||
$_ -NotLike "*Ethernet*" -AND
|
$_ -NotLike "*Ethernet*" -AND
|
||||||
$_ -NotLike "*Wifi*"
|
$_ -NotLike "*Wifi*" -AND
|
||||||
|
$_ -NotLike "*FodMetadata*" -AND
|
||||||
|
$_ -NotLike "*Foundation*" -AND
|
||||||
|
$_ -NotLike "*LanguageFeatures*" -AND
|
||||||
|
$_ -NotLike "*VBSCRIPT*" -AND
|
||||||
|
$_ -NotLike "*License*"
|
||||||
}
|
}
|
||||||
|
|
||||||
$failedCount = 0
|
$failedCount = 0
|
||||||
|
|
||||||
|
$erroredPackages = [System.Collections.Generic.List[ErroredPackage]]::new()
|
||||||
|
|
||||||
foreach ($pkg in $pkglist) {
|
foreach ($pkg in $pkglist) {
|
||||||
try {
|
try {
|
||||||
$status = "Removing $pkg"
|
$status = "Removing $pkg"
|
||||||
Write-Progress -Activity "Removing Apps" -Status $status -PercentComplete ($counter++/$pkglist.Count*100)
|
Write-Progress -Activity "Removing Packages" -Status $status -PercentComplete ($counter++/$pkglist.Count*100)
|
||||||
Remove-WindowsPackage -Path "$scratchDir" -PackageName $pkg -NoRestart -ErrorAction SilentlyContinue
|
Remove-WindowsPackage -Path "$scratchDir" -PackageName $pkg -NoRestart -ErrorAction SilentlyContinue
|
||||||
} catch {
|
} catch {
|
||||||
# This can happen if the package that is being removed is a permanent one, like FodMetadata
|
# This can happen if the package that is being removed is a permanent one
|
||||||
Write-Host "Could not remove OS package $($pkg)"
|
$erroredPackages.Add([ErroredPackage]::new($pkg, $_.Exception.Message))
|
||||||
$failedCount += 1
|
$failedCount += 1
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Write-Progress -Activity "Removing Apps" -Status "Ready" -Completed
|
Write-Progress -Activity "Removing Packages" -Status "Ready" -Completed
|
||||||
if ($failedCount -gt 0)
|
if ($failedCount -gt 0)
|
||||||
{
|
{
|
||||||
Write-Host "Some packages could not be removed. Do not worry: your image will still work fine. This can happen if the package is permanent or has been superseded by a newer one."
|
Write-Host "$failedCount package(s) could not be removed. Your image will still work fine, however. Below is information on what packages failed to be removed and why."
|
||||||
|
if ($erroredPackages.Count -gt 0)
|
||||||
|
{
|
||||||
|
$erroredPackages = $erroredPackages | Sort-Object -Property ErrorMessage
|
||||||
|
|
||||||
|
$previousErroredPackage = $erroredPackages[0]
|
||||||
|
$counter = 0
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host "- $($previousErroredPackage.ErrorMessage)"
|
||||||
|
foreach ($erroredPackage in $erroredPackages) {
|
||||||
|
if ($erroredPackage.ErrorMessage -ne $previousErroredPackage.ErrorMessage) {
|
||||||
|
Write-Host ""
|
||||||
|
$counter = 0
|
||||||
|
Write-Host "- $($erroredPackage.ErrorMessage)"
|
||||||
|
}
|
||||||
|
$counter += 1
|
||||||
|
Write-Host " $counter) $($erroredPackage.PackageName)"
|
||||||
|
$previousErroredPackage = $erroredPackage
|
||||||
|
}
|
||||||
|
Write-Host ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host "Unable to get information about the packages. MicroWin processing will continue, but packages will not be processed"
|
Write-Host "Unable to get information about the packages. MicroWin processing will continue, but packages will not be processed"
|
||||||
@ -201,13 +240,8 @@ function Remove-ProvisionedPackages() {
|
|||||||
$appxProvisionedPackages = Get-AppxProvisionedPackage -Path "$($scratchDir)" | Where-Object {
|
$appxProvisionedPackages = Get-AppxProvisionedPackage -Path "$($scratchDir)" | Where-Object {
|
||||||
$_.PackageName -NotLike "*AppInstaller*" -AND
|
$_.PackageName -NotLike "*AppInstaller*" -AND
|
||||||
$_.PackageName -NotLike "*Store*" -and
|
$_.PackageName -NotLike "*Store*" -and
|
||||||
$_.PackageName -NotLike "*dism*" -and
|
|
||||||
$_.PackageName -NotLike "*Foundation*" -and
|
|
||||||
$_.PackageName -NotLike "*FodMetadata*" -and
|
|
||||||
$_.PackageName -NotLike "*LanguageFeatures*" -and
|
|
||||||
$_.PackageName -NotLike "*Notepad*" -and
|
$_.PackageName -NotLike "*Notepad*" -and
|
||||||
$_.PackageName -NotLike "*Printing*" -and
|
$_.PackageName -NotLike "*Printing*" -and
|
||||||
$_.PackageName -NotLike "*Foundation*" -and
|
|
||||||
$_.PackageName -NotLike "*YourPhone*" -and
|
$_.PackageName -NotLike "*YourPhone*" -and
|
||||||
$_.PackageName -NotLike "*Xbox*" -and
|
$_.PackageName -NotLike "*Xbox*" -and
|
||||||
$_.PackageName -NotLike "*WindowsTerminal*" -and
|
$_.PackageName -NotLike "*WindowsTerminal*" -and
|
||||||
@ -242,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) {
|
function Copy-ToUSB([string]$fileToCopy) {
|
||||||
foreach ($volume in Get-Volume) {
|
foreach ($volume in Get-Volume) {
|
||||||
if ($volume -and $volume.FileSystemLabel -ieq "ventoy") {
|
if ($volume -and $volume.FileSystemLabel -ieq "ventoy") {
|
||||||
@ -625,70 +684,70 @@ function New-CheckInstall {
|
|||||||
# using here string to embedd firstrun
|
# using here string to embedd firstrun
|
||||||
$checkInstall = @'
|
$checkInstall = @'
|
||||||
@echo off
|
@echo off
|
||||||
if exist "C:\windows\cpu.txt" (
|
if exist "%HOMEDRIVE%\windows\cpu.txt" (
|
||||||
echo C:\windows\cpu.txt exists
|
echo %HOMEDRIVE%\windows\cpu.txt exists
|
||||||
) else (
|
) else (
|
||||||
echo C:\windows\cpu.txt does not exist
|
echo %HOMEDRIVE%\windows\cpu.txt does not exist
|
||||||
)
|
)
|
||||||
if exist "C:\windows\SerialNumber.txt" (
|
if exist "%HOMEDRIVE%\windows\SerialNumber.txt" (
|
||||||
echo C:\windows\SerialNumber.txt exists
|
echo %HOMEDRIVE%\windows\SerialNumber.txt exists
|
||||||
) else (
|
) else (
|
||||||
echo C:\windows\SerialNumber.txt does not exist
|
echo %HOMEDRIVE%\windows\SerialNumber.txt does not exist
|
||||||
)
|
)
|
||||||
if exist "C:\unattend.xml" (
|
if exist "%HOMEDRIVE%\unattend.xml" (
|
||||||
echo C:\unattend.xml exists
|
echo %HOMEDRIVE%\unattend.xml exists
|
||||||
) else (
|
) else (
|
||||||
echo C:\unattend.xml does not exist
|
echo %HOMEDRIVE%\unattend.xml does not exist
|
||||||
)
|
)
|
||||||
if exist "C:\Windows\Setup\Scripts\SetupComplete.cmd" (
|
if exist "%HOMEDRIVE%\Windows\Setup\Scripts\SetupComplete.cmd" (
|
||||||
echo C:\Windows\Setup\Scripts\SetupComplete.cmd exists
|
echo %HOMEDRIVE%\Windows\Setup\Scripts\SetupComplete.cmd exists
|
||||||
) else (
|
) else (
|
||||||
echo C:\Windows\Setup\Scripts\SetupComplete.cmd does not exist
|
echo %HOMEDRIVE%\Windows\Setup\Scripts\SetupComplete.cmd does not exist
|
||||||
)
|
)
|
||||||
if exist "C:\Windows\Panther\unattend.xml" (
|
if exist "%HOMEDRIVE%\Windows\Panther\unattend.xml" (
|
||||||
echo C:\Windows\Panther\unattend.xml exists
|
echo %HOMEDRIVE%\Windows\Panther\unattend.xml exists
|
||||||
) else (
|
) else (
|
||||||
echo C:\Windows\Panther\unattend.xml does not exist
|
echo %HOMEDRIVE%\Windows\Panther\unattend.xml does not exist
|
||||||
)
|
)
|
||||||
if exist "C:\Windows\System32\Sysprep\unattend.xml" (
|
if exist "%HOMEDRIVE%\Windows\System32\Sysprep\unattend.xml" (
|
||||||
echo C:\Windows\System32\Sysprep\unattend.xml exists
|
echo %HOMEDRIVE%\Windows\System32\Sysprep\unattend.xml exists
|
||||||
) else (
|
) else (
|
||||||
echo C:\Windows\System32\Sysprep\unattend.xml does not exist
|
echo %HOMEDRIVE%\Windows\System32\Sysprep\unattend.xml does not exist
|
||||||
)
|
)
|
||||||
if exist "C:\Windows\FirstStartup.ps1" (
|
if exist "%HOMEDRIVE%\Windows\FirstStartup.ps1" (
|
||||||
echo C:\Windows\FirstStartup.ps1 exists
|
echo %HOMEDRIVE%\Windows\FirstStartup.ps1 exists
|
||||||
) else (
|
) else (
|
||||||
echo C:\Windows\FirstStartup.ps1 does not exist
|
echo %HOMEDRIVE%\Windows\FirstStartup.ps1 does not exist
|
||||||
)
|
)
|
||||||
if exist "C:\Windows\winutil.ps1" (
|
if exist "%HOMEDRIVE%\Windows\winutil.ps1" (
|
||||||
echo C:\Windows\winutil.ps1 exists
|
echo %HOMEDRIVE%\Windows\winutil.ps1 exists
|
||||||
) else (
|
) else (
|
||||||
echo C:\Windows\winutil.ps1 does not exist
|
echo %HOMEDRIVE%\Windows\winutil.ps1 does not exist
|
||||||
)
|
)
|
||||||
if exist "C:\Windows\LogSpecialize.txt" (
|
if exist "%HOMEDRIVE%\Windows\LogSpecialize.txt" (
|
||||||
echo C:\Windows\LogSpecialize.txt exists
|
echo %HOMEDRIVE%\Windows\LogSpecialize.txt exists
|
||||||
) else (
|
) else (
|
||||||
echo C:\Windows\LogSpecialize.txt does not exist
|
echo %HOMEDRIVE%\Windows\LogSpecialize.txt does not exist
|
||||||
)
|
)
|
||||||
if exist "C:\Windows\LogAuditUser.txt" (
|
if exist "%HOMEDRIVE%\Windows\LogAuditUser.txt" (
|
||||||
echo C:\Windows\LogAuditUser.txt exists
|
echo %HOMEDRIVE%\Windows\LogAuditUser.txt exists
|
||||||
) else (
|
) else (
|
||||||
echo C:\Windows\LogAuditUser.txt does not exist
|
echo %HOMEDRIVE%\Windows\LogAuditUser.txt does not exist
|
||||||
)
|
)
|
||||||
if exist "C:\Windows\LogOobeSystem.txt" (
|
if exist "%HOMEDRIVE%\Windows\LogOobeSystem.txt" (
|
||||||
echo C:\Windows\LogOobeSystem.txt exists
|
echo %HOMEDRIVE%\Windows\LogOobeSystem.txt exists
|
||||||
) else (
|
) else (
|
||||||
echo C:\Windows\LogOobeSystem.txt does not exist
|
echo %HOMEDRIVE%\Windows\LogOobeSystem.txt does not exist
|
||||||
)
|
)
|
||||||
if exist "c:\windows\csup.txt" (
|
if exist "%HOMEDRIVE%\windows\csup.txt" (
|
||||||
echo c:\windows\csup.txt exists
|
echo %HOMEDRIVE%\windows\csup.txt exists
|
||||||
) else (
|
) else (
|
||||||
echo c:\windows\csup.txt does not exist
|
echo %HOMEDRIVE%\windows\csup.txt does not exist
|
||||||
)
|
)
|
||||||
if exist "c:\windows\LogFirstRun.txt" (
|
if exist "%HOMEDRIVE%\windows\LogFirstRun.txt" (
|
||||||
echo c:\windows\LogFirstRun.txt exists
|
echo %HOMEDRIVE%\windows\LogFirstRun.txt exists
|
||||||
) else (
|
) else (
|
||||||
echo c:\windows\LogFirstRun.txt does not exist
|
echo %HOMEDRIVE%\windows\LogFirstRun.txt does not exist
|
||||||
)
|
)
|
||||||
'@
|
'@
|
||||||
$checkInstall | Out-File -FilePath "$env:temp\checkinstall.cmd" -Force -Encoding Ascii
|
$checkInstall | Out-File -FilePath "$env:temp\checkinstall.cmd" -Force -Encoding Ascii
|
||||||
@ -726,7 +785,7 @@ function New-FirstRun {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"FirstStartup has worked" | Out-File -FilePath c:\windows\LogFirstRun.txt -Append -NoClobber
|
"FirstStartup has worked" | Out-File -FilePath "$env:HOMEDRIVE\windows\LogFirstRun.txt" -Append -NoClobber
|
||||||
|
|
||||||
$taskbarPath = "$env:AppData\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"
|
$taskbarPath = "$env:AppData\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"
|
||||||
# Delete all files on the Taskbar
|
# Delete all files on the Taskbar
|
||||||
@ -746,45 +805,19 @@ function New-FirstRun {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Remove-Item -Path "$env:USERPROFILE\Desktop\*.lnk"
|
Remove-Item -Path "$env:USERPROFILE\Desktop\*.lnk"
|
||||||
Remove-Item -Path "C:\Users\Default\Desktop\*.lnk"
|
Remove-Item -Path "$env:HOMEDRIVE\Users\Default\Desktop\*.lnk"
|
||||||
|
|
||||||
# ************************************************
|
try
|
||||||
# Create WinUtil shortcut on the desktop
|
{
|
||||||
#
|
if ((Get-WindowsOptionalFeature -Online | Where-Object { $_.FeatureName -like "Recall" }).Count -gt 0)
|
||||||
$desktopPath = "$($env:USERPROFILE)\Desktop"
|
{
|
||||||
# Specify the target PowerShell command
|
Disable-WindowsOptionalFeature -Online -FeatureName "Recall" -Remove
|
||||||
$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 "c:\Windows\cttlogo.png") {
|
|
||||||
$shortcut.IconLocation = "c:\Windows\cttlogo.png"
|
|
||||||
}
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
|
||||||
# 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
|
|
||||||
# ************************************************
|
|
||||||
|
|
||||||
Start-Process explorer
|
|
||||||
|
|
||||||
'@
|
'@
|
||||||
$firstRun | Out-File -FilePath "$env:temp\FirstStartup.ps1" -Force
|
$firstRun | Out-File -FilePath "$env:temp\FirstStartup.ps1" -Force
|
||||||
}
|
}
|
||||||
|
@ -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,31 +0,0 @@
|
|||||||
function Invoke-WinUtilNumLock {
|
|
||||||
<#
|
|
||||||
.SYNOPSIS
|
|
||||||
Disables/Enables NumLock on startup
|
|
||||||
.PARAMETER Enabled
|
|
||||||
Indicates whether to enable or disable Numlock on startup
|
|
||||||
#>
|
|
||||||
Param($Enabled)
|
|
||||||
try {
|
|
||||||
if ($Enabled -eq $false) {
|
|
||||||
Write-Host "Enabling Numlock on startup"
|
|
||||||
$value = 2
|
|
||||||
} else {
|
|
||||||
Write-Host "Disabling Numlock on startup"
|
|
||||||
$value = 0
|
|
||||||
}
|
|
||||||
New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS
|
|
||||||
$HKUPath = "HKU:\.Default\Control Panel\Keyboard"
|
|
||||||
$HKCUPath = "HKCU:\Control Panel\Keyboard"
|
|
||||||
Set-ItemProperty -Path $HKUPath -Name InitialKeyboardIndicators -Value $value
|
|
||||||
Set-ItemProperty -Path $HKCUPath -Name InitialKeyboardIndicators -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-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
|
|
||||||
}
|
|
||||||
}
|
|
@ -21,6 +21,10 @@ function Invoke-WinUtilTweaks {
|
|||||||
$KeepServiceStartup = $true
|
$KeepServiceStartup = $true
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if ($Checkbox -contains "Toggle") {
|
||||||
|
$CheckBox = $sync.configs.tweaks.$CheckBox
|
||||||
|
}
|
||||||
|
|
||||||
Write-Debug "Tweaks: $($CheckBox)"
|
Write-Debug "Tweaks: $($CheckBox)"
|
||||||
if($undo) {
|
if($undo) {
|
||||||
$Values = @{
|
$Values = @{
|
||||||
@ -73,6 +77,14 @@ function Invoke-WinUtilTweaks {
|
|||||||
if($sync.configs.tweaks.$CheckBox.registry) {
|
if($sync.configs.tweaks.$CheckBox.registry) {
|
||||||
$sync.configs.tweaks.$CheckBox.registry | ForEach-Object {
|
$sync.configs.tweaks.$CheckBox.registry | ForEach-Object {
|
||||||
Write-Debug "$($psitem.Name) and state is $($psitem.$($values.registry))"
|
Write-Debug "$($psitem.Name) and state is $($psitem.$($values.registry))"
|
||||||
|
if (($psitem.Path -imatch "hku") -and !(Get-PSDrive -Name HKU -ErrorAction SilentlyContinue)) {
|
||||||
|
$null = (New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS)
|
||||||
|
if (Get-PSDrive -Name HKU -ErrorAction SilentlyContinue) {
|
||||||
|
Write-Debug "HKU drive created successfully"
|
||||||
|
} else {
|
||||||
|
Write-Debug "Failed to create HKU drive"
|
||||||
|
}
|
||||||
|
}
|
||||||
Set-WinUtilRegistry -Name $psitem.Name -Path $psitem.Path -Type $psitem.Type -Value $psitem.$($values.registry)
|
Set-WinUtilRegistry -Name $psitem.Name -Path $psitem.Path -Type $psitem.Type -Value $psitem.$($values.registry)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
|
||||||
}
|
|
||||||
}
|
|
@ -36,7 +36,7 @@ function Set-WinUtilRegistry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Set $Path\$Name to $Value"
|
Write-Host "Set $Path\$Name to $Value"
|
||||||
if ($Value -ne "<RemoveEntry>"){
|
if ($Value -ne "<RemoveEntry>") {
|
||||||
Set-ItemProperty -Path $Path -Name $Name -Type $Type -Value $Value -Force -ErrorAction Stop | Out-Null
|
Set-ItemProperty -Path $Path -Name $Name -Type $Type -Value $Value -Force -ErrorAction Stop | Out-Null
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -50,7 +50,6 @@ function Invoke-WPFButton {
|
|||||||
"WPFFixesNetwork" {Invoke-WPFFixesNetwork}
|
"WPFFixesNetwork" {Invoke-WPFFixesNetwork}
|
||||||
"WPFUpdatesdisable" {Invoke-WPFUpdatesdisable}
|
"WPFUpdatesdisable" {Invoke-WPFUpdatesdisable}
|
||||||
"WPFUpdatessecurity" {Invoke-WPFUpdatessecurity}
|
"WPFUpdatessecurity" {Invoke-WPFUpdatessecurity}
|
||||||
"WPFWinUtilShortcut" {Invoke-WPFShortcut -ShortcutToAdd "WinUtil" -RunAsAdmin $true}
|
|
||||||
"WPFGetInstalled" {Invoke-WPFGetInstalled -CheckBox "winget"}
|
"WPFGetInstalled" {Invoke-WPFGetInstalled -CheckBox "winget"}
|
||||||
"WPFGetInstalledTweaks" {Invoke-WPFGetInstalled -CheckBox "tweaks"}
|
"WPFGetInstalledTweaks" {Invoke-WPFGetInstalled -CheckBox "tweaks"}
|
||||||
"WPFGetIso" {Invoke-WPFGetIso}
|
"WPFGetIso" {Invoke-WPFGetIso}
|
||||||
|
@ -51,10 +51,6 @@ public class PowerManagement {
|
|||||||
$index = $sync.MicrowinWindowsFlavors.SelectedValue.Split(":")[0].Trim()
|
$index = $sync.MicrowinWindowsFlavors.SelectedValue.Split(":")[0].Trim()
|
||||||
Write-Host "Index chosen: '$index' from $($sync.MicrowinWindowsFlavors.SelectedValue)"
|
Write-Host "Index chosen: '$index' from $($sync.MicrowinWindowsFlavors.SelectedValue)"
|
||||||
|
|
||||||
$keepPackages = $sync.WPFMicrowinKeepProvisionedPackages.IsChecked
|
|
||||||
$keepProvisionedPackages = $sync.WPFMicrowinKeepAppxPackages.IsChecked
|
|
||||||
$keepDefender = $sync.WPFMicrowinKeepDefender.IsChecked
|
|
||||||
$keepEdge = $sync.WPFMicrowinKeepEdge.IsChecked
|
|
||||||
$copyToUSB = $sync.WPFMicrowinCopyToUsb.IsChecked
|
$copyToUSB = $sync.WPFMicrowinCopyToUsb.IsChecked
|
||||||
$injectDrivers = $sync.MicrowinInjectDrivers.IsChecked
|
$injectDrivers = $sync.MicrowinInjectDrivers.IsChecked
|
||||||
$importDrivers = $sync.MicrowinImportDrivers.IsChecked
|
$importDrivers = $sync.MicrowinImportDrivers.IsChecked
|
||||||
@ -91,6 +87,14 @@ public class PowerManagement {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Detect whether the image to process contains Windows 10 and show warning
|
||||||
|
if ((Test-CompatibleImage $imgVersion $([System.Version]::new(10,0,21996,1))) -eq $false) {
|
||||||
|
$msg = "Windows 10 has been detected in the image you want to process. While you can continue, Windows 10 is not a recommended target for MicroWin, and you may not get the full experience."
|
||||||
|
$dlg_msg = $msg
|
||||||
|
Write-Host $msg
|
||||||
|
[System.Windows.MessageBox]::Show($dlg_msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Exclamation)
|
||||||
|
}
|
||||||
|
|
||||||
$mountDirExists = Test-Path $mountDir
|
$mountDirExists = Test-Path $mountDir
|
||||||
$scratchDirExists = Test-Path $scratchDir
|
$scratchDirExists = Test-Path $scratchDir
|
||||||
if (-not $mountDirExists -or -not $scratchDirExists) {
|
if (-not $mountDirExists -or -not $scratchDirExists) {
|
||||||
@ -158,6 +162,35 @@ public class PowerManagement {
|
|||||||
Write-Host "Removing Appx Bloat"
|
Write-Host "Removing Appx Bloat"
|
||||||
Remove-ProvisionedPackages
|
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\System32\LogFiles\WMI\RtBackup" -Directory
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\DiagTrack" -Directory
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\DiagTrack" -Directory
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\InboxApps" -Directory
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\InboxApps" -Directory
|
||||||
@ -238,6 +271,9 @@ public class PowerManagement {
|
|||||||
# Write-Host Error code $LASTEXITCODE
|
# Write-Host Error code $LASTEXITCODE
|
||||||
Write-Host "Done disabling Teams"
|
Write-Host "Done disabling Teams"
|
||||||
|
|
||||||
|
Write-Host "Fix Windows Volume Mixer Issue"
|
||||||
|
reg add "HKLM\zNTUSER\Software\Microsoft\Internet Explorer\LowRegistry\Audio\PolicyConfig\PropertyStore" /f
|
||||||
|
|
||||||
Write-Host "Bypassing system requirements (system image)"
|
Write-Host "Bypassing system requirements (system image)"
|
||||||
reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d 0 /f
|
reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d 0 /f
|
||||||
reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d 0 /f
|
reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d 0 /f
|
||||||
@ -289,6 +325,19 @@ public class PowerManagement {
|
|||||||
reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v "AppsUseLightTheme" /t REG_DWORD /d 0 /f
|
reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v "AppsUseLightTheme" /t REG_DWORD /d 0 /f
|
||||||
reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v "SystemUsesLightTheme" /t REG_DWORD /d 0 /f
|
reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v "SystemUsesLightTheme" /t REG_DWORD /d 0 /f
|
||||||
|
|
||||||
|
if ((Test-CompatibleImage $imgVersion $([System.Version]::new(10,0,21996,1))) -eq $false) {
|
||||||
|
# We're dealing with Windows 10. Configure sane desktop settings. NOTE: even though stuff to disable News and Interests is there,
|
||||||
|
# it doesn't seem to work, and I don't want to waste more time dealing with an operating system that will lose support in a year (2025)
|
||||||
|
|
||||||
|
# I invite anyone to work on improving stuff for News and Interests, but that won't be me!
|
||||||
|
|
||||||
|
Write-Host "Disabling Search Highlights..."
|
||||||
|
reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Feeds\DSB" /v "ShowDynamicContent" /t REG_DWORD /d 0 /f
|
||||||
|
reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\SearchSettings" /v "IsDynamicSearchBoxEnabled" /t REG_DWORD /d 0 /f
|
||||||
|
reg add "HKLM\zSOFTWARE\Policies\Microsoft\Dsh" /v "AllowNewsAndInterests" /t REG_DWORD /d 0 /f
|
||||||
|
reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "TraySearchBoxVisible" /t REG_DWORD /d 1 /f
|
||||||
|
}
|
||||||
|
|
||||||
} catch {
|
} catch {
|
||||||
Write-Error "An unexpected error occurred: $_"
|
Write-Error "An unexpected error occurred: $_"
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -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"
|
|
||||||
}
|
|
@ -1,39 +0,0 @@
|
|||||||
function Invoke-WPFToggle {
|
|
||||||
|
|
||||||
<#
|
|
||||||
|
|
||||||
.SYNOPSIS
|
|
||||||
Invokes the scriptblock for the given toggle
|
|
||||||
|
|
||||||
.PARAMETER Button
|
|
||||||
The name of the toggle to invoke
|
|
||||||
|
|
||||||
#>
|
|
||||||
|
|
||||||
Param ([string]$Button)
|
|
||||||
|
|
||||||
# Use this to get the name of the button
|
|
||||||
#[System.Windows.MessageBox]::Show("$Button","Chris Titus Tech's Windows Utility","OK","Info")
|
|
||||||
|
|
||||||
$ToggleStatus = (Get-WinUtilToggleStatus $Button)
|
|
||||||
|
|
||||||
Switch -Wildcard ($Button) {
|
|
||||||
|
|
||||||
"WPFToggleDarkMode" {Invoke-WinUtilDarkMode $ToggleStatus}
|
|
||||||
"WPFToggleBingSearch" {Invoke-WinUtilBingSearch $ToggleStatus}
|
|
||||||
"WPFToggleNumLock" {Invoke-WinUtilNumLock $ToggleStatus}
|
|
||||||
"WPFToggleVerboseLogon" {Invoke-WinUtilVerboseLogon $ToggleStatus}
|
|
||||||
"WPFToggleShowExt" {Invoke-WinUtilShowExt $ToggleStatus}
|
|
||||||
"WPFToggleSnapWindow" {Invoke-WinUtilSnapWindow $ToggleStatus}
|
|
||||||
"WPFToggleSnapFlyout" {Invoke-WinUtilSnapFlyout $ToggleStatus}
|
|
||||||
"WPFToggleSnapSuggestion" {Invoke-WinUtilSnapSuggestion $ToggleStatus}
|
|
||||||
"WPFToggleMouseAcceleration" {Invoke-WinUtilMouseAcceleration $ToggleStatus}
|
|
||||||
"WPFToggleStickyKeys" {Invoke-WinUtilStickyKeys $ToggleStatus}
|
|
||||||
"WPFToggleTaskbarWidgets" {Invoke-WinUtilTaskbarWidgets $ToggleStatus}
|
|
||||||
"WPFToggleTaskbarSearch" {Invoke-WinUtilTaskbarSearch $ToggleStatus}
|
|
||||||
"WPFToggleTaskView" {Invoke-WinUtilTaskView $ToggleStatus}
|
|
||||||
"WPFToggleHiddenFiles" {Invoke-WinUtilHiddenFiles $ToggleStatus}
|
|
||||||
"WPFToggleTaskbarAlignment" {Invoke-WinUtilTaskbarAlignment $ToggleStatus}
|
|
||||||
"WPFToggleDetailedBSoD" {Invoke-WinUtilDetailedBSoD $ToggleStatus}
|
|
||||||
}
|
|
||||||
}
|
|
@ -192,11 +192,16 @@ function Invoke-WPFUIElements {
|
|||||||
|
|
||||||
$sync[$entryInfo.Name] = $checkBox
|
$sync[$entryInfo.Name] = $checkBox
|
||||||
|
|
||||||
$sync[$entryInfo.Name].IsChecked = Get-WinUtilToggleStatus $sync[$entryInfo.Name].Name
|
$sync[$entryInfo.Name].IsChecked = (Get-WinUtilToggleStatus $entryInfo.Name)
|
||||||
|
|
||||||
$sync[$entryInfo.Name].Add_Click({
|
$sync[$entryInfo.Name].Add_Checked({
|
||||||
[System.Object]$Sender = $args[0]
|
[System.Object]$Sender = $args[0]
|
||||||
Invoke-WPFToggle $Sender.name
|
Invoke-WinUtilTweaks $sender.name
|
||||||
|
})
|
||||||
|
|
||||||
|
$sync[$entryInfo.Name].Add_Unchecked({
|
||||||
|
[System.Object]$Sender = $args[0]
|
||||||
|
Invoke-WinUtiltweaks $sender.name -undo $true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,4 +42,24 @@ function Invoke-WPFUpdatesdefault {
|
|||||||
Write-Host "==================================================="
|
Write-Host "==================================================="
|
||||||
Write-Host "--- Windows Update Settings Reset to Default ---"
|
Write-Host "--- Windows Update Settings Reset to Default ---"
|
||||||
Write-Host "==================================================="
|
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() }}
|
{{ super() }}
|
||||||
<div style="color: red; text-align: center; padding: 10px; font-size: 20px;">
|
<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 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>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -410,10 +410,8 @@ $sync["ISOmanual"].add_Checked({
|
|||||||
$sync["ISOLanguage"].Visibility = [System.Windows.Visibility]::Collapsed
|
$sync["ISOLanguage"].Visibility = [System.Windows.Visibility]::Collapsed
|
||||||
})
|
})
|
||||||
|
|
||||||
$sync["ISORelease"].Items.Add("23H2") | Out-Null
|
$sync["ISORelease"].Items.Add("24H2") | Out-Null
|
||||||
$sync["ISORelease"].Items.Add("22H2") | Out-Null
|
$sync["ISORelease"].SelectedItem = "24H2"
|
||||||
$sync["ISORelease"].Items.Add("21H2") | Out-Null
|
|
||||||
$sync["ISORelease"].SelectedItem = "23H2"
|
|
||||||
|
|
||||||
$sync["ISOLanguage"].Items.Add("System Language ($(Get-FidoLangFromCulture -langName $((Get-Culture).Name)))") | Out-Null
|
$sync["ISOLanguage"].Items.Add("System Language ($(Get-FidoLangFromCulture -langName $((Get-Culture).Name)))") | Out-Null
|
||||||
if ($currentCulture -ne "English International") {
|
if ($currentCulture -ne "English International") {
|
||||||
|
@ -1040,7 +1040,7 @@
|
|||||||
HorizontalAlignment="Stretch">
|
HorizontalAlignment="Stretch">
|
||||||
<StackPanel Name="MicrowinMain" Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Column="0" Grid.Row="0">
|
<StackPanel Name="MicrowinMain" Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Column="0" Grid.Row="0">
|
||||||
<StackPanel Background="Transparent" SnapsToDevicePixels="True" Margin="1">
|
<StackPanel Background="Transparent" SnapsToDevicePixels="True" Margin="1">
|
||||||
<CheckBox x:Name="WPFMicrowinDownloadFromGitHub" Content="Download oscdimg.exe from CTT Github repo" IsChecked="False" Margin="{DynamicResource MicrowinCheckBoxMargin}" />
|
<CheckBox x:Name="WPFMicrowinDownloadFromGitHub" Content="Download oscdimg.exe from CTT Github repo" IsChecked="True" Margin="{DynamicResource MicrowinCheckBoxMargin}" />
|
||||||
<TextBlock Margin="5" Padding="1" TextWrapping="Wrap" Foreground="{DynamicResource ComboBoxForegroundColor}">
|
<TextBlock Margin="5" Padding="1" TextWrapping="Wrap" Foreground="{DynamicResource ComboBoxForegroundColor}">
|
||||||
Choose a Windows ISO file that you've downloaded <LineBreak/>
|
Choose a Windows ISO file that you've downloaded <LineBreak/>
|
||||||
Check the status in the console
|
Check the status in the console
|
||||||
|
Reference in New Issue
Block a user