mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-09-05 10:45:47 -05:00
Compare commits
50 Commits
faa4701c43
...
25.09.05
Author | SHA1 | Date | |
---|---|---|---|
0cf4a1fae8 | |||
c8dfc529d6 | |||
88ec1eddf8 | |||
a6e9e096ef | |||
0ee064c191 | |||
ff0ca400ed | |||
94d7bb719e | |||
8622892827 | |||
af09bcbf0b | |||
e2732da2db | |||
3bd6003171 | |||
a921d0c6fa | |||
01c8739a8b | |||
9ce598fbeb | |||
965d9e0394 | |||
2b9e277b10 | |||
5144551b52 | |||
91ab12dd7f | |||
fdee2ea898 | |||
5ebd27da7e | |||
f6030eec0b | |||
9403b95067 | |||
cdd43f5e36 | |||
cae497b2fe | |||
c740186232 | |||
e6263afb59 | |||
122a07d71b | |||
a669c455eb | |||
c983ec2253 | |||
aec16d84ab | |||
ba951244d9 | |||
9d3c7736b8 | |||
cea4e088cf | |||
32a4311901 | |||
ff95b35f24 | |||
aea9c2cb47 | |||
7fa0594267 | |||
5e65505007 | |||
686e65adcb | |||
1935375f88 | |||
069a1bda2f | |||
661dfa6318 | |||
d6b78d1d06 | |||
51f15a03c2 | |||
ce91307daf | |||
8fe09d0054 | |||
e74258acf4 | |||
28958938fc | |||
91de389c8f | |||
6b22c63d28 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -54,3 +54,5 @@ winutil.ps1
|
||||
.github/site/
|
||||
|
||||
binary/
|
||||
|
||||
.preprocessor_hashes.json
|
@ -51,7 +51,7 @@ If you have Issues, refer to [Known Issues](https://winutil.christitus.com/known
|
||||
## 🛠️ Build & Develop
|
||||
|
||||
> [!NOTE]
|
||||
> Winutil is a relatively large script, so it's split into multiple files which're combined into a single `.ps1` file using a custom compiler. This makes maintaining the project a lot easiler.
|
||||
> Winutil is a relatively large script, so it's split into multiple files which're combined into a single `.ps1` file using a custom compiler. This makes maintaining the project a lot easier.
|
||||
|
||||
Get a copy of the source code, this can be done using GitHub UI (`Code -> Download ZIP`), or by cloning (downloading) the repo using git.
|
||||
|
||||
@ -79,7 +79,7 @@ You'll see a new file named `winutil.ps1`, which's created by `Compile.ps1` scri
|
||||
|
||||
These are the sponsors that help keep this project alive with monthly contributions.
|
||||
|
||||
<!-- sponsors --><a href="https://github.com/TriHydera"><img src="https://github.com/TriHydera.png" width="60px" alt="User avatar: TriHydera" /></a><a href="https://github.com/DelDongo"><img src="https://github.com/DelDongo.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/markamos"><img src="https://github.com/markamos.png" width="60px" alt="User avatar: Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https://github.com/dwelfusius.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/mews-se"><img src="https://github.com/mews-se.png" width="60px" alt="User avatar: Martin Stockzell" /></a><a href="https://github.com/jdiegmueller"><img src="https://github.com/jdiegmueller.png" width="60px" alt="User avatar: Jason A. Diegmueller" /></a><a href="https://github.com/robertsandrock"><img src="https://github.com/robertsandrock.png" width="60px" alt="User avatar: RMS" /></a><a href="https://github.com/KenichiQaz"><img src="https://github.com/KenichiQaz.png" width="60px" alt="User avatar: Stefan" /></a><a href="https://github.com/paulsheets"><img src="https://github.com/paulsheets.png" width="60px" alt="User avatar: Paul" /></a><a href="https://github.com/djones369"><img src="https://github.com/djones369.png" width="60px" alt="User avatar: Dave J. - WhamGeek" /></a><a href="https://github.com/anthonymendez"><img src="https://github.com/anthonymendez.png" width="60px" alt="User avatar: Anthony Mendez" /></a><a href="https://github.com/FatBastard0"><img src="https://github.com/FatBastard0.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DursleyGuy"><img src="https://github.com/DursleyGuy.png" width="60px" alt="User avatar: DursleyGuy" /></a><a href="https://github.com/realmuddy"><img src="https://github.com/realmuddy.png" width="60px" alt="User avatar: Phillip Waters" /></a><a href="https://github.com/quaszi"><img src="https://github.com/quaszi.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DwayneTheRockLobster1"><img src="https://github.com/DwayneTheRockLobster1.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/KieraKujisawa"><img src="https://github.com/KieraKujisawa.png" width="60px" alt="User avatar: Kiera Meredith" /></a><a href="https://github.com/craigccfl"><img src="https://github.com/craigccfl.png" width="60px" alt="User avatar: CraigW" /></a><a href="https://github.com/RoelCrabbe"><img src="https://github.com/RoelCrabbe.png" width="60px" alt="User avatar: Roel Crabbé" /></a><a href="https://github.com/Data-Syd"><img src="https://github.com/Data-Syd.png" width="60px" alt="User avatar: Data Syd" /></a><!-- sponsors -->
|
||||
<!-- sponsors --><a href="https://github.com/TriHydera"><img src="https://github.com/TriHydera.png" width="60px" alt="User avatar: TriHydera" /></a><a href="https://github.com/DelDongo"><img src="https://github.com/DelDongo.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/markamos"><img src="https://github.com/markamos.png" width="60px" alt="User avatar: Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https://github.com/dwelfusius.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/mews-se"><img src="https://github.com/mews-se.png" width="60px" alt="User avatar: Martin Stockzell" /></a><a href="https://github.com/jdiegmueller"><img src="https://github.com/jdiegmueller.png" width="60px" alt="User avatar: Jason A. Diegmueller" /></a><a href="https://github.com/robertsandrock"><img src="https://github.com/robertsandrock.png" width="60px" alt="User avatar: RMS" /></a><a href="https://github.com/KenichiQaz"><img src="https://github.com/KenichiQaz.png" width="60px" alt="User avatar: Stefan" /></a><a href="https://github.com/paulsheets"><img src="https://github.com/paulsheets.png" width="60px" alt="User avatar: Paul" /></a><a href="https://github.com/djones369"><img src="https://github.com/djones369.png" width="60px" alt="User avatar: Dave J. - WhamGeek" /></a><a href="https://github.com/anthonymendez"><img src="https://github.com/anthonymendez.png" width="60px" alt="User avatar: Anthony Mendez" /></a><a href="https://github.com/FatBastard0"><img src="https://github.com/FatBastard0.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DursleyGuy"><img src="https://github.com/DursleyGuy.png" width="60px" alt="User avatar: DursleyGuy" /></a><a href="https://github.com/realmuddy"><img src="https://github.com/realmuddy.png" width="60px" alt="User avatar: Phillip Waters" /></a><a href="https://github.com/quaszi"><img src="https://github.com/quaszi.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DwayneTheRockLobster1"><img src="https://github.com/DwayneTheRockLobster1.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/KieraKujisawa"><img src="https://github.com/KieraKujisawa.png" width="60px" alt="User avatar: Kiera Meredith" /></a><a href="https://github.com/danhively"><img src="https://github.com/danhively.png" width="60px" alt="User avatar: Dan Hively" /></a><!-- sponsors -->
|
||||
|
||||
## 🏅 Thanks to all Contributors
|
||||
Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻.
|
||||
|
@ -375,6 +375,14 @@
|
||||
"link": "https://discord.com/",
|
||||
"winget": "Discord.Discord"
|
||||
},
|
||||
"dismtools": {
|
||||
"category": "Microsoft Tools",
|
||||
"choco": "na",
|
||||
"content": "DISMTools",
|
||||
"description": "DISMTools is a front-end for DISM that lets you manage your Windows Imaging (WIM) files and a whole lot more.",
|
||||
"link": "https://github.com/CodingWonders/DISMTools",
|
||||
"winget": "CodingWondersSoftware.DISMTools.Stable"
|
||||
},
|
||||
"ditto": {
|
||||
"category": "Utilities",
|
||||
"choco": "ditto",
|
||||
@ -547,7 +555,7 @@
|
||||
"category": "Multimedia Tools",
|
||||
"choco": "ffmpeg-full",
|
||||
"content": "FFmpeg (full)",
|
||||
"description": "FFmpeg is a powerful multimedia processing tool that enables users to convert, edit, and stream audio and video files with a vast range of codecs and formats.",
|
||||
"description": "FFmpeg is a powerful multimedia processing tool that enables users to convert, edit, and stream audio and video files with a vast range of codecs and formats. | Note: FFmpeg can not be uninstalled using winget.",
|
||||
"link": "https://ffmpeg.org/",
|
||||
"winget": "Gyan.FFmpeg"
|
||||
},
|
||||
@ -1741,7 +1749,7 @@
|
||||
"content": "Python3",
|
||||
"description": "Python is a versatile programming language used for web development, data analysis, artificial intelligence, and more.",
|
||||
"link": "https://www.python.org/",
|
||||
"winget": "Python.Python.3.12"
|
||||
"winget": "Python.Python.3.13"
|
||||
},
|
||||
"qbittorrent": {
|
||||
"category": "Utilities",
|
||||
@ -1935,14 +1943,6 @@
|
||||
"link": "https://github.com/henrypp/simplewall",
|
||||
"winget": "Henry++.simplewall"
|
||||
},
|
||||
"skype": {
|
||||
"category": "Communications",
|
||||
"choco": "skype",
|
||||
"content": "Skype",
|
||||
"description": "Skype is a widely used communication platform offering video calls, voice calls, and instant messaging services.",
|
||||
"link": "https://www.skype.com/",
|
||||
"winget": "Microsoft.Skype"
|
||||
},
|
||||
"slack": {
|
||||
"category": "Communications",
|
||||
"choco": "slack",
|
||||
@ -2218,8 +2218,8 @@
|
||||
"ttaskbar": {
|
||||
"category": "Utilities",
|
||||
"choco": "translucenttb",
|
||||
"content": "Translucent Taskbar",
|
||||
"description": "Translucent Taskbar is a tool that allows you to customize the transparency of the Windows taskbar.",
|
||||
"content": "TranslucentTB",
|
||||
"description": "TranslucentTB is a tool that allows you to customize the transparency of the Windows taskbar.",
|
||||
"link": "https://github.com/TranslucentTB/TranslucentTB",
|
||||
"winget": "9PF4KZ2VN4W9"
|
||||
},
|
||||
@ -2301,7 +2301,7 @@
|
||||
"content": "Viber",
|
||||
"description": "Viber is a free messaging and calling app with features like group chats, video calls, and more.",
|
||||
"link": "https://www.viber.com/",
|
||||
"winget": "Viber.Viber"
|
||||
"winget": "Rakuten.Viber"
|
||||
},
|
||||
"videomass": {
|
||||
"category": "Multimedia Tools",
|
||||
|
@ -242,15 +242,7 @@
|
||||
"ButtonWidth": "300",
|
||||
"link": "https://winutil.christitus.com/dev/features/fixes/runadobecccleanertool"
|
||||
},
|
||||
"WPFPanelnetwork": {
|
||||
"Content": "Network Connections",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300",
|
||||
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/network"
|
||||
},
|
||||
"WPFPanelcontrol": {
|
||||
"WPFPanelControl": {
|
||||
"Content": "Control Panel",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
@ -258,7 +250,23 @@
|
||||
"ButtonWidth": "300",
|
||||
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/control"
|
||||
},
|
||||
"WPFPanelpower": {
|
||||
"WPFPanelComputer": {
|
||||
"Content": "Computer Management",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300",
|
||||
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/computer"
|
||||
},
|
||||
"WPFPanelNetwork": {
|
||||
"Content": "Network Connections",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300",
|
||||
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/network"
|
||||
},
|
||||
"WPFPanelPower": {
|
||||
"Content": "Power Panel",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
@ -266,23 +274,7 @@
|
||||
"ButtonWidth": "300",
|
||||
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/power"
|
||||
},
|
||||
"WPFPanelregion": {
|
||||
"Content": "Region",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300",
|
||||
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/region"
|
||||
},
|
||||
"WPFPanelsound": {
|
||||
"Content": "Sound Settings",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300",
|
||||
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/sound"
|
||||
},
|
||||
"WPFPanelprinter": {
|
||||
"WPFPanelPrinter": {
|
||||
"Content": "Printer Panel",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
@ -290,7 +282,24 @@
|
||||
"ButtonWidth": "300",
|
||||
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/printer"
|
||||
},
|
||||
"WPFPanelsystem": {
|
||||
"WPFPanelRegion": {
|
||||
"Content": "Region",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300",
|
||||
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/region"
|
||||
},
|
||||
"WPFPanelSound": {
|
||||
"Content": "Sound Settings",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300",
|
||||
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/user"
|
||||
},
|
||||
|
||||
"WPFPanelSystem": {
|
||||
"Content": "System Properties",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
@ -298,20 +307,13 @@
|
||||
"ButtonWidth": "300",
|
||||
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/system"
|
||||
},
|
||||
"WPFPaneluser": {
|
||||
"Content": "User Accounts",
|
||||
"WPFPanelTimedate": {
|
||||
"Content": "Time and Date",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300",
|
||||
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/user"
|
||||
},
|
||||
"WPFPanelGodMode": {
|
||||
"Content": "God Mode",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/timedate"
|
||||
},
|
||||
"WPFWinUtilInstallPSProfile": {
|
||||
"Content": "Install CTT PowerShell Profile",
|
||||
|
@ -4,7 +4,6 @@
|
||||
"WPFTweaksConsumerFeatures",
|
||||
"WPFTweaksDisableExplorerAutoDiscovery",
|
||||
"WPFTweaksDVR",
|
||||
"WPFTweaksHiber",
|
||||
"WPFTweaksHome",
|
||||
"WPFTweaksLoc",
|
||||
"WPFTweaksServices",
|
||||
|
@ -32,6 +32,7 @@
|
||||
"ButtonFontFamily": "Arial",
|
||||
"ButtonWidth": "200",
|
||||
"ButtonHeight": "25",
|
||||
"ConfigTabButtonFontSize": "14",
|
||||
"ConfigUpdateButtonFontSize": "14",
|
||||
"SearchBarWidth": "200",
|
||||
"SearchBarHeight": "26",
|
||||
@ -46,6 +47,7 @@
|
||||
"AppInstallUnselectedColor": "#F7F7F7",
|
||||
"AppInstallHighlightedColor": "#CFCFCF",
|
||||
"AppInstallSelectedColor": "#C2C2C2",
|
||||
"AppInstallOverlayBackgroundColor":"#6A6D72",
|
||||
"ComboBoxForegroundColor": "#232629",
|
||||
"ComboBoxBackgroundColor": "#F7F7F7",
|
||||
"LabelboxForegroundColor": "#232629",
|
||||
@ -58,6 +60,7 @@
|
||||
"ScrollBarHoverColor": "#5A5D62",
|
||||
"ScrollBarDraggingColor": "#6A6D72",
|
||||
|
||||
"MicrowinBusyColor": "#2e77ff",
|
||||
"ProgressBarForegroundColor": "#2e77ff",
|
||||
"ProgressBarBackgroundColor": "Transparent",
|
||||
"ProgressBarTextColor": "#232629",
|
||||
@ -85,6 +88,7 @@
|
||||
"AppInstallUnselectedColor": "#232629",
|
||||
"AppInstallHighlightedColor": "#3C3C3C",
|
||||
"AppInstallSelectedColor": "#4C4C4C",
|
||||
"AppInstallOverlayBackgroundColor":"#2E3135",
|
||||
"ComboBoxForegroundColor": "#F7F7F7",
|
||||
"ComboBoxBackgroundColor": "#1E3747",
|
||||
"LabelboxForegroundColor": "#0567ff",
|
||||
@ -97,9 +101,10 @@
|
||||
"ScrollBarHoverColor": "#3B4252",
|
||||
"ScrollBarDraggingColor": "#5E81AC",
|
||||
|
||||
"MicrowinBusyColor": "#2e77ff",
|
||||
"ProgressBarForegroundColor": "#222222",
|
||||
"ProgressBarBackgroundColor": "Transparent",
|
||||
"ProgressBarTextColor": "#cccccc",
|
||||
"ProgressBarTextColor": "#232629",
|
||||
"ButtonInstallBackgroundColor": "#222222",
|
||||
"ButtonTweaksBackgroundColor": "#333333",
|
||||
"ButtonConfigBackgroundColor": "#444444",
|
||||
|
@ -1585,13 +1585,6 @@
|
||||
"Type": "DWord",
|
||||
"Value": "0",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
},
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
|
||||
"Name": "SyncDisabled",
|
||||
"Type": "DWord",
|
||||
"Value": "1",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1824,10 +1817,10 @@
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\DataCollection",
|
||||
"Type": "DWord",
|
||||
"Value": "0",
|
||||
"OriginalValue": "<RemoveEntry>",
|
||||
"Name": "AllowTelemetry",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
"Value": "0",
|
||||
"Type": "DWord"
|
||||
},
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\DataCollection",
|
||||
@ -1913,6 +1906,13 @@
|
||||
"Value": "0",
|
||||
"Type": "DWord"
|
||||
},
|
||||
{
|
||||
"Path": "HKCU:\\SOFTWARE\\Microsoft\\Siuf\\Rules",
|
||||
"OriginalValue": "<RemoveEntry>",
|
||||
"Name": "PeriodInNanoSeconds",
|
||||
"Value": "<RemoveEntry>",
|
||||
"Type": "QWord"
|
||||
},
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\DataCollection",
|
||||
"OriginalValue": "<RemoveEntry>",
|
||||
@ -1945,7 +1945,14 @@
|
||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DeliveryOptimization\\Config",
|
||||
"OriginalValue": "1",
|
||||
"Name": "DODownloadMode",
|
||||
"Value": "1",
|
||||
"Value": "0",
|
||||
"Type": "DWord"
|
||||
},
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\DeliveryOptimization",
|
||||
"OriginalValue": "<RemoveEntry>",
|
||||
"Name": "DODownloadMode",
|
||||
"Value": "0",
|
||||
"Type": "DWord"
|
||||
},
|
||||
{
|
||||
@ -1990,14 +1997,6 @@
|
||||
"Value": "1",
|
||||
"Type": "DWord"
|
||||
},
|
||||
{
|
||||
"_Comment": "Driver searching is a function that should be left in",
|
||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DriverSearching",
|
||||
"OriginalValue": "1",
|
||||
"Name": "SearchOrderConfig",
|
||||
"Value": "1",
|
||||
"Type": "DWord"
|
||||
},
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Multimedia\\SystemProfile",
|
||||
"OriginalValue": "1",
|
||||
@ -2012,13 +2011,6 @@
|
||||
"Value": "4294967295",
|
||||
"Type": "DWord"
|
||||
},
|
||||
{
|
||||
"Path": "HKCU:\\Control Panel\\Desktop",
|
||||
"OriginalValue": "1",
|
||||
"Name": "MenuShowDelay",
|
||||
"Value": "1",
|
||||
"Type": "DWord"
|
||||
},
|
||||
{
|
||||
"Path": "HKCU:\\Control Panel\\Desktop",
|
||||
"OriginalValue": "1",
|
||||
@ -2114,8 +2106,8 @@
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/tele"
|
||||
},
|
||||
"WPFTweaksWifi": {
|
||||
"Content": "Disable Wifi-Sense",
|
||||
"Description": "Wifi Sense is a spying service that phones home all nearby scanned wifi networks and your current geo location.",
|
||||
"Content": "Disable Wi-Fi Sense",
|
||||
"Description": "Wi-Fi Sense is a spying service that phones home all nearby scanned Wi-Fi networks and your current geographic location.",
|
||||
"category": "Essential Tweaks",
|
||||
"panel": "1",
|
||||
"Order": "a005_",
|
||||
@ -2154,28 +2146,46 @@
|
||||
],
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/utc"
|
||||
},
|
||||
"WPFTweaksRemoveHomeGallery": {
|
||||
"Content": "Remove Home and Gallery from explorer",
|
||||
"Description": "Removes the Home and Gallery from explorer and sets This PC as default",
|
||||
"WPFTweaksRemoveHome": {
|
||||
"Content": "Remove Home from Explorer",
|
||||
"Description": "Removes the Home from Explorer and sets This PC as default",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a029_",
|
||||
"InvokeScript": [
|
||||
"
|
||||
REG DELETE \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\" /f
|
||||
REG DELETE \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}\" /f
|
||||
REG ADD \"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" /f /v \"LaunchTo\" /t REG_DWORD /d \"1\"
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
REG ADD \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\" /f /ve /t REG_SZ /d \"{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\"
|
||||
REG ADD \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}\" /f /ve /t REG_SZ /d \"CLSID_MSGraphHomeFolder\"
|
||||
REG DELETE \"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" /f /v \"LaunchTo\"
|
||||
"
|
||||
],
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removehomegallery"
|
||||
},
|
||||
"WPFTweaksRemoveGallery": {
|
||||
"Content": "Remove Gallery from explorer",
|
||||
"Description": "Removes the Gallery from Explorer and sets This PC as default",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a030_",
|
||||
"InvokeScript": [
|
||||
"
|
||||
REG DELETE \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\" /f
|
||||
REG ADD \"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" /f /v \"LaunchTo\" /t REG_DWORD /d \"1\"
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
REG ADD \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\" /f /ve /t REG_SZ /d \"{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\"
|
||||
REG DELETE \"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" /f /v \"LaunchTo\"
|
||||
"
|
||||
],
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removehomegallery"
|
||||
},
|
||||
"WPFTweaksDisplay": {
|
||||
"Content": "Set Display for Performance",
|
||||
"Description": "Sets the system preferences to performance. You can do this manually with sysdm.cpl as well.",
|
||||
@ -2192,7 +2202,7 @@
|
||||
},
|
||||
{
|
||||
"Path": "HKCU:\\Control Panel\\Desktop",
|
||||
"OriginalValue": "1",
|
||||
"OriginalValue": "400",
|
||||
"Name": "MenuShowDelay",
|
||||
"Value": "200",
|
||||
"Type": "String"
|
||||
@ -2522,20 +2532,6 @@
|
||||
],
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/storage"
|
||||
},
|
||||
"WPFTweaksRemoveEdge": {
|
||||
"Content": "Remove Microsoft Edge",
|
||||
"Description": "Removes MS Edge when it gets reinstalled by updates. Credit: Psyirius",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a029_",
|
||||
"InvokeScript": [
|
||||
"Uninstall-WinUtilEdgeBrowser -action \"Uninstall\""
|
||||
],
|
||||
"UndoScript": [
|
||||
"Uninstall-WinUtilEdgeBrowser -action \"Install\""
|
||||
],
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removeedge"
|
||||
},
|
||||
"WPFTweaksRemoveCopilot": {
|
||||
"Content": "Disable Microsoft Copilot",
|
||||
"Description": "Disables MS Copilot AI built into Windows since 23H2.",
|
||||
@ -2563,18 +2559,56 @@
|
||||
"Type": "DWord",
|
||||
"Value": "0",
|
||||
"OriginalValue": "1"
|
||||
},
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Shell\\Copilot",
|
||||
"Name": "IsCopilotAvailable",
|
||||
"Type": "DWord",
|
||||
"Value": "0",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
},
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Shell\\Copilot",
|
||||
"Name": "CopilotDisabledReason",
|
||||
"Type": "String",
|
||||
"Value": "IsEnabledForGeographicRegionFailed",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
},
|
||||
{
|
||||
"Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\WindowsCopilot",
|
||||
"Name": "AllowCopilotRuntime",
|
||||
"Type": "DWord",
|
||||
"Value": "0",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
},
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Blocked",
|
||||
"Name": "{CB3B0003-8088-4EDE-8769-8B354AB2FF8C}",
|
||||
"Type": "String",
|
||||
"Value": "",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
},
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Shell\\Copilot\\BingChat",
|
||||
"Name": "IsUserEligible",
|
||||
"Type": "DWord",
|
||||
"Value": "0",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
}
|
||||
],
|
||||
"InvokeScript": [
|
||||
"
|
||||
Write-Host \"Remove Copilot\"
|
||||
Get-Package | Where-Object Name -like '*copilot*'
|
||||
Get-AppxPackage -AllUsers *Copilot* | Remove-AppxPackage -AllUsers
|
||||
Get-AppxProvisionedPackage -Online | Where-Object PackageName -like '*Copilot*' | Remove-AppxProvisionedPackage -Online
|
||||
dism /online /remove-package /package-name:Microsoft.Windows.Copilot
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
Write-Host \"Install Copilot\"
|
||||
dism /online /add-package /package-name:Microsoft.Windows.Copilot
|
||||
winget install --name \"Microsoft Copilot\" --source msstore --accept-package-agreements --accept-source-agreements --silent
|
||||
"
|
||||
],
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removecopilot"
|
||||
@ -2592,6 +2626,20 @@
|
||||
"Type": "DWord",
|
||||
"Value": "1",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
},
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsAI",
|
||||
"Name": "AllowRecallEnablement",
|
||||
"Type": "DWord",
|
||||
"Value": "0",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
},
|
||||
{
|
||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\CI\\Policy",
|
||||
"Name": "VerifiedAndReputablePolicyState",
|
||||
"Type": "DWord",
|
||||
"Value": "0",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
}
|
||||
],
|
||||
"InvokeScript": [
|
||||
@ -2689,7 +2737,7 @@
|
||||
"Description": "Moves OneDrive files to Default Home Folders and Uninstalls it.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a030_",
|
||||
"Order": "a031_",
|
||||
"InvokeScript": [
|
||||
"
|
||||
$OneDrivePath = $($env:OneDrive)
|
||||
@ -2728,7 +2776,7 @@
|
||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$OneDrivePath\"
|
||||
}
|
||||
|
||||
Write-Host \"Remove Onedrive from explorer sidebar\"
|
||||
Write-Host \"Remove Onedrive from Explorer sidebar\"
|
||||
Set-ItemProperty -Path \"HKCR:\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" -Name \"System.IsPinnedToNameSpaceTree\" -Value 0
|
||||
Set-ItemProperty -Path \"HKCR:\\Wow6432Node\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" -Name \"System.IsPinnedToNameSpaceTree\" -Value 0
|
||||
|
||||
@ -2774,7 +2822,7 @@
|
||||
taskkill.exe /F /IM \"explorer.exe\"
|
||||
Start-Process \"explorer.exe\"
|
||||
|
||||
Write-Host \"Waiting for explorer to complete loading\"
|
||||
Write-Host \"Waiting for Explorer to complete loading\"
|
||||
Write-Host \"Please Note - The OneDrive folder at $OneDrivePath may still have items in it. You must manually delete it, but all the files should already be copied to the base user folder.\"
|
||||
Write-Host \"If there are Files missing afterwards, please Login to Onedrive.com and Download them manually\" -ForegroundColor Yellow
|
||||
Start-Sleep 5
|
||||
@ -2793,10 +2841,10 @@
|
||||
},
|
||||
"WPFTweaksRazerBlock": {
|
||||
"Content": "Block Razer Software Installs",
|
||||
"Description": "Blocks ALL Razer Software installations. The hardware works fine without any software.",
|
||||
"Description": "Blocks ALL Razer Software installations. The hardware works fine without any software. WARNING: this will also block all Windows third-party driver installations.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a031_",
|
||||
"Order": "a032_",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DriverSearching",
|
||||
@ -3597,6 +3645,69 @@
|
||||
],
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/stickykeys"
|
||||
},
|
||||
"WPFToggleNewOutlook": {
|
||||
"Content": "New Outlook",
|
||||
"Description": "If disabled it removes the toggle for new Outlook, disables the new Outlook migration and makes sure the Outlook Application actually uses the old Outlook.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a112_",
|
||||
"Type": "Toggle",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKCU:\\SOFTWARE\\Microsoft\\Office\\16.0\\Outlook\\Preferences",
|
||||
"Name": "UseNewOutlook",
|
||||
"Value": "1",
|
||||
"OriginalValue": "0",
|
||||
"DefaultState": "true",
|
||||
"Type": "DWord"
|
||||
},
|
||||
{
|
||||
"Path": "HKCU:\\Software\\Microsoft\\Office\\16.0\\Outlook\\Options\\General",
|
||||
"Name": "HideNewOutlookToggle",
|
||||
"Value": "0",
|
||||
"OriginalValue": "1",
|
||||
"DefaultState": "true",
|
||||
"Type": "DWord"
|
||||
},
|
||||
{
|
||||
"Path": "HKCU:\\Software\\Policies\\Microsoft\\Office\\16.0\\Outlook\\Options\\General",
|
||||
"Name": "DoNewOutlookAutoMigration",
|
||||
"Value": "0",
|
||||
"OriginalValue": "0",
|
||||
"DefaultState": "false",
|
||||
"Type": "DWord"
|
||||
},
|
||||
{
|
||||
"Path": "HKCU:\\Software\\Policies\\Microsoft\\Office\\16.0\\Outlook\\Preferences",
|
||||
"Name": "NewOutlookMigrationUserSetting",
|
||||
"Value": "0",
|
||||
"OriginalValue": "<RemoveEntry>",
|
||||
"DefaultState": "true",
|
||||
"Type": "DWord"
|
||||
}
|
||||
],
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/newoutlook"
|
||||
},
|
||||
|
||||
"WPFToggleMultiplaneOverlay": {
|
||||
"Content": "Multiplane Overlay",
|
||||
"Description": "Disable the Multiplane Overlay which can sometimes cause issues with Graphics Cards.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a111_",
|
||||
"Type": "Toggle",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Dwm",
|
||||
"Name": "OverlayTestMode",
|
||||
"Value": "5",
|
||||
"OriginalValue": "<RemoveEntry>",
|
||||
"DefaultState": "true",
|
||||
"Type": "DWord"
|
||||
}
|
||||
],
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/multplaneoverlay"
|
||||
},
|
||||
"WPFToggleHiddenFiles": {
|
||||
"Content": "Show Hidden Files",
|
||||
"Description": "If Enabled then Hidden Files will be shown.",
|
||||
@ -3758,6 +3869,24 @@
|
||||
],
|
||||
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/detailedbsod"
|
||||
},
|
||||
"WPFToggleS3Sleep": {
|
||||
"Content": "S3 Sleep",
|
||||
"Description": "Toggles between Modern Standby and S3 sleep.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a206_",
|
||||
"Type": "Toggle",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power",
|
||||
"Name": "PlatformAoAcOverride",
|
||||
"Value": "0",
|
||||
"OriginalValue": "<RemoveEntry>",
|
||||
"DefaultState": "false",
|
||||
"Type": "DWord"
|
||||
}
|
||||
]
|
||||
},
|
||||
"WPFOOSUbutton": {
|
||||
"Content": "Run OO Shutup 10",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
@ -3807,7 +3936,7 @@
|
||||
# Folder types lookup table
|
||||
$bagMRU = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\BagMRU\"
|
||||
|
||||
# Flush explorer view database
|
||||
# Flush Explorer view database
|
||||
Remove-Item -Path $bags -Recurse -Force
|
||||
Write-Host \"Removed $bags\"
|
||||
|
||||
@ -3837,7 +3966,7 @@
|
||||
# Folder types lookup table
|
||||
$bagMRU = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\BagMRU\"
|
||||
|
||||
# Flush explorer view database
|
||||
# Flush Explorer view database
|
||||
Remove-Item -Path $bags -Recurse -Force
|
||||
Write-Host \"Removed $bags\"
|
||||
|
||||
@ -3847,5 +3976,23 @@
|
||||
Write-Host Please sign out and back in, or restart your computer to apply the changes!
|
||||
"
|
||||
]
|
||||
},
|
||||
"WPFTweaksDisableCrossDeviceResume": {
|
||||
"Content": "Cross-Device Resume",
|
||||
"Description": "This tweak controls the Resume function in Windows 11 24H2 and later, which allows you to resume an activity from a mobile device and vice-versa.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a207_",
|
||||
"Type": "Toggle",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\CrossDeviceResume\\Configuration",
|
||||
"Name": "IsResumeAllowed",
|
||||
"Value": "1",
|
||||
"OriginalValue": "0",
|
||||
"DefaultState": "true",
|
||||
"Type": "DWord"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -39,12 +39,15 @@ public class PowerManagement {
|
||||
$SaveDialog.ShowDialog() | Out-Null
|
||||
|
||||
if ($SaveDialog.FileName -eq "") {
|
||||
Write-Host "No file name for the target image was specified"
|
||||
$msg = "No file name for the target image was specified"
|
||||
Write-Host $msg
|
||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
||||
return
|
||||
}
|
||||
|
||||
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo"
|
||||
Invoke-MicrowinBusyInfo -action "wip" -message "Busy..." -interactive $false
|
||||
|
||||
Write-Host "Target ISO location: $($SaveDialog.FileName)"
|
||||
|
||||
@ -55,6 +58,9 @@ public class PowerManagement {
|
||||
$injectDrivers = $sync.MicrowinInjectDrivers.IsChecked
|
||||
$importDrivers = $sync.MicrowinImportDrivers.IsChecked
|
||||
|
||||
$WPBT = $sync.MicroWinWPBT.IsChecked
|
||||
$unsupported = $sync.MicroWinUnsupported.IsChecked
|
||||
|
||||
$importVirtIO = $sync.MicrowinCopyVirtIO.IsChecked
|
||||
|
||||
$mountDir = $sync.MicrowinMountDir.Text
|
||||
@ -63,16 +69,22 @@ public class PowerManagement {
|
||||
# Detect if the Windows image is an ESD file and convert it to WIM
|
||||
if (-not (Test-Path -Path "$mountDir\sources\install.wim" -PathType Leaf) -and (Test-Path -Path "$mountDir\sources\install.esd" -PathType Leaf)) {
|
||||
Write-Host "Exporting Windows image to a WIM file, keeping the index we want to work on. This can take several minutes, depending on the performance of your computer..."
|
||||
Export-WindowsImage -SourceImagePath $mountDir\sources\install.esd -SourceIndex $index -DestinationImagePath $mountDir\sources\install.wim -CompressionType "Max"
|
||||
try {
|
||||
Export-WindowsImage -SourceImagePath "$mountDir\sources\install.esd" -SourceIndex $index -DestinationImagePath "$mountDir\sources\install.wim" -CompressionType "Max"
|
||||
} catch {
|
||||
# Usually the case if it can't find unattend.dll on the host system. Guys, fix your corrupt messes that are your installations!
|
||||
dism /english /export-image /sourceimagefile="$mountDir\sources\install.esd" /sourceindex=$index /destinationimagefile="$mountDir\sources\install.wim" /compress:max
|
||||
}
|
||||
if ($?) {
|
||||
Remove-Item -Path "$mountDir\sources\install.esd" -Force
|
||||
# Since we've already exported the image index we wanted, switch to the first one
|
||||
$index = 1
|
||||
} else {
|
||||
$msg = "The export process has failed and MicroWin processing cannot continue"
|
||||
Write-Host "Failed to export the image"
|
||||
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error)
|
||||
Write-Host $msg
|
||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
||||
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error)
|
||||
return
|
||||
}
|
||||
}
|
||||
@ -87,6 +99,7 @@ public class PowerManagement {
|
||||
Write-Host $msg
|
||||
[System.Windows.MessageBox]::Show($dlg_msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Exclamation)
|
||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
||||
return
|
||||
}
|
||||
|
||||
@ -101,8 +114,10 @@ public class PowerManagement {
|
||||
$mountDirExists = Test-Path $mountDir
|
||||
$scratchDirExists = Test-Path $scratchDir
|
||||
if (-not $mountDirExists -or -not $scratchDirExists) {
|
||||
Write-Error "Required directories '$mountDirExists' '$scratchDirExists' and do not exist."
|
||||
$msg = "Required directories '$mountDirExists' '$scratchDirExists' and do not exist."
|
||||
Write-Error $msg
|
||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
||||
return
|
||||
}
|
||||
|
||||
@ -113,8 +128,10 @@ public class PowerManagement {
|
||||
if ($?) {
|
||||
Write-Host "The Windows image has been mounted successfully. Continuing processing..."
|
||||
} else {
|
||||
Write-Host "Could not mount image. Exiting..."
|
||||
$msg = "Could not mount image. Exiting..."
|
||||
Write-Host $msg
|
||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
||||
return
|
||||
}
|
||||
|
||||
@ -157,6 +174,25 @@ public class PowerManagement {
|
||||
}
|
||||
}
|
||||
|
||||
if ($WPBT) {
|
||||
Write-Host "Disabling WPBT Execution"
|
||||
reg load HKLM\zSYSTEM "$($scratchDir)\Windows\System32\config\SYSTEM"
|
||||
reg add "HKLM\zSYSTEM\ControlSet001\Control\Session Manager" /v DisableWpbtExecution /t REG_DWORD /d 1 /f
|
||||
reg unload HKLM\zSYSTEM
|
||||
}
|
||||
|
||||
if ($unsupported) {
|
||||
Write-Host "Bypassing system requirements (locally)"
|
||||
reg add "HKCU\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d 0 /f
|
||||
reg add "HKCU\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassCPUCheck" /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassRAMCheck" /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassSecureBootCheck" /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassStorageCheck" /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SYSTEM\Setup\MoSetup" /v "AllowUpgradesWithUnsupportedTPMOrCPU" /t REG_DWORD /d 1 /f
|
||||
}
|
||||
|
||||
if ($importVirtIO) {
|
||||
Write-Host "Copying VirtIO drivers..."
|
||||
Microwin-CopyVirtIO
|
||||
@ -212,6 +248,20 @@ public class PowerManagement {
|
||||
|
||||
Write-Host "Create unattend.xml"
|
||||
|
||||
if (($sync.MicrowinAutoConfigBox.Text -ne "") -and (Test-Path "$($sync.MicrowinAutoConfigBox.Text)"))
|
||||
{
|
||||
try
|
||||
{
|
||||
Write-Host "A configuration file has been specified. Copying to WIM file..."
|
||||
Copy-Item "$($sync.MicrowinAutoConfigBox.Text)" "$($scratchDir)\winutil-config.json"
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Host "The config file could not be copied. Continuing without it..."
|
||||
}
|
||||
}
|
||||
|
||||
# Create unattended answer file with user information - Check condition to learn more about this functionality
|
||||
if ($sync.MicrowinUserName.Text -eq "")
|
||||
{
|
||||
Microwin-NewUnattend -userName "User"
|
||||
@ -233,7 +283,6 @@ public class PowerManagement {
|
||||
Copy-Item "$env:temp\unattend.xml" "$($scratchDir)\Windows\Panther\unattend.xml" -force
|
||||
New-Item -ItemType Directory -Force -Path "$($scratchDir)\Windows\System32\Sysprep"
|
||||
Copy-Item "$env:temp\unattend.xml" "$($scratchDir)\Windows\System32\Sysprep\unattend.xml" -force
|
||||
Copy-Item "$env:temp\unattend.xml" "$($scratchDir)\unattend.xml" -force
|
||||
Write-Host "Done Copy unattend.xml"
|
||||
|
||||
Write-Host "Create FirstRun"
|
||||
@ -268,7 +317,6 @@ public class PowerManagement {
|
||||
reg add "HKLM\zSOFTWARE\Policies\Microsoft\Windows\Windows Chat" /v ChatIcon /t REG_DWORD /d 2 /f >$null 2>&1
|
||||
reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarMn" /t REG_DWORD /d 0 /f >$null 2>&1
|
||||
reg query "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Communications" /v "ConfigureChatAutoInstall" >$null 2>&1
|
||||
# Write-Host Error code $LASTEXITCODE
|
||||
Write-Host "Done disabling Teams"
|
||||
|
||||
Write-Host "Fix Windows Volume Mixer Issue"
|
||||
@ -295,11 +343,6 @@ public class PowerManagement {
|
||||
'CrossDeviceUpdate'
|
||||
) | ForEach-Object {
|
||||
Write-Host "Removing Windows Expedited App: $_"
|
||||
|
||||
# Copied here After Installation (Online)
|
||||
# reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Orchestrator\UScheduler\$_" /f | Out-Null
|
||||
|
||||
# When in Offline Image
|
||||
reg delete "HKLM\zSOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\$_" /f | Out-Null
|
||||
}
|
||||
}
|
||||
@ -307,7 +350,6 @@ public class PowerManagement {
|
||||
reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 0 /f
|
||||
Write-Host "Setting all services to start manually"
|
||||
reg add "HKLM\zSOFTWARE\CurrentControlSet\Services" /v Start /t REG_DWORD /d 3 /f
|
||||
# Write-Host $LASTEXITCODE
|
||||
|
||||
Write-Host "Enabling Local Accounts on OOBE"
|
||||
reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v "BypassNRO" /t REG_DWORD /d "1" /f
|
||||
@ -362,18 +404,39 @@ public class PowerManagement {
|
||||
try {
|
||||
|
||||
Write-Host "Exporting image into $mountDir\sources\install2.wim"
|
||||
Export-WindowsImage -SourceImagePath "$mountDir\sources\install.wim" -SourceIndex $index -DestinationImagePath "$mountDir\sources\install2.wim" -CompressionType "Max"
|
||||
try {
|
||||
Export-WindowsImage -SourceImagePath "$mountDir\sources\install.wim" -SourceIndex $index -DestinationImagePath "$mountDir\sources\install2.wim" -CompressionType "Max"
|
||||
} catch {
|
||||
# Usually the case if it can't find unattend.dll on the host system. Guys, fix your corrupt messes that are your installations!
|
||||
dism /english /export-image /sourceimagefile="$mountDir\sources\install.wim" /sourceindex=$index /destinationimagefile="$mountDir\sources\install2.wim" /compress:max
|
||||
}
|
||||
Write-Host "Remove old '$mountDir\sources\install.wim' and rename $mountDir\sources\install2.wim"
|
||||
Remove-Item "$mountDir\sources\install.wim"
|
||||
Rename-Item "$mountDir\sources\install2.wim" "$mountDir\sources\install.wim"
|
||||
|
||||
if (-not (Test-Path -Path "$mountDir\sources\install.wim")) {
|
||||
Write-Error "Something went wrong and '$mountDir\sources\install.wim' doesn't exist. Please report this bug to the devs"
|
||||
$msg = "Something went wrong. Please report this bug to the devs."
|
||||
Write-Error "$($msg) '$($mountDir)\sources\install.wim' doesn't exist"
|
||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
||||
return
|
||||
}
|
||||
Write-Host "Windows image completed. Continuing with boot.wim."
|
||||
|
||||
$esd = $sync.MicroWinESD.IsChecked
|
||||
if ($esd) {
|
||||
Write-Host "Converting install image to ESD."
|
||||
try {
|
||||
Export-WindowsImage -SourceImagePath "$mountDir\sources\install.wim" -SourceIndex $index -DestinationImagePath "$mountDir\sources\install.esd" -CompressionType "Recovery"
|
||||
Remove-Item "$mountDir\sources\install.wim"
|
||||
Write-Host "Converted install image to ESD."
|
||||
} catch {
|
||||
Start-Process -FilePath "$env:SystemRoot\System32\dism.exe" -ArgumentList "/export-image /sourceimagefile:`"$mountDir\sources\install.wim`" /sourceindex:1 /destinationimagefile:`"$mountDir\sources\install.esd`" /compress:recovery" -Wait -NoNewWindow
|
||||
Remove-Item "$mountDir\sources\install.wim"
|
||||
Write-Host "Converted install image to ESD."
|
||||
}
|
||||
}
|
||||
|
||||
# Next step boot image
|
||||
Write-Host "Mounting boot image $mountDir\sources\boot.wim into $scratchDir"
|
||||
Mount-WindowsImage -ImagePath "$mountDir\sources\boot.wim" -Index 2 -Path "$scratchDir"
|
||||
@ -459,6 +522,7 @@ public class PowerManagement {
|
||||
$msg = "Done. ISO image is located here: $($SaveDialog.FileName)"
|
||||
Write-Host $msg
|
||||
Set-WinUtilTaskbaritem -state "None" -overlay "checkmark"
|
||||
Invoke-MicrowinBusyInfo -action "done" -message "Finished!"
|
||||
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Information)
|
||||
} else {
|
||||
Write-Host "ISO creation failed. The "$($mountDir)" directory has not been removed."
|
||||
@ -467,14 +531,16 @@ public class PowerManagement {
|
||||
# Now, this will NOT throw an exception
|
||||
$exitCode = New-Object System.ComponentModel.Win32Exception($LASTEXITCODE)
|
||||
Write-Host "Reason: $($exitCode.Message)"
|
||||
Invoke-MicrowinBusyInfo -action "warning" -message $exitCode.Message
|
||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
||||
[System.Windows.MessageBox]::Show("MicroWin failed to make the ISO.", "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error)
|
||||
} catch {
|
||||
# Could not get error description from Windows APIs
|
||||
}
|
||||
}
|
||||
|
||||
$sync.MicrowinOptionsPanel.Visibility = 'Collapsed'
|
||||
Toggle-MicrowinPanel 1
|
||||
|
||||
#$sync.MicrowinFinalIsoLocation.Text = "$env:temp\microwin.iso"
|
||||
$sync.MicrowinFinalIsoLocation.Text = "$($SaveDialog.FileName)"
|
||||
# Allow the machine to sleep again (optional)
|
||||
[PowerManagement]::SetThreadExecutionState(0)
|
||||
|
65
functions/microwin/Invoke-MicrowinBusyInfo.ps1
Normal file
65
functions/microwin/Invoke-MicrowinBusyInfo.ps1
Normal file
@ -0,0 +1,65 @@
|
||||
function Invoke-MicrowinBusyInfo {
|
||||
<#
|
||||
.DESCRIPTION
|
||||
Function to display the busy info for the Microwin process
|
||||
#>
|
||||
[CmdletBinding(DefaultParameterSetName='done')]
|
||||
param(
|
||||
[Parameter(ParameterSetName='wip', Mandatory, Position = 0)]
|
||||
[Parameter(ParameterSetName='warning', Mandatory, Position = 0)]
|
||||
[Parameter(ParameterSetName='done', Mandatory, Position = 0)]
|
||||
[Parameter(ParameterSetName='hide', Mandatory, Position = 0)]
|
||||
[ValidateSet('wip', 'warning', 'done', 'hide')]
|
||||
[string]$action,
|
||||
|
||||
[Parameter(ParameterSetName='wip', Mandatory, Position = 1)]
|
||||
[Parameter(ParameterSetName='warning', Mandatory, Position = 1)]
|
||||
[Parameter(ParameterSetName='done', Mandatory, Position = 1)]
|
||||
[string]$message,
|
||||
|
||||
[Parameter(ParameterSetName='wip', Position = 2)] [bool]$interactive = $false
|
||||
)
|
||||
|
||||
switch ($action) {
|
||||
"wip" {
|
||||
$sync.form.Dispatcher.BeginInvoke([action]{
|
||||
$sync.MicrowinBusyIndicator.Visibility="Visible"
|
||||
$finalMessage = ""
|
||||
if ($interactive -eq $false) {
|
||||
$finalMessage += "Please wait. "
|
||||
}
|
||||
$finalMessage += $message
|
||||
$sync.BusyText.Text = $finalMessage
|
||||
$sync.BusyIcon.Foreground="#FFA500"
|
||||
$sync.BusyText.Foreground="#FFA500"
|
||||
})
|
||||
}
|
||||
"warning" {
|
||||
$sync.form.Dispatcher.BeginInvoke([action]{
|
||||
$sync.MicrowinBusyIndicator.Visibility="Visible"
|
||||
$sync.BusyText.Text=$message
|
||||
$sync.BusyText.Foreground="#FF0000"
|
||||
$sync.BusyIcon.Foreground="#FF0000"
|
||||
})
|
||||
}
|
||||
"done" {
|
||||
$sync.form.Dispatcher.BeginInvoke([action]{
|
||||
$sync.MicrowinBusyIndicator.Visibility="Visible"
|
||||
$sync.BusyText.Text=$message
|
||||
$sync.BusyText.Foreground="#00FF00"
|
||||
$sync.BusyIcon.Foreground="#00FF00"
|
||||
})
|
||||
}
|
||||
"hide" {
|
||||
$sync.form.Dispatcher.BeginInvoke([action]{
|
||||
$sync.MicrowinBusyIndicator.Visibility="Hidden"
|
||||
$sync.BusyText.Foreground=$sync.Form.Resources.MicrowinBusyColor
|
||||
$sync.BusyIcon.Foreground=$sync.Form.Resources.MicrowinBusyColor
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
# Force the UI to process pending messages
|
||||
[System.Windows.Forms.Application]::DoEvents()
|
||||
Start-Sleep -Milliseconds 50
|
||||
}
|
@ -12,10 +12,8 @@ function Invoke-MicrowinGetIso {
|
||||
return
|
||||
}
|
||||
|
||||
$sync.BusyMessage.Visibility="Visible"
|
||||
$sync.BusyText.Text="N Busy"
|
||||
|
||||
|
||||
# Provide immediate feedback to user
|
||||
Invoke-MicrowinBusyInfo -action "wip" -message "Initializing MicroWin process..." -interactive $false
|
||||
|
||||
Write-Host " _ __ __ _ "
|
||||
Write-Host " /\/\ (_) ___ _ __ ___ / / /\ \ \(_) _ __ "
|
||||
@ -23,47 +21,9 @@ function Invoke-MicrowinGetIso {
|
||||
Write-Host "/ /\/\ \| || (__ | | | (_) | \ /\ / | || | | | "
|
||||
Write-Host "\/ \/|_| \___||_| \___/ \/ \/ |_||_| |_| "
|
||||
|
||||
$oscdimgPath = Join-Path $env:TEMP 'oscdimg.exe'
|
||||
$oscdImgFound = [bool] (Get-Command -ErrorAction Ignore -Type Application oscdimg.exe) -or (Test-Path $oscdimgPath -PathType Leaf)
|
||||
Write-Host "oscdimg.exe on system: $oscdImgFound"
|
||||
|
||||
if (!$oscdImgFound) {
|
||||
$downloadFromGitHub = $sync.WPFMicrowinDownloadFromGitHub.IsChecked
|
||||
$sync.BusyMessage.Visibility="Hidden"
|
||||
|
||||
if (!$downloadFromGitHub) {
|
||||
# only show the message to people who did check the box to download from github, if you check the box
|
||||
# you consent to downloading it, no need to show extra dialogs
|
||||
[System.Windows.MessageBox]::Show("oscdimge.exe is not found on the system, winutil will now attempt do download and install it using choco. This might take a long time.")
|
||||
# the step below needs choco to download oscdimg
|
||||
# Install Choco if not already present
|
||||
Install-WinUtilChoco
|
||||
$chocoFound = [bool] (Get-Command -ErrorAction Ignore -Type Application choco)
|
||||
Write-Host "choco on system: $chocoFound"
|
||||
if (!$chocoFound) {
|
||||
[System.Windows.MessageBox]::Show("choco.exe is not found on the system, you need choco to download oscdimg.exe")
|
||||
return
|
||||
}
|
||||
|
||||
Start-Process -Verb runas -FilePath powershell.exe -ArgumentList "choco install windows-adk-oscdimg"
|
||||
[System.Windows.MessageBox]::Show("oscdimg is installed, now close, reopen PowerShell terminal and re-launch winutil.ps1")
|
||||
return
|
||||
} else {
|
||||
[System.Windows.MessageBox]::Show("oscdimge.exe is not found on the system, winutil will now attempt do download and install it from github. This might take a long time.")
|
||||
Microwin-GetOscdimg -oscdimgPath $oscdimgPath
|
||||
$oscdImgFound = Test-Path $oscdimgPath -PathType Leaf
|
||||
if (!$oscdImgFound) {
|
||||
$msg = "oscdimg was not downloaded can not proceed"
|
||||
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error)
|
||||
return
|
||||
} else {
|
||||
Write-Host "oscdimg.exe was successfully downloaded from github"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($sync["ISOmanual"].IsChecked) {
|
||||
# Open file dialog to let user choose the ISO file
|
||||
Invoke-MicrowinBusyInfo -action "wip" -message "Please select an ISO file..." -interactive $true
|
||||
[System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | Out-Null
|
||||
$openFileDialog = New-Object System.Windows.Forms.OpenFileDialog
|
||||
$openFileDialog.initialDirectory = $initialDirectory
|
||||
@ -73,20 +33,26 @@ function Invoke-MicrowinGetIso {
|
||||
|
||||
if ([string]::IsNullOrEmpty($filePath)) {
|
||||
Write-Host "No ISO is chosen"
|
||||
$sync.BusyMessage.Visibility="Hidden"
|
||||
Invoke-MicrowinBusyInfo -action "hide" -message " "
|
||||
return
|
||||
}
|
||||
|
||||
} elseif ($sync["ISOdownloader"].IsChecked) {
|
||||
# Create folder browsers for user-specified locations
|
||||
Invoke-MicrowinBusyInfo -action "wip" -message "Please select download location..." -interactive $true
|
||||
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
|
||||
$isoDownloaderFBD = New-Object System.Windows.Forms.FolderBrowserDialog
|
||||
$isoDownloaderFBD.Description = "Please specify the path to download the ISO file to:"
|
||||
$isoDownloaderFBD.ShowNewFolderButton = $true
|
||||
if ($isoDownloaderFBD.ShowDialog() -ne [System.Windows.Forms.DialogResult]::OK)
|
||||
{
|
||||
Invoke-MicrowinBusyInfo -action "hide" -message " "
|
||||
return
|
||||
}
|
||||
|
||||
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo"
|
||||
Invoke-MicrowinBusyInfo -action "wip" -message "Preparing to download ISO..." -interactive $false
|
||||
|
||||
# Grab the location of the selected path
|
||||
$targetFolder = $isoDownloaderFBD.SelectedPath
|
||||
|
||||
@ -95,6 +61,7 @@ function Invoke-MicrowinGetIso {
|
||||
$fidopath = "$env:temp\Fido.ps1"
|
||||
$originalLocation = $PSScriptRoot
|
||||
|
||||
Invoke-MicrowinBusyInfo -action "wip" -message "Downloading Fido script..." -interactive $false
|
||||
Invoke-WebRequest "https://github.com/pbatard/Fido/raw/master/Fido.ps1" -OutFile $fidopath
|
||||
|
||||
Set-Location -Path $env:temp
|
||||
@ -105,11 +72,14 @@ function Invoke-MicrowinGetIso {
|
||||
$sync["ISOLanguage"].SelectedItem
|
||||
}
|
||||
|
||||
Invoke-MicrowinBusyInfo -action "wip" -message "Downloading Windows ISO... (This may take a long time)" -interactive $false
|
||||
& $fidopath -Win 'Windows 11' -Rel $sync["ISORelease"].SelectedItem -Arch "x64" -Lang $lang -Ed "Windows 11 Home/Pro/Edu"
|
||||
if (-not $?)
|
||||
{
|
||||
Write-Host "Could not download the ISO file. Look at the output of the console for more information."
|
||||
$msg = "The ISO file could not be downloaded"
|
||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
||||
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error)
|
||||
return
|
||||
}
|
||||
@ -131,8 +101,11 @@ function Invoke-MicrowinGetIso {
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Host "Unable to move the ISO file to the location you specified. The downloaded ISO is in the `"$env:TEMP`" folder"
|
||||
$msg = "Unable to move the ISO file to the location you specified. The downloaded ISO is in the `"$env:TEMP`" folder"
|
||||
Write-Host $msg
|
||||
Write-Host "Error information: $($_.Exception.Message)" -ForegroundColor Yellow
|
||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -140,11 +113,57 @@ function Invoke-MicrowinGetIso {
|
||||
Write-Host "File path $($filePath)"
|
||||
if (-not (Test-Path -Path "$filePath" -PathType Leaf)) {
|
||||
$msg = "File you've chosen doesn't exist"
|
||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
||||
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error)
|
||||
return
|
||||
}
|
||||
|
||||
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo"
|
||||
Invoke-MicrowinBusyInfo -action "wip" -message "Checking system requirements..." -interactive $false
|
||||
|
||||
$oscdimgPath = Join-Path $env:TEMP 'oscdimg.exe'
|
||||
$oscdImgFound = [bool] (Get-Command -ErrorAction Ignore -Type Application oscdimg.exe) -or (Test-Path $oscdimgPath -PathType Leaf)
|
||||
Write-Host "oscdimg.exe on system: $oscdImgFound"
|
||||
|
||||
if (!$oscdImgFound) {
|
||||
$downloadFromGitHub = $sync.WPFMicrowinDownloadFromGitHub.IsChecked
|
||||
|
||||
if (!$downloadFromGitHub) {
|
||||
# only show the message to people who did check the box to download from github, if you check the box
|
||||
# you consent to downloading it, no need to show extra dialogs
|
||||
[System.Windows.MessageBox]::Show("oscdimge.exe is not found on the system, winutil will now attempt do download and install it using choco. This might take a long time.")
|
||||
# the step below needs choco to download oscdimg
|
||||
# Install Choco if not already present
|
||||
Install-WinUtilChoco
|
||||
$chocoFound = [bool] (Get-Command -ErrorAction Ignore -Type Application choco)
|
||||
Write-Host "choco on system: $chocoFound"
|
||||
if (!$chocoFound) {
|
||||
[System.Windows.MessageBox]::Show("choco.exe is not found on the system, you need choco to download oscdimg.exe")
|
||||
return
|
||||
}
|
||||
|
||||
Start-Process -Verb runas -FilePath powershell.exe -ArgumentList "choco install windows-adk-oscdimg"
|
||||
$msg = "oscdimg is installed, now close, reopen PowerShell terminal and re-launch winutil.ps1"
|
||||
Invoke-MicrowinBusyInfo -action "done" -message $msg # We set it to done because it immediately returns from this function
|
||||
[System.Windows.MessageBox]::Show($msg)
|
||||
return
|
||||
} else {
|
||||
[System.Windows.MessageBox]::Show("oscdimge.exe is not found on the system, winutil will now attempt do download and install it from github. This might take a long time.")
|
||||
Invoke-MicrowinBusyInfo -action "wip" -message "Downloading oscdimg.exe..." -interactive $false
|
||||
Microwin-GetOscdimg -oscdimgPath $oscdimgPath
|
||||
$oscdImgFound = Test-Path $oscdimgPath -PathType Leaf
|
||||
if (!$oscdImgFound) {
|
||||
$msg = "oscdimg was not downloaded can not proceed"
|
||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
||||
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error)
|
||||
return
|
||||
} else {
|
||||
Write-Host "oscdimg.exe was successfully downloaded from github"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Invoke-MicrowinBusyInfo -action "wip" -message "Checking disk space..." -interactive $false
|
||||
|
||||
# Detect the file size of the ISO and compare it with the free space of the system drive
|
||||
$isoSize = (Get-Item -Path "$filePath").Length
|
||||
@ -159,14 +178,17 @@ function Invoke-MicrowinGetIso {
|
||||
}
|
||||
elseif ($driveSpace -lt $isoSize) {
|
||||
# It's critical and we can't continue. Output an error
|
||||
Write-Host "You don't have enough space for this operation. You need at least $([Math]::Round(($isoSize / ([Math]::Pow(1024, 2))) * 2, 2)) MB of free space to copy the ISO files to a temp directory and to be able to perform additional operations."
|
||||
$msg = "You don't have enough space for this operation. You need at least $([Math]::Round(($isoSize / ([Math]::Pow(1024, 2))) * 2, 2)) MB of free space to copy the ISO files to a temp directory and to be able to perform additional operations."
|
||||
Write-Host $msg
|
||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
||||
return
|
||||
} else {
|
||||
Write-Host "You have enough space for this operation."
|
||||
}
|
||||
|
||||
try {
|
||||
Invoke-MicrowinBusyInfo -action "wip" -message "Mounting ISO file..." -interactive $false
|
||||
Write-Host "Mounting Iso. Please wait."
|
||||
$mountedISO = Mount-DiskImage -PassThru "$filePath"
|
||||
Write-Host "Done mounting Iso `"$($mountedISO.ImagePath)`""
|
||||
@ -174,10 +196,12 @@ function Invoke-MicrowinGetIso {
|
||||
Write-Host "Iso mounted to '$driveLetter'"
|
||||
} catch {
|
||||
# @ChrisTitusTech please copy this wiki and change the link below to your copy of the wiki
|
||||
Write-Error "Failed to mount the image. Error: $($_.Exception.Message)"
|
||||
$msg = "Failed to mount the image. Error: $($_.Exception.Message)"
|
||||
Write-Error $msg
|
||||
Write-Error "This is NOT winutil's problem, your ISO might be corrupt, or there is a problem on the system"
|
||||
Write-Host "Please refer to this wiki for more details: https://christitustech.github.io/winutil/KnownIssues/#troubleshoot-errors-during-microwin-usage" -ForegroundColor Red
|
||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
||||
return
|
||||
}
|
||||
# storing off values in hidden fields for further steps
|
||||
@ -236,23 +260,32 @@ function Invoke-MicrowinGetIso {
|
||||
try {
|
||||
|
||||
#$data = @($driveLetter, $filePath)
|
||||
Invoke-MicrowinBusyInfo -action "wip" -message "Creating directories..." -interactive $false
|
||||
New-Item -ItemType Directory -Force -Path "$($mountDir)" | Out-Null
|
||||
New-Item -ItemType Directory -Force -Path "$($scratchDir)" | Out-Null
|
||||
|
||||
Invoke-MicrowinBusyInfo -action "wip" -message "Copying Windows files... (This may take several minutes)" -interactive $false
|
||||
Write-Host "Copying Windows image. This will take awhile, please don't use UI or cancel this step!"
|
||||
|
||||
# xcopy we can verify files and also not copy files that already exist, but hard to measure
|
||||
# xcopy.exe /E /I /H /R /Y /J $DriveLetter":" $mountDir >$null
|
||||
$totalTime = Measure-Command { Copy-Files "$($driveLetter):" "$mountDir" -Recurse -Force }
|
||||
$totalTime = Measure-Command {
|
||||
Copy-Files "$($driveLetter):" "$mountDir" -Recurse -Force
|
||||
# Force UI update during long operation
|
||||
[System.Windows.Forms.Application]::DoEvents()
|
||||
}
|
||||
Write-Host "Copy complete! Total Time: $($totalTime.Minutes) minutes, $($totalTime.Seconds) seconds"
|
||||
|
||||
Invoke-MicrowinBusyInfo -action "wip" -message "Processing Windows image..." -interactive $false
|
||||
$wimFile = "$mountDir\sources\install.wim"
|
||||
Write-Host "Getting image information $wimFile"
|
||||
|
||||
if ((-not (Test-Path -Path "$wimFile" -PathType Leaf)) -and (-not (Test-Path -Path "$($wimFile.Replace(".wim", ".esd").Trim())" -PathType Leaf))) {
|
||||
$msg = "Neither install.wim nor install.esd exist in the image, this could happen if you use unofficial Windows images. Please don't use shady images from the internet, use only official images. Here are instructions how to download ISO images if the Microsoft website is not showing the link to download and ISO. https://www.techrepublic.com/article/how-to-download-a-windows-10-iso-file-without-using-the-media-creation-tool/"
|
||||
Write-Host $msg
|
||||
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error)
|
||||
$msg = "Neither install.wim nor install.esd exist in the image, this could happen if you use unofficial Windows images. Please don't use shady images from the internet."
|
||||
Write-Host "$($msg) Only use official images. Here are instructions how to download ISO images if the Microsoft website is not showing the link to download and ISO. https://www.techrepublic.com/article/how-to-download-a-windows-10-iso-file-without-using-the-media-creation-tool/"
|
||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
||||
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error)
|
||||
throw
|
||||
}
|
||||
elseif ((-not (Test-Path -Path $wimFile -PathType Leaf)) -and (Test-Path -Path $wimFile.Replace(".wim", ".esd").Trim() -PathType Leaf)) {
|
||||
@ -265,23 +298,34 @@ function Invoke-MicrowinGetIso {
|
||||
$imageName = $_.ImageName
|
||||
$sync.MicrowinWindowsFlavors.Items.Add("$imageIdx : $imageName")
|
||||
}
|
||||
[System.Windows.Forms.Application]::DoEvents()
|
||||
|
||||
$sync.MicrowinWindowsFlavors.SelectedIndex = 0
|
||||
Write-Host "Finding suitable Pro edition. This can take some time. Do note that this is an automatic process that might not select the edition you want."
|
||||
Invoke-MicrowinBusyInfo -action "wip" -message "Finding suitable Pro edition..." -interactive $false
|
||||
|
||||
Get-WindowsImage -ImagePath $wimFile | ForEach-Object {
|
||||
if ((Get-WindowsImage -ImagePath $wimFile -Index $_.ImageIndex).EditionId -eq "Professional") {
|
||||
# We have found the Pro edition
|
||||
$sync.MicrowinWindowsFlavors.SelectedIndex = $_.ImageIndex - 1
|
||||
}
|
||||
# Allow UI updates during this loop
|
||||
[System.Windows.Forms.Application]::DoEvents()
|
||||
}
|
||||
|
||||
Get-Volume $driveLetter | Get-DiskImage | Dismount-DiskImage
|
||||
Write-Host "Selected value '$($sync.MicrowinWindowsFlavors.SelectedValue)'....."
|
||||
|
||||
$sync.MicrowinOptionsPanel.Visibility = 'Visible'
|
||||
Toggle-MicrowinPanel 2
|
||||
|
||||
} catch {
|
||||
Write-Host "Dismounting bad image..."
|
||||
Get-Volume $driveLetter | Get-DiskImage | Dismount-DiskImage
|
||||
Remove-Item -Recurse -Force "$($scratchDir)"
|
||||
Remove-Item -Recurse -Force "$($mountDir)"
|
||||
Invoke-MicrowinBusyInfo -action "warning" -message "Failed to read and unpack ISO"
|
||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
||||
|
||||
}
|
||||
|
||||
Write-Host "Done reading and unpacking ISO"
|
||||
@ -289,7 +333,7 @@ function Invoke-MicrowinGetIso {
|
||||
Write-Host "*********************************"
|
||||
Write-Host "Check the UI for further steps!!!"
|
||||
|
||||
$sync.BusyMessage.Visibility="Hidden"
|
||||
Invoke-MicrowinBusyInfo -action "done" -message "Done! Proceed with customization."
|
||||
$sync.ProcessRunning = $false
|
||||
Set-WinUtilTaskbaritem -state "None" -overlay "checkmark"
|
||||
}
|
||||
|
@ -85,6 +85,14 @@ function Microwin-NewFirstRun {
|
||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.StartupApp" /v Enabled /t REG_DWORD /d 0 /f
|
||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Microsoft.SkyDrive.Desktop" /f
|
||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Microsoft.SkyDrive.Desktop" /v Enabled /t REG_DWORD /d 0 /f
|
||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.AccountHealth" /f
|
||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.AccountHealth" /v Enabled /t REG_DWORD /d 0 /f
|
||||
|
||||
if (Test-Path -Path "$env:HOMEDRIVE\winutil-config.json")
|
||||
{
|
||||
Write-Host "Configuration file detected. Applying..."
|
||||
iex "& { $(irm christitus.com/win) } -Config `"$env:HOMEDRIVE\winutil-config.json`" -Run"
|
||||
}
|
||||
|
||||
'@
|
||||
$firstRun | Out-File -FilePath "$env:temp\FirstStartup.ps1" -Force
|
||||
|
28
functions/microwin/Toggle-MicrowinPanel.ps1
Normal file
28
functions/microwin/Toggle-MicrowinPanel.ps1
Normal file
@ -0,0 +1,28 @@
|
||||
function Toggle-MicrowinPanel {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Toggles the visibility of the Microwin options and ISO panels in the GUI.
|
||||
.DESCRIPTION
|
||||
This function toggles the visibility of the Microwin options and ISO panels in the GUI.
|
||||
.PARAMETER MicrowinOptionsPanel
|
||||
The panel containing Microwin options.
|
||||
.PARAMETER MicrowinISOPanel
|
||||
The panel containing the Microwin ISO options.
|
||||
.EXAMPLE
|
||||
Toggle-MicrowinPanel 1
|
||||
#>
|
||||
param (
|
||||
[Parameter(Mandatory = $true, Position = 0)]
|
||||
[ValidateSet(1, 2)]
|
||||
[int]$PanelNumber
|
||||
)
|
||||
|
||||
if ($PanelNumber -eq 1) {
|
||||
$sync.MicrowinISOPanel.Visibility = 'Visible'
|
||||
$sync.MicrowinOptionsPanel.Visibility = 'Collapsed'
|
||||
|
||||
} elseif ($PanelNumber -eq 2) {
|
||||
$sync.MicrowinOptionsPanel.Visibility = 'Visible'
|
||||
$sync.MicrowinISOPanel.Visibility = 'Collapsed'
|
||||
}
|
||||
}
|
@ -33,7 +33,7 @@ function Get-WinUtilSelectedPackages
|
||||
"Choco" {
|
||||
if ($package.choco -eq "na") {
|
||||
Write-Debug "$($package.content) has no Choco value."
|
||||
$packagesWinget.add($package.winget)
|
||||
$null = $packagesWinget.add($($package.winget))
|
||||
Write-Host "Queueing $($package.winget) for Winget"
|
||||
} else {
|
||||
$null = $packagesChoco.add($package.choco)
|
||||
@ -44,7 +44,7 @@ function Get-WinUtilSelectedPackages
|
||||
"Winget" {
|
||||
if ($package.winget -eq "na") {
|
||||
Write-Debug "$($package.content) has no Winget value."
|
||||
$packagesChoco.add($package.choco)
|
||||
$null = $packagesChoco.add($package.choco)
|
||||
Write-Host "Queueing $($package.choco) for Chocolatey"
|
||||
} else {
|
||||
$null = $packagesWinget.add($($package.winget))
|
||||
|
12
functions/private/Hide-WPFInstallAppBusy.ps1
Normal file
12
functions/private/Hide-WPFInstallAppBusy.ps1
Normal file
@ -0,0 +1,12 @@
|
||||
function Hide-WPFInstallAppBusy {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Hides the busy overlay in the install app area of the WPF form.
|
||||
This is used to indicate that an install or uninstall has finished.
|
||||
#>
|
||||
$sync.form.Dispatcher.Invoke([action]{
|
||||
$sync.InstallAppAreaOverlay.Visibility = [Windows.Visibility]::Collapsed
|
||||
$sync.InstallAppAreaBorder.IsEnabled = $true
|
||||
$sync.InstallAppAreaScrollViewer.Effect.Radius = 0
|
||||
})
|
||||
}
|
@ -5,6 +5,8 @@
|
||||
This is used as the parent object for all category and app entries on the install tab
|
||||
Used to as part of the Install Tab UI generation
|
||||
|
||||
Also creates an overlay with a progress bar and text to indicate that an install or uninstall is in progress
|
||||
|
||||
.PARAMETER TargetElement
|
||||
The element to which the AppArea shoud be added
|
||||
|
||||
@ -17,6 +19,7 @@
|
||||
$Border = New-Object Windows.Controls.Border
|
||||
$Border.VerticalAlignment = "Stretch"
|
||||
$Border.SetResourceReference([Windows.Controls.Control]::StyleProperty, "BorderStyle")
|
||||
$sync.InstallAppAreaBorder = $Border
|
||||
|
||||
# Add a ScrollViewer, because the ItemsControl does not support scrolling by itself
|
||||
$scrollViewer = New-Object Windows.Controls.ScrollViewer
|
||||
@ -24,11 +27,19 @@
|
||||
$scrollViewer.HorizontalAlignment = 'Stretch'
|
||||
$scrollViewer.VerticalAlignment = 'Stretch'
|
||||
$scrollViewer.CanContentScroll = $true
|
||||
$sync.InstallAppAreaScrollViewer = $scrollViewer
|
||||
$Border.Child = $scrollViewer
|
||||
|
||||
# Initialize the Blur Effect for the ScrollViewer, which will be used to indicate that an install/uninstall is in progress
|
||||
$blurEffect = New-Object Windows.Media.Effects.BlurEffect
|
||||
$blurEffect.Radius = 0
|
||||
$scrollViewer.Effect = $blurEffect
|
||||
|
||||
## Create the ItemsControl, which will be the parent of all the app entries
|
||||
$itemsControl = New-Object Windows.Controls.ItemsControl
|
||||
$itemsControl.HorizontalAlignment = 'Stretch'
|
||||
$itemsControl.VerticalAlignment = 'Stretch'
|
||||
$scrollViewer.Content = $itemsControl
|
||||
|
||||
# Enable virtualization for the ItemsControl to improve performance (It's hard to test if this is actually working, so if you know what you're doing, please check this)
|
||||
$itemsPanelTemplate = New-Object Windows.Controls.ItemsPanelTemplate
|
||||
@ -38,8 +49,64 @@
|
||||
$itemsControl.SetValue([Windows.Controls.VirtualizingStackPanel]::IsVirtualizingProperty, $true)
|
||||
$itemsControl.SetValue([Windows.Controls.VirtualizingStackPanel]::VirtualizationModeProperty, [Windows.Controls.VirtualizationMode]::Recycling)
|
||||
|
||||
$scrollViewer.Content = $itemsControl
|
||||
$Border.Child = $scrollViewer
|
||||
$null = $targetGrid.Children.Add($Border)
|
||||
# Add the Border containing the App Area to the target Grid
|
||||
$targetGrid.Children.Add($Border) | Out-Null
|
||||
|
||||
$overlay = New-Object Windows.Controls.Border
|
||||
$overlay.CornerRadius = New-Object Windows.CornerRadius(10)
|
||||
$overlay.SetResourceReference([Windows.Controls.Control]::BackgroundProperty, "AppInstallOverlayBackgroundColor")
|
||||
$overlay.Visibility = [Windows.Visibility]::Collapsed
|
||||
|
||||
# Also add the overlay to the target Grid on top of the App Area
|
||||
$targetGrid.Children.Add($overlay) | Out-Null
|
||||
$sync.InstallAppAreaOverlay = $overlay
|
||||
|
||||
$overlayText = New-Object Windows.Controls.TextBlock
|
||||
$overlayText.Text = "Installing apps..."
|
||||
$overlayText.HorizontalAlignment = 'Center'
|
||||
$overlayText.VerticalAlignment = 'Center'
|
||||
$overlayText.SetResourceReference([Windows.Controls.TextBlock]::ForegroundProperty, "MainForegroundColor")
|
||||
$overlayText.Background = "Transparent"
|
||||
$overlayText.SetResourceReference([Windows.Controls.TextBlock]::FontSizeProperty, "HeaderFontSize")
|
||||
$overlayText.SetResourceReference([Windows.Controls.TextBlock]::FontFamilyProperty, "MainFontFamily")
|
||||
$overlayText.SetResourceReference([Windows.Controls.TextBlock]::FontWeightProperty, "MainFontWeight")
|
||||
$overlayText.SetResourceReference([Windows.Controls.TextBlock]::MarginProperty, "MainMargin")
|
||||
$sync.InstallAppAreaOverlayText = $overlayText
|
||||
|
||||
$progressbar = New-Object Windows.Controls.ProgressBar
|
||||
$progressbar.Name = "ProgressBar"
|
||||
$progressbar.Width = 250
|
||||
$progressbar.Height = 50
|
||||
$sync.ProgressBar = $progressbar
|
||||
|
||||
# Add a TextBlock overlay for the progress bar text
|
||||
$progressBarTextBlock = New-Object Windows.Controls.TextBlock
|
||||
$progressBarTextBlock.Name = "progressBarTextBlock"
|
||||
$progressBarTextBlock.FontWeight = [Windows.FontWeights]::Bold
|
||||
$progressBarTextBlock.FontSize = 16
|
||||
$progressBarTextBlock.Width = $progressbar.Width
|
||||
$progressBarTextBlock.Height = $progressbar.Height
|
||||
$progressBarTextBlock.SetResourceReference([Windows.Controls.TextBlock]::ForegroundProperty, "ProgressBarTextColor")
|
||||
$progressBarTextBlock.TextTrimming = "CharacterEllipsis"
|
||||
$progressBarTextBlock.Background = "Transparent"
|
||||
$sync.progressBarTextBlock = $progressBarTextBlock
|
||||
|
||||
# Create a Grid to overlay the text on the progress bar
|
||||
$progressGrid = New-Object Windows.Controls.Grid
|
||||
$progressGrid.Width = $progressbar.Width
|
||||
$progressGrid.Height = $progressbar.Height
|
||||
$progressGrid.Margin = "0,10,0,10"
|
||||
$progressGrid.Children.Add($progressbar) | Out-Null
|
||||
$progressGrid.Children.Add($progressBarTextBlock) | Out-Null
|
||||
|
||||
$overlayStackPanel = New-Object Windows.Controls.StackPanel
|
||||
$overlayStackPanel.Orientation = "Vertical"
|
||||
$overlayStackPanel.HorizontalAlignment = 'Center'
|
||||
$overlayStackPanel.VerticalAlignment = 'Center'
|
||||
$overlayStackPanel.Children.Add($overlayText) | Out-Null
|
||||
$overlayStackPanel.Children.Add($progressGrid) | Out-Null
|
||||
|
||||
$overlay.Child = $overlayStackPanel
|
||||
|
||||
return $itemsControl
|
||||
}
|
||||
|
@ -97,9 +97,9 @@ Function Install-WinUtilProgramWinget {
|
||||
return $true
|
||||
}
|
||||
|
||||
$userChoice = [System.Windows.MessageBox]::Show("Do you want to attempt $($Program) installation with specific user credentials? Select 'Yes' to proceed or 'No' to skip.", "User credential Prompt", [System.Windows.MessageBoxButton]::YesNo)
|
||||
if ($userChoice -eq 'Yes') {
|
||||
$getcreds = Get-Credential
|
||||
$userAcknowledgment = [System.Windows.MessageBox]::Show("You need to input your password to install $($Program) with specific user credentials.", "User credential Prompt", [System.Windows.MessageBoxButton]::Ok)
|
||||
if ($userAcknowledgment -eq 'Ok') {
|
||||
$getcreds = Get-Credential $env:USERNAME
|
||||
$status = Invoke-Winget -wingetId $Program -credential $getcreds
|
||||
if ($status -eq 0) {
|
||||
Write-Host "$($Program) installed successfully with User prompt."
|
||||
|
@ -52,6 +52,10 @@ function Install-WinUtilWinget {
|
||||
|
||||
# Check if Windows version supports Repair-WinGetPackageManager (24H2 and above)
|
||||
if ([System.Environment]::OSVersion.Version.Build -ge 26100) {
|
||||
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
|
||||
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
|
||||
Install-Module "Microsoft.WinGet.Client" -Force
|
||||
Import-Module Microsoft.WinGet.Client
|
||||
Repair-WinGetPackageManager -Force -Latest -Verbose
|
||||
# Verify if repair was successful
|
||||
$wingetCmd = Get-Command winget -ErrorAction Stop
|
||||
|
88
functions/private/Invoke-WinUtilFontScaling.ps1
Normal file
88
functions/private/Invoke-WinUtilFontScaling.ps1
Normal file
@ -0,0 +1,88 @@
|
||||
function Invoke-WinUtilFontScaling {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Applies UI and font scaling for accessibility
|
||||
|
||||
.PARAMETER ScaleFactor
|
||||
Sets the scaling from 0.75 and 2.0.
|
||||
Default is 1.0 (100% - no scaling)
|
||||
|
||||
.EXAMPLE
|
||||
Invoke-WinUtilFontScaling -ScaleFactor 1.25
|
||||
# Applies 125% scaling
|
||||
#>
|
||||
|
||||
param (
|
||||
[double]$ScaleFactor = 1.0
|
||||
)
|
||||
|
||||
# Validate if scale factor is within the range
|
||||
if ($ScaleFactor -lt 0.75 -or $ScaleFactor -gt 2.0) {
|
||||
Write-Warning "Scale factor must be between 0.75 and 2.0. Using 1.0 instead."
|
||||
$ScaleFactor = 1.0
|
||||
}
|
||||
|
||||
# Define an array for resources to be scaled
|
||||
$fontResources = @(
|
||||
# Fonts
|
||||
"FontSize",
|
||||
"ButtonFontSize",
|
||||
"HeaderFontSize",
|
||||
"TabButtonFontSize",
|
||||
"ConfigTabButtonFontSize",
|
||||
"IconFontSize",
|
||||
"SettingsIconFontSize",
|
||||
"CloseIconFontSize",
|
||||
"AppEntryFontSize",
|
||||
"SearchBarTextBoxFontSize",
|
||||
"SearchBarClearButtonFontSize",
|
||||
"CustomDialogFontSize",
|
||||
"CustomDialogFontSizeHeader",
|
||||
"ConfigUpdateButtonFontSize",
|
||||
# Buttons and UI
|
||||
"CheckBoxBulletDecoratorSize",
|
||||
"ButtonWidth",
|
||||
"ButtonHeight",
|
||||
"TabButtonWidth",
|
||||
"TabButtonHeight",
|
||||
"IconButtonSize",
|
||||
"AppEntryWidth",
|
||||
"SearchBarWidth",
|
||||
"SearchBarHeight",
|
||||
"CustomDialogWidth",
|
||||
"CustomDialogHeight",
|
||||
"CustomDialogLogoSize",
|
||||
"MicroWinLogoSize",
|
||||
"ToolTipWidth"
|
||||
)
|
||||
|
||||
# Apply scaling to each resource
|
||||
foreach ($resourceName in $fontResources) {
|
||||
try {
|
||||
# Get the default font size from the theme configuration
|
||||
$originalValue = $sync.configs.themes.shared.$resourceName
|
||||
if ($originalValue) {
|
||||
# Convert string to double since values are stored as strings
|
||||
$originalValue = [double]$originalValue
|
||||
# Calculates and applies the new font size
|
||||
$newValue = [math]::Round($originalValue * $ScaleFactor, 1)
|
||||
$sync.Form.Resources[$resourceName] = $newValue
|
||||
Write-Debug "Scaled $resourceName from original $originalValue to $newValue (factor: $ScaleFactor)"
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Warning "Failed to scale resource $resourceName : $_"
|
||||
}
|
||||
}
|
||||
|
||||
# Update the font scaling percentage displayed on the UI
|
||||
if ($sync.FontScalingValue) {
|
||||
$percentage = [math]::Round($ScaleFactor * 100)
|
||||
$sync.FontScalingValue.Text = "$percentage%"
|
||||
}
|
||||
|
||||
Write-Debug "Font scaling applied with factor: $ScaleFactor"
|
||||
}
|
||||
|
||||
|
@ -7,24 +7,18 @@ function Set-WinUtilProgressbar{
|
||||
The Text to be overlayed onto the Progress Bar
|
||||
.PARAMETER PERCENT
|
||||
The percentage of the Progress Bar that should be filled (0-100)
|
||||
.PARAMETER Hide
|
||||
If provided, the Progress Bar and the label will be hidden
|
||||
#>
|
||||
param(
|
||||
[string]$Label,
|
||||
[ValidateRange(0,100)]
|
||||
[int]$Percent,
|
||||
$Hide
|
||||
[int]$Percent
|
||||
)
|
||||
if ($hide) {
|
||||
$sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Visibility = "Collapsed"})
|
||||
$sync.form.Dispatcher.Invoke([action]{$sync.ProgressBar.Visibility = "Collapsed"})
|
||||
} else {
|
||||
$sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Visibility = "Visible"})
|
||||
$sync.form.Dispatcher.Invoke([action]{$sync.ProgressBar.Visibility = "Visible"})
|
||||
|
||||
$sync.form.Dispatcher.Invoke([action]{$sync.progressBarTextBlock.Text = $label})
|
||||
$sync.form.Dispatcher.Invoke([action]{$sync.progressBarTextBlock.ToolTip = $label})
|
||||
if ($percent -lt 5 ) {
|
||||
$percent = 5 # Ensure the progress bar is not empty, as it looks weird
|
||||
}
|
||||
$sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Content.Text = $label})
|
||||
$sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Content.ToolTip = $label})
|
||||
$sync.form.Dispatcher.Invoke([action]{ $sync.ProgressBar.Value = $percent})
|
||||
|
||||
}
|
||||
|
21
functions/private/Show-WPFInstallAppBusy.ps1
Normal file
21
functions/private/Show-WPFInstallAppBusy.ps1
Normal file
@ -0,0 +1,21 @@
|
||||
function Show-WPFInstallAppBusy {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Displays a busy overlay in the install app area of the WPF form.
|
||||
This is used to indicate that an install or uninstall is in progress.
|
||||
Dynamically updates the size of the overlay based on the app area on each invocation.
|
||||
.PARAMETER text
|
||||
The text to display in the busy overlay. Defaults to "Installing apps...".
|
||||
#>
|
||||
param (
|
||||
$text = "Installing apps..."
|
||||
)
|
||||
$sync.form.Dispatcher.Invoke([action]{
|
||||
$sync.InstallAppAreaOverlay.Visibility = [Windows.Visibility]::Visible
|
||||
$sync.InstallAppAreaOverlay.Width = $($sync.InstallAppAreaScrollViewer.ActualWidth * 0.4)
|
||||
$sync.InstallAppAreaOverlay.Height = $($sync.InstallAppAreaScrollViewer.ActualWidth * 0.4)
|
||||
$sync.InstallAppAreaOverlayText.Text = $text
|
||||
$sync.InstallAppAreaBorder.IsEnabled = $false
|
||||
$sync.InstallAppAreaScrollViewer.Effect.Radius = 5
|
||||
})
|
||||
}
|
@ -1,138 +0,0 @@
|
||||
Function Uninstall-WinUtilEdgeBrowser {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Uninstall the Edge Browser (Chromium) from the system in an elegant way.
|
||||
.DESCRIPTION
|
||||
This will switch up the region to one of the EEA countries temporarily and uninstall the Edge Browser (Chromium).
|
||||
#>
|
||||
|
||||
param (
|
||||
[Parameter(Mandatory = $true)]
|
||||
[ValidateSet("install", "uninstall")]
|
||||
[string]$action
|
||||
)
|
||||
|
||||
function Uninstall-EdgeClient {
|
||||
param (
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Key
|
||||
)
|
||||
|
||||
$originalNation = [microsoft.win32.registry]::GetValue('HKEY_USERS\.DEFAULT\Control Panel\International\Geo', 'Nation', [Microsoft.Win32.RegistryValueKind]::String)
|
||||
|
||||
# Set Nation to any of the EEA regions temporarily
|
||||
# Refer: https://learn.microsoft.com/en-us/windows/win32/intl/table-of-geographical-locations
|
||||
$tmpNation = 68 # Ireland
|
||||
[microsoft.win32.registry]::SetValue('HKEY_USERS\.DEFAULT\Control Panel\International\Geo', 'Nation', $tmpNation, [Microsoft.Win32.RegistryValueKind]::String) | Out-Null
|
||||
|
||||
$baseKey = 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate'
|
||||
$registryPath = $baseKey + '\ClientState\' + $Key
|
||||
|
||||
if (!(Test-Path -Path $registryPath)) {
|
||||
Write-Host "[$Mode] Registry key not found: $registryPath"
|
||||
return
|
||||
}
|
||||
|
||||
# Remove the status flag
|
||||
Remove-ItemProperty -Path $baseKey -Name "IsEdgeStableUninstalled" -ErrorAction SilentlyContinue | Out-Null
|
||||
|
||||
Remove-ItemProperty -Path $registryPath -Name "experiment_control_labels" -ErrorAction SilentlyContinue | Out-Null
|
||||
|
||||
$uninstallString = (Get-ItemProperty -Path $registryPath).UninstallString
|
||||
$uninstallArguments = (Get-ItemProperty -Path $registryPath).UninstallArguments
|
||||
|
||||
if ([string]::IsNullOrEmpty($uninstallString) -or [string]::IsNullOrEmpty($uninstallArguments)) {
|
||||
Write-Host "[$Mode] Cannot find uninstall methods for $Mode"
|
||||
return
|
||||
}
|
||||
|
||||
# Extra arguments to nuke it
|
||||
$uninstallArguments += " --force-uninstall --delete-profile"
|
||||
|
||||
# $uninstallCommand = "`"$uninstallString`"" + $uninstallArguments
|
||||
if (!(Test-Path -Path $uninstallString)) {
|
||||
Write-Host "[$Mode] setup.exe not found at: $uninstallString"
|
||||
return
|
||||
}
|
||||
Start-Process -FilePath $uninstallString -ArgumentList $uninstallArguments -Wait -NoNewWindow -Verbose
|
||||
|
||||
# Restore Nation back to the original
|
||||
[microsoft.win32.registry]::SetValue('HKEY_USERS\.DEFAULT\Control Panel\International\Geo', 'Nation', $originalNation, [Microsoft.Win32.RegistryValueKind]::String) | Out-Null
|
||||
|
||||
# might not exist in some cases
|
||||
if ((Get-ItemProperty -Path $baseKey).IsEdgeStableUninstalled -eq 1) {
|
||||
Write-Host "[$Mode] Edge Stable has been successfully uninstalled"
|
||||
}
|
||||
}
|
||||
|
||||
function Uninstall-Edge {
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" -Name "NoRemove" -ErrorAction SilentlyContinue | Out-Null
|
||||
|
||||
[microsoft.win32.registry]::SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdateDev", "AllowUninstall", 1, [Microsoft.Win32.RegistryValueKind]::DWord) | Out-Null
|
||||
|
||||
Uninstall-EdgeClient -Key '{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}'
|
||||
|
||||
Remove-Item -Path "Computer\\HKEY_CLASSES_ROOT\\MSEdgePDF" -ErrorAction SilentlyContinue | Out-Null
|
||||
Remove-Item -Path "Computer\\HKEY_CLASSES_ROOT\\MSEdgeHTM" -ErrorAction SilentlyContinue | Out-Null
|
||||
Remove-Item -Path "Computer\\HKEY_CLASSES_ROOT\\MSEdgeMHT" -ErrorAction SilentlyContinue | Out-Null
|
||||
|
||||
# Remove Edge Polocy reg keys
|
||||
Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Edge" -Recurse -ErrorAction SilentlyContinue | Out-Null
|
||||
|
||||
# Remove Edge reg keys
|
||||
Remove-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Edge" -Recurse -ErrorAction SilentlyContinue | Out-Null
|
||||
}
|
||||
|
||||
function Uninstall-WebView {
|
||||
# FIXME: might not work on some systems
|
||||
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" -Name "NoRemove" -ErrorAction SilentlyContinue | Out-Null
|
||||
|
||||
Uninstall-EdgeClient -Key '{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}'
|
||||
}
|
||||
|
||||
function Uninstall-EdgeUpdate {
|
||||
# FIXME: might not work on some systems
|
||||
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" -Name "NoRemove" -ErrorAction SilentlyContinue | Out-Null
|
||||
|
||||
$registryPath = 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate'
|
||||
if (!(Test-Path -Path $registryPath)) {
|
||||
Write-Host "Registry key not found: $registryPath"
|
||||
return
|
||||
}
|
||||
$uninstallCmdLine = (Get-ItemProperty -Path $registryPath).UninstallCmdLine
|
||||
|
||||
if ([string]::IsNullOrEmpty($uninstallCmdLine)) {
|
||||
Write-Host "Cannot find uninstall methods for $Mode"
|
||||
return
|
||||
}
|
||||
|
||||
Start-Process cmd.exe "/c $uninstallCmdLine" -WindowStyle Hidden -Wait
|
||||
|
||||
# Remove EdgeUpdate reg keys
|
||||
Remove-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate" -Recurse -ErrorAction SilentlyContinue | Out-Null
|
||||
}
|
||||
|
||||
function Install-Edge {
|
||||
$tempEdgePath = "$env:TEMP\MicrosoftEdgeSetup.exe"
|
||||
|
||||
try {
|
||||
write-host "Installing Edge ..."
|
||||
Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2109047&Channel=Stable&language=en&consent=1" -OutFile $tempEdgePath
|
||||
Start-Process -FilePath $tempEdgePath -ArgumentList "/silent /install" -Wait
|
||||
Remove-item $tempEdgePath
|
||||
write-host "Edge Installed Successfully"
|
||||
} catch {
|
||||
write-host "Failed to install Edge"
|
||||
}
|
||||
}
|
||||
|
||||
if ($action -eq "Install") {
|
||||
Install-Edge
|
||||
} elseif ($action -eq "Uninstall") {
|
||||
Uninstall-Edge
|
||||
Uninstall-EdgeUpdate
|
||||
# Uninstall-WebView - WebView is needed for Visual Studio and some MS Store Games like Forza
|
||||
}
|
||||
}
|
24
functions/public/Invoke-AutoConfigDialog.ps1
Normal file
24
functions/public/Invoke-AutoConfigDialog.ps1
Normal file
@ -0,0 +1,24 @@
|
||||
function Invoke-AutoConfigDialog {
|
||||
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Sets the automatic configuration file based on a specified JSON file
|
||||
|
||||
#>
|
||||
|
||||
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
|
||||
$OFD = New-Object System.Windows.Forms.OpenFileDialog
|
||||
$OFD.Filter = "JSON Files (*.json)|*.json"
|
||||
$OFD.ShowDialog()
|
||||
|
||||
if (($OFD.FileName -eq "") -and ($sync.MicrowinAutoConfigBox.Text -eq ""))
|
||||
{
|
||||
Write-Host "No automatic config file has been selected. Continuing without one..."
|
||||
return
|
||||
}
|
||||
elseif ($OFD.FileName -ne "")
|
||||
{
|
||||
$sync.MicrowinAutoConfigBox.Text = "$($OFD.FileName)"
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@ function Invoke-WPFButton {
|
||||
# Use this to get the name of the button
|
||||
#[System.Windows.MessageBox]::Show("$Button","Chris Titus Tech's Windows Utility","OK","Info")
|
||||
if (-not $sync.ProcessRunning) {
|
||||
Set-WinUtilProgressBar -label "" -percent 0 -hide $true
|
||||
Set-WinUtilProgressBar -label "" -percent 0
|
||||
}
|
||||
|
||||
Switch -Wildcard ($Button) {
|
||||
@ -35,15 +35,16 @@ function Invoke-WPFButton {
|
||||
"WPFFeatureInstall" {Invoke-WPFFeatureInstall}
|
||||
"WPFPanelDISM" {Invoke-WPFSystemRepair}
|
||||
"WPFPanelAutologin" {Invoke-WPFPanelAutologin}
|
||||
"WPFPanelcontrol" {Invoke-WPFControlPanel -Panel $button}
|
||||
"WPFPanelnetwork" {Invoke-WPFControlPanel -Panel $button}
|
||||
"WPFPanelpower" {Invoke-WPFControlPanel -Panel $button}
|
||||
"WPFPanelregion" {Invoke-WPFControlPanel -Panel $button}
|
||||
"WPFPanelsound" {Invoke-WPFControlPanel -Panel $button}
|
||||
"WPFPanelprinter" {Invoke-WPFControlPanel -Panel $button}
|
||||
"WPFPanelsystem" {Invoke-WPFControlPanel -Panel $button}
|
||||
"WPFPaneluser" {Invoke-WPFControlPanel -Panel $button}
|
||||
"WPFPanelGodMode" {Invoke-WPFControlPanel -Panel $button}
|
||||
"WPFPanelComputer" {Invoke-WPFControlPanel -Panel $button}
|
||||
"WPFPanelControl" {Invoke-WPFControlPanel -Panel $button}
|
||||
"WPFPanelNetwork" {Invoke-WPFControlPanel -Panel $button}
|
||||
"WPFPanelPower" {Invoke-WPFControlPanel -Panel $button}
|
||||
"WPFPanelPrinter" {Invoke-WPFControlPanel -Panel $button}
|
||||
"WPFPanelRegion" {Invoke-WPFControlPanel -Panel $button}
|
||||
"WPFPanelSound" {Invoke-WPFControlPanel -Panel $button}
|
||||
"WPFPanelSystem" {Invoke-WPFControlPanel -Panel $button}
|
||||
"WPFPanelTimedate" {Invoke-WPFControlPanel -Panel $button}
|
||||
"WPFPanelUser" {Invoke-WPFControlPanel -Panel $button}
|
||||
"WPFUpdatesdefault" {Invoke-WPFFixesUpdate}
|
||||
"WPFFixesUpdate" {Invoke-WPFFixesUpdate}
|
||||
"WPFFixesWinget" {Invoke-WPFFixesWinget}
|
||||
@ -62,5 +63,7 @@ function Invoke-WPFButton {
|
||||
"WPFWinUtilUninstallPSProfile" {Invoke-WinUtilUninstallPSProfile}
|
||||
"WPFWinUtilSSHServer" {Invoke-WPFSSHServer}
|
||||
"WPFselectedAppsButton" {$sync.selectedAppsPopup.IsOpen = -not $sync.selectedAppsPopup.IsOpen}
|
||||
"WPFMicrowinPanelBack" {Toggle-MicrowinPanel 1}
|
||||
"MicrowinAutoConfigBtn" {Invoke-AutoConfigDialog}
|
||||
}
|
||||
}
|
||||
|
@ -11,14 +11,15 @@ function Invoke-WPFControlPanel {
|
||||
param($Panel)
|
||||
|
||||
switch ($Panel) {
|
||||
"WPFPanelcontrol" {cmd /c control}
|
||||
"WPFPanelnetwork" {cmd /c ncpa.cpl}
|
||||
"WPFPanelpower" {cmd /c powercfg.cpl}
|
||||
"WPFPanelregion" {cmd /c intl.cpl}
|
||||
"WPFPanelsound" {cmd /c mmsys.cpl}
|
||||
"WPFPanelprinter" {Start-Process "shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}"}
|
||||
"WPFPanelsystem" {cmd /c sysdm.cpl}
|
||||
"WPFPaneluser" {cmd /c "control userpasswords2"}
|
||||
"WPFPanelGodMode" {Start-Process "shell:::{ED7BA470-8E54-465E-825C-99712043E01C}"}
|
||||
"WPFPanelControl" {control}
|
||||
"WPFPanelComputer" {compmgmt.msc}
|
||||
"WPFPanelNetwork" {ncpa.cpl}
|
||||
"WPFPanelPower" {powercfg.cpl}
|
||||
"WPFPanelPrinter" {Start-Process "shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}"}
|
||||
"WPFPanelRegion" {intl.cpl}
|
||||
"WPFPanelSound" {mmsys.cpl}
|
||||
"WPFPanelSystem" {sysdm.cpl}
|
||||
"WPFPanelTimedate" {timedate.cpl}
|
||||
"WPFPanelUser" {control userpasswords2}
|
||||
}
|
||||
}
|
||||
|
@ -8,13 +8,20 @@ function Invoke-WPFFixesNetwork {
|
||||
|
||||
Write-Host "Resetting Network with netsh"
|
||||
|
||||
Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo"
|
||||
# Reset WinSock catalog to a clean state
|
||||
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winsock", "reset"
|
||||
|
||||
Set-WinUtilTaskbaritem -state "Normal" -value 0.35 -overlay "logo"
|
||||
# Resets WinHTTP proxy setting to DIRECT
|
||||
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winhttp", "reset", "proxy"
|
||||
|
||||
Set-WinUtilTaskbaritem -state "Normal" -value 0.7 -overlay "logo"
|
||||
# Removes all user configured IP settings
|
||||
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "int", "ip", "reset"
|
||||
|
||||
Set-WinUtilTaskbaritem -state "None" -overlay "checkmark"
|
||||
|
||||
Write-Host "Process complete. Please reboot your computer."
|
||||
|
||||
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||
|
@ -30,6 +30,8 @@ function Invoke-WPFFixesUpdate {
|
||||
param($Aggressive = $false)
|
||||
|
||||
Write-Progress -Id 0 -Activity "Repairing Windows Update" -PercentComplete 0
|
||||
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo"
|
||||
Write-Host "Starting Windows Update Repair..."
|
||||
# Wait for the first progress bar to show, otherwise the second one won't show
|
||||
Start-Sleep -Milliseconds 200
|
||||
|
||||
@ -190,12 +192,15 @@ function Invoke-WPFFixesUpdate {
|
||||
try {
|
||||
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
|
||||
} catch {
|
||||
Set-WinUtilTaskbaritem -state "Error" -overlay "warning"
|
||||
Write-Warning "Failed to create Windows Update COM object: $_"
|
||||
}
|
||||
Start-Process -NoNewWindow -FilePath "wuauclt" -ArgumentList "/resetauthorization", "/detectnow"
|
||||
Write-Progress -Id 10 -ParentId 0 -Activity "Forcing discovery" -Status "Completed" -PercentComplete 100
|
||||
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Completed" -PercentComplete 100
|
||||
|
||||
Set-WinUtilTaskbaritem -state "None" -overlay "checkmark"
|
||||
|
||||
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||
$MessageboxTitle = "Reset Windows Update "
|
||||
$Messageboxbody = ("Stock settings loaded.`n Please reboot your computer")
|
||||
|
@ -8,7 +8,16 @@ function Invoke-WPFFixesWinget {
|
||||
BravoNorris for the fantastic idea of a button to reinstall winget
|
||||
#>
|
||||
# Install Choco if not already present
|
||||
Install-WinUtilChoco
|
||||
Start-Process -FilePath "choco" -ArgumentList "install winget -y --force" -NoNewWindow -Wait
|
||||
try {
|
||||
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo"
|
||||
Install-WinUtilChoco
|
||||
Start-Process -FilePath "choco" -ArgumentList "install winget -y --force" -NoNewWindow -Wait
|
||||
} catch {
|
||||
Write-Error "Failed to install winget: $_"
|
||||
Set-WinUtilTaskbaritem -state "Error" -overlay "warning"
|
||||
} finally {
|
||||
Write-Host "==> Finished Winget Repair"
|
||||
Set-WinUtilTaskbaritem -state "None" -overlay "checkmark"
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,10 +4,8 @@ function Invoke-WPFInstall {
|
||||
[PSObject[]]$PackagesToInstall = $($sync.selectedApps | Foreach-Object { $sync.configs.applicationsHashtable.$_ })
|
||||
)
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Installs the selected programs using winget, if one or more of the selected programs are already installed on the system, winget will try and perform an upgrade if there's a newer version to install.
|
||||
|
||||
#>
|
||||
|
||||
if($sync.ProcessRunning) {
|
||||
@ -34,15 +32,60 @@ function Invoke-WPFInstall {
|
||||
|
||||
try {
|
||||
$sync.ProcessRunning = $true
|
||||
if($packagesWinget.Count -gt 0) {
|
||||
if($packagesWinget.Count -gt 0 -and $packagesWinget -ne "0") {
|
||||
Add-Type -AssemblyName System.DirectoryServices.AccountManagement
|
||||
Add-Type -assembly System.Windows.Forms
|
||||
$PrincipalContext = New-Object System.DirectoryServices.AccountManagement.PrincipalContext('Machine')
|
||||
$user = $env:USERNAME
|
||||
|
||||
Get-LocalUser | Where-Object Enabled -eq $true | ForEach-Object {
|
||||
try {
|
||||
$myPasswordIsBlank = $PrincipalContext.ValidateCredentials($user, $null)
|
||||
} catch {
|
||||
$form = New-Object System.Windows.Forms.Form
|
||||
$form.Text = "Set password for $user"
|
||||
$form.Size = New-Object System.Drawing.Size(500, 200)
|
||||
|
||||
$label = New-Object System.Windows.Forms.Label
|
||||
$label.Text = 'Maybe a program needs to be installed in "usermode" and you have no password set, you need to set it here. After putting a password into the text box a page asking for your password might open (not right after). If you keep the text box empty, nothing will happen.
|
||||
REMEMBER THE PASSWORD FOR THE FUTURE. YOU WILL NEED FOR STUFF AND TO LOGIN IF AUTOLOGIN ISN`T SET'
|
||||
$label.Size = New-Object System.Drawing.Size(480, 60)
|
||||
$label.Location = New-Object System.Drawing.Point(10, 10)
|
||||
$form.Controls.Add($label)
|
||||
|
||||
$passwordBox = New-Object System.Windows.Forms.TextBox
|
||||
$passwordBox.Size = New-Object System.Drawing.Size(380, 20)
|
||||
$passwordBox.UseSystemPasswordChar = $true
|
||||
$passwordBox.Location = New-Object System.Drawing.Point(10, 125)
|
||||
$form.Controls.Add($passwordBox)
|
||||
|
||||
$button = New-Object System.Windows.Forms.Button
|
||||
$button.Text = 'Submit'
|
||||
$button.Size = New-Object System.Drawing.Size(75, 23)
|
||||
$button.Location = New-Object System.Drawing.Point(400, 125)
|
||||
$button.Add_Click({
|
||||
$password = $passwordBox.Text | ConvertTo-SecureString -AsPlainText -Force
|
||||
if ($password) {
|
||||
Set-LocalUser -Name $user -Password $password
|
||||
$Form.Close()
|
||||
} else {
|
||||
[System.Windows.Forms.MessageBox]::Show('No password entered!')
|
||||
}
|
||||
})
|
||||
$form.Controls.Add($button)
|
||||
$form.ShowDialog() | Out-Null
|
||||
}
|
||||
}
|
||||
|
||||
Show-WPFInstallAppBusy -text "Installing apps..."
|
||||
Install-WinUtilWinget
|
||||
Install-WinUtilProgramWinget -Action Install -Programs $packagesWinget
|
||||
|
||||
}
|
||||
if($packagesChoco.Count -gt 0) {
|
||||
Install-WinUtilChoco
|
||||
Install-WinUtilProgramChoco -Action Install -Programs $packagesChoco
|
||||
}
|
||||
Hide-WPFInstallAppBusy
|
||||
Write-Host "==========================================="
|
||||
Write-Host "-- Installs have finished ---"
|
||||
Write-Host "==========================================="
|
||||
|
@ -104,21 +104,34 @@ function Invoke-WPFSystemRepair {
|
||||
Write-Progress -Id 1 -Activity $childProgressBarActivity -Status "DISM Completed" -PercentComplete 100 -Completed
|
||||
}
|
||||
|
||||
$childProgressBarActivity = "Scanning for corruption"
|
||||
Write-Progress -Id 0 -Activity "Repairing Windows" -PercentComplete 0
|
||||
# Step 1: Run chkdsk to fix disk and filesystem corruption before proceeding with system file repairs
|
||||
Invoke-Chkdsk
|
||||
Write-Progress -Id 0 -Activity "Repairing Windows" -PercentComplete 25
|
||||
try {
|
||||
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo"
|
||||
|
||||
# Step 2: Run SFC to fix system file corruption and ensure DISM can operate correctly
|
||||
Invoke-SFC
|
||||
Write-Progress -Id 0 -Activity "Repairing Windows" -PercentComplete 50
|
||||
$childProgressBarActivity = "Scanning for corruption"
|
||||
Write-Progress -Id 0 -Activity "Repairing Windows" -PercentComplete 0
|
||||
# Step 1: Run chkdsk to fix disk and filesystem corruption before proceeding with system file repairs
|
||||
Invoke-Chkdsk
|
||||
Write-Progress -Id 0 -Activity "Repairing Windows" -PercentComplete 25
|
||||
|
||||
# Step 3: Run DISM to repair the system image, which SFC relies on for accurate repairs
|
||||
Invoke-DISM
|
||||
Write-Progress -Id 0 -Activity "Repairing Windows" -PercentComplete 75
|
||||
# Step 2: Run SFC to fix system file corruption and ensure DISM can operate correctly
|
||||
Invoke-SFC
|
||||
Write-Progress -Id 0 -Activity "Repairing Windows" -PercentComplete 50
|
||||
|
||||
# Step 3: Run DISM to repair the system image, which SFC relies on for accurate repairs
|
||||
Invoke-DISM
|
||||
Write-Progress -Id 0 -Activity "Repairing Windows" -PercentComplete 75
|
||||
|
||||
# Step 4: Run SFC again to ensure system files are repaired using the now-fixed system image
|
||||
Invoke-SFC
|
||||
Write-Progress -Id 0 -Activity "Repairing Windows" -PercentComplete 100 -Completed
|
||||
|
||||
Set-WinUtilTaskbaritem -state "None" -overlay "checkmark"
|
||||
} catch {
|
||||
Write-Error "An error occurred while repairing the system: $_"
|
||||
Set-WinUtilTaskbaritem -state "Error" -overlay "warning"
|
||||
} finally {
|
||||
Write-Host "==> Finished System Repair"
|
||||
Set-WinUtilTaskbaritem -state "None" -overlay "checkmark"
|
||||
}
|
||||
|
||||
# Step 4: Run SFC again to ensure system files are repaired using the now-fixed system image
|
||||
Invoke-SFC
|
||||
Write-Progress -Id 0 -Activity "Repairing Windows" -PercentComplete 100 -Completed
|
||||
}
|
||||
|
@ -8,65 +8,74 @@ Function Invoke-WPFUltimatePerformance {
|
||||
Specifies whether to "Enable" or "Disable" the Ultimate Performance power scheme.
|
||||
|
||||
#>
|
||||
param($State)
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[ValidateSet("Enable", "Disable")]
|
||||
[string]$State
|
||||
)
|
||||
|
||||
try {
|
||||
# GUID of the Ultimate Performance power plan
|
||||
$ultimateGUID = "e9a42b02-d5df-448d-aa00-03f14749eb61"
|
||||
|
||||
if ($State -eq "Enable") {
|
||||
# Duplicate the Ultimate Performance power plan using its GUID
|
||||
$duplicateOutput = powercfg /duplicatescheme $ultimateGUID
|
||||
switch ($State) {
|
||||
"Enable" {
|
||||
# Duplicate the Ultimate Performance power plan using its GUID
|
||||
$duplicateOutput = powercfg /duplicatescheme $ultimateGUID
|
||||
|
||||
$guid = $null
|
||||
$nameFromFile = "ChrisTitus - Ultimate Power Plan"
|
||||
$description = "Ultimate Power Plan, added via WinUtils"
|
||||
$guid = $null
|
||||
$nameFromFile = "ChrisTitus - Ultimate Power Plan"
|
||||
$description = "Ultimate Power Plan, added via WinUtils"
|
||||
|
||||
# Extract the new GUID from the duplicateOutput
|
||||
foreach ($line in $duplicateOutput) {
|
||||
if ($line -match "\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b") {
|
||||
$guid = $matches[0] # $matches[0] will contain the first match, which is the GUID
|
||||
Write-Output "GUID: $guid has been extracted and stored in the variable."
|
||||
break
|
||||
# Extract the new GUID from the duplicateOutput
|
||||
foreach ($line in $duplicateOutput) {
|
||||
if ($line -match "\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b") {
|
||||
$guid = $matches[0] # $matches[0] will contain the first match, which is the GUID
|
||||
Write-Output "GUID: $guid has been extracted and stored in the variable."
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $guid) {
|
||||
Write-Output "No GUID found in the duplicateOutput. Check the output format."
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Change the name of the power plan and set its description
|
||||
$changeNameOutput = powercfg /changename $guid "$nameFromFile" "$description"
|
||||
Write-Output "The power plan name and description have been changed. Output:"
|
||||
Write-Output $changeNameOutput
|
||||
|
||||
# Set the duplicated Ultimate Performance plan as active
|
||||
$setActiveOutput = powercfg /setactive $guid
|
||||
Write-Output "The power plan has been set as active. Output:"
|
||||
Write-Output $setActiveOutput
|
||||
|
||||
Write-Host "> Ultimate Performance plan installed and set as active."
|
||||
}
|
||||
"Disable" {
|
||||
# Check if the Ultimate Performance plan is installed by GUID
|
||||
$installedPlan = powercfg -list | Select-String -Pattern "ChrisTitus - Ultimate Power Plan"
|
||||
|
||||
if ($installedPlan) {
|
||||
# Extract the GUID of the installed Ultimate Performance plan
|
||||
$ultimatePlanGUID = $installedPlan.Line.Split()[3]
|
||||
|
||||
# Set a different power plan as active before deleting the Ultimate Performance plan
|
||||
$balancedPlanGUID = "381b4222-f694-41f0-9685-ff5bb260df2e"
|
||||
powercfg -setactive $balancedPlanGUID
|
||||
|
||||
# Delete the Ultimate Performance plan by GUID
|
||||
powercfg -delete $ultimatePlanGUID
|
||||
|
||||
Write-Host "Ultimate Performance plan has been uninstalled."
|
||||
Write-Host "> Balanced plan is now active."
|
||||
} else {
|
||||
Write-Host "Ultimate Performance plan is not installed."
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $guid) {
|
||||
Write-Output "No GUID found in the duplicateOutput. Check the output format."
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Change the name of the power plan and set its description
|
||||
$changeNameOutput = powercfg /changename $guid "$nameFromFile" "$description"
|
||||
Write-Output "The power plan name and description have been changed. Output:"
|
||||
Write-Output $changeNameOutput
|
||||
|
||||
# Set the duplicated Ultimate Performance plan as active
|
||||
$setActiveOutput = powercfg /setactive $guid
|
||||
Write-Output "The power plan has been set as active. Output:"
|
||||
Write-Output $setActiveOutput
|
||||
|
||||
Write-Host "> Ultimate Performance plan installed and set as active."
|
||||
|
||||
} elseif ($State -eq "Disable") {
|
||||
# Check if the Ultimate Performance plan is installed by GUID
|
||||
$installedPlan = (powercfg -list | Select-String -Pattern "ChrisTitus - Ultimate Power Plan").Line.Split()[3]
|
||||
|
||||
if ($installedPlan) {
|
||||
# Extract the GUID of the installed Ultimate Performance plan
|
||||
$ultimatePlanGUID = $installedPlan.Line.Split()[3]
|
||||
|
||||
# Set a different power plan as active before deleting the Ultimate Performance plan
|
||||
$balancedPlanGUID = 381b4222-f694-41f0-9685-ff5bb260df2e
|
||||
powercfg -setactive $balancedPlanGUID
|
||||
|
||||
# Delete the Ultimate Performance plan by GUID
|
||||
powercfg -delete $ultimatePlanGUID
|
||||
|
||||
Write-Host "Ultimate Performance plan has been uninstalled."
|
||||
Write-Host "> Balanced plan is now active."
|
||||
} else {
|
||||
Write-Host "Ultimate Performance plan is not installed."
|
||||
default {
|
||||
Write-Host "Invalid state. Please use 'Enable' or 'Disable'."
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
|
@ -41,6 +41,7 @@ function Invoke-WPFUnInstall {
|
||||
|
||||
try {
|
||||
$sync.ProcessRunning = $true
|
||||
Show-WPFInstallAppBusy -text "Uninstalling apps..."
|
||||
|
||||
# Uninstall all selected programs in new window
|
||||
if($packagesWinget.Count -gt 0) {
|
||||
@ -49,7 +50,7 @@ function Invoke-WPFUnInstall {
|
||||
if($packagesChoco.Count -gt 0) {
|
||||
Install-WinUtilProgramChoco -Action Uninstall -Programs $packagesChoco
|
||||
}
|
||||
|
||||
Hide-WPFInstallAppBusy
|
||||
Write-Host "==========================================="
|
||||
Write-Host "-- Uninstalls have finished ---"
|
||||
Write-Host "==========================================="
|
||||
|
@ -5,6 +5,9 @@ function Invoke-WPFUpdatesdefault {
|
||||
Resets Windows Update settings to default
|
||||
|
||||
#>
|
||||
|
||||
Write-Host "Restoring Windows Update registry settings..." -ForegroundColor Yellow
|
||||
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force | Out-Null
|
||||
}
|
||||
@ -15,17 +18,99 @@ function Invoke-WPFUpdatesdefault {
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -Type DWord -Value 1
|
||||
|
||||
# Reset WaaSMedicSvc registry settings to defaults
|
||||
Write-Host "Restoring WaaSMedicSvc settings..." -ForegroundColor Yellow
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WaaSMedicSvc" -Name "Start" -Type DWord -Value 3 -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WaaSMedicSvc" -Name "FailureActions" -ErrorAction SilentlyContinue
|
||||
|
||||
# Restore update services to their default state
|
||||
Write-Host "Restoring update services..." -ForegroundColor Yellow
|
||||
|
||||
$services = @(
|
||||
"BITS"
|
||||
"wuauserv"
|
||||
@{Name = "BITS"; StartupType = "Manual"},
|
||||
@{Name = "wuauserv"; StartupType = "Manual"},
|
||||
@{Name = "UsoSvc"; StartupType = "Automatic"},
|
||||
@{Name = "uhssvc"; StartupType = "Disabled"},
|
||||
@{Name = "WaaSMedicSvc"; StartupType = "Manual"}
|
||||
)
|
||||
|
||||
foreach ($service in $services) {
|
||||
# -ErrorAction SilentlyContinue is so it doesn't write an error to stdout if a service doesn't exist
|
||||
|
||||
Write-Host "Setting $service StartupType to Automatic"
|
||||
Get-Service -Name $service -ErrorAction SilentlyContinue | Set-Service -StartupType Automatic
|
||||
try {
|
||||
Write-Host "Restoring $($service.Name) to $($service.StartupType)..."
|
||||
$serviceObj = Get-Service -Name $service.Name -ErrorAction SilentlyContinue
|
||||
if ($serviceObj) {
|
||||
Set-Service -Name $service.Name -StartupType $service.StartupType -ErrorAction SilentlyContinue
|
||||
|
||||
# Reset failure actions to default using sc command
|
||||
Start-Process -FilePath "sc.exe" -ArgumentList "failure `"$($service.Name)`" reset= 86400 actions= restart/60000/restart/60000/restart/60000" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
|
||||
|
||||
# Start the service if it should be running
|
||||
if ($service.StartupType -eq "Automatic") {
|
||||
Start-Service -Name $service.Name -ErrorAction SilentlyContinue
|
||||
}
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host "Warning: Could not restore service $($service.Name) - $($_.Exception.Message)" -ForegroundColor Yellow
|
||||
}
|
||||
}
|
||||
|
||||
# Restore renamed DLLs if they exist
|
||||
Write-Host "Restoring renamed update service DLLs..." -ForegroundColor Yellow
|
||||
|
||||
$dlls = @("WaaSMedicSvc", "wuaueng")
|
||||
|
||||
foreach ($dll in $dlls) {
|
||||
$dllPath = "C:\Windows\System32\$dll.dll"
|
||||
$backupPath = "C:\Windows\System32\${dll}_BAK.dll"
|
||||
|
||||
if ((Test-Path $backupPath) -and !(Test-Path $dllPath)) {
|
||||
try {
|
||||
# Take ownership of backup file
|
||||
Start-Process -FilePath "takeown.exe" -ArgumentList "/f `"$backupPath`"" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
|
||||
|
||||
# Grant full control to everyone
|
||||
Start-Process -FilePath "icacls.exe" -ArgumentList "`"$backupPath`" /grant *S-1-1-0:F" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
|
||||
|
||||
# Rename back to original
|
||||
Rename-Item -Path $backupPath -NewName "$dll.dll" -ErrorAction SilentlyContinue
|
||||
Write-Host "Restored ${dll}_BAK.dll to $dll.dll"
|
||||
|
||||
# Restore ownership to TrustedInstaller
|
||||
Start-Process -FilePath "icacls.exe" -ArgumentList "`"$dllPath`" /setowner `"NT SERVICE\TrustedInstaller`"" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
|
||||
Start-Process -FilePath "icacls.exe" -ArgumentList "`"$dllPath`" /remove *S-1-1-0" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
|
||||
}
|
||||
catch {
|
||||
Write-Host "Warning: Could not restore $dll.dll - $($_.Exception.Message)" -ForegroundColor Yellow
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Enable update related scheduled tasks
|
||||
Write-Host "Enabling update related scheduled tasks..." -ForegroundColor Yellow
|
||||
|
||||
$taskPaths = @(
|
||||
'\Microsoft\Windows\InstallService\*'
|
||||
'\Microsoft\Windows\UpdateOrchestrator\*'
|
||||
'\Microsoft\Windows\UpdateAssistant\*'
|
||||
'\Microsoft\Windows\WaaSMedic\*'
|
||||
'\Microsoft\Windows\WindowsUpdate\*'
|
||||
'\Microsoft\WindowsUpdate\*'
|
||||
)
|
||||
|
||||
foreach ($taskPath in $taskPaths) {
|
||||
try {
|
||||
$tasks = Get-ScheduledTask -TaskPath $taskPath -ErrorAction SilentlyContinue
|
||||
foreach ($task in $tasks) {
|
||||
Enable-ScheduledTask -TaskName $task.TaskName -TaskPath $task.TaskPath -ErrorAction SilentlyContinue
|
||||
Write-Host "Enabled task: $($task.TaskName)"
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host "Warning: Could not enable tasks in path $taskPath - $($_.Exception.Message)" -ForegroundColor Yellow
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "Enabling driver offering through Windows Update..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata" -Name "PreventDeviceMetadataFromNetwork" -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontPromptForWindowsUpdate" -ErrorAction SilentlyContinue
|
||||
@ -39,6 +124,7 @@ function Invoke-WPFUpdatesdefault {
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "BranchReadinessLevel" -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferFeatureUpdatesPeriodInDays" -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferQualityUpdatesPeriodInDays" -ErrorAction SilentlyContinue
|
||||
|
||||
Write-Host "==================================================="
|
||||
Write-Host "--- Windows Update Settings Reset to Default ---"
|
||||
Write-Host "==================================================="
|
||||
@ -62,4 +148,6 @@ function Invoke-WPFUpdatesdefault {
|
||||
Write-Host "==================================================="
|
||||
Write-Host "--- Windows Local Policies Reset to Default ---"
|
||||
Write-Host "==================================================="
|
||||
|
||||
Write-Host "Note: A system restart may be required for all changes to take full effect." -ForegroundColor Yellow
|
||||
}
|
||||
|
@ -6,30 +6,130 @@ function Invoke-WPFUpdatesdisable {
|
||||
|
||||
.NOTES
|
||||
Disabling Windows Update is not recommended. This is only for advanced users who know what they are doing.
|
||||
This function requires administrator privileges and will attempt to run as SYSTEM for certain operations.
|
||||
|
||||
#>
|
||||
|
||||
Write-Host "Configuring registry settings..." -ForegroundColor Yellow
|
||||
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoUpdate" -Type DWord -Value 1
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUOptions" -Type DWord -Value 1
|
||||
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -Type DWord -Value 0
|
||||
|
||||
# Additional registry settings
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WaaSMedicSvc" -Name "Start" -Type DWord -Value 4 -ErrorAction SilentlyContinue
|
||||
$failureActions = [byte[]](0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xd4,0x01,0x00,0x00,0x00,0x00,0x00,0xe0,0x93,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00)
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WaaSMedicSvc" -Name "FailureActions" -Type Binary -Value $failureActions -ErrorAction SilentlyContinue
|
||||
|
||||
# Disable and stop update related services
|
||||
Write-Host "Disabling update services..." -ForegroundColor Yellow
|
||||
|
||||
$services = @(
|
||||
"BITS"
|
||||
"wuauserv"
|
||||
"UsoSvc"
|
||||
"uhssvc"
|
||||
"WaaSMedicSvc"
|
||||
)
|
||||
|
||||
foreach ($service in $services) {
|
||||
# -ErrorAction SilentlyContinue is so it doesn't write an error to stdout if a service doesn't exist
|
||||
|
||||
Write-Host "Setting $service StartupType to Disabled"
|
||||
Get-Service -Name $service -ErrorAction SilentlyContinue | Set-Service -StartupType Disabled
|
||||
try {
|
||||
Write-Host "Stopping and disabling $service..."
|
||||
$serviceObj = Get-Service -Name $service -ErrorAction SilentlyContinue
|
||||
if ($serviceObj) {
|
||||
Stop-Service -Name $service -Force -ErrorAction SilentlyContinue
|
||||
Set-Service -Name $service -StartupType Disabled -ErrorAction SilentlyContinue
|
||||
|
||||
# Set failure actions to nothing using sc command
|
||||
Start-Process -FilePath "sc.exe" -ArgumentList "failure `"$service`" reset= 0 actions= `"`"" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host "Warning: Could not process service $service - $($_.Exception.Message)" -ForegroundColor Yellow
|
||||
}
|
||||
}
|
||||
Write-Host "================================="
|
||||
Write-Host "--- Updates ARE DISABLED ---"
|
||||
Write-Host "================================="
|
||||
|
||||
# Rename critical update service DLLs (requires SYSTEM privileges)
|
||||
Write-Host "Attempting to rename critical update service DLLs..." -ForegroundColor Yellow
|
||||
|
||||
$dlls = @("WaaSMedicSvc", "wuaueng")
|
||||
|
||||
foreach ($dll in $dlls) {
|
||||
$dllPath = "C:\Windows\System32\$dll.dll"
|
||||
$backupPath = "C:\Windows\System32\${dll}_BAK.dll"
|
||||
|
||||
if (Test-Path $dllPath) {
|
||||
try {
|
||||
# Take ownership
|
||||
Start-Process -FilePath "takeown.exe" -ArgumentList "/f `"$dllPath`"" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
|
||||
|
||||
# Grant full control to everyone
|
||||
Start-Process -FilePath "icacls.exe" -ArgumentList "`"$dllPath`" /grant *S-1-1-0:F" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
|
||||
|
||||
# Rename file
|
||||
if (!(Test-Path $backupPath)) {
|
||||
Rename-Item -Path $dllPath -NewName "${dll}_BAK.dll" -ErrorAction SilentlyContinue
|
||||
Write-Host "Renamed $dll.dll to ${dll}_BAK.dll"
|
||||
|
||||
# Restore ownership to TrustedInstaller
|
||||
Start-Process -FilePath "icacls.exe" -ArgumentList "`"$backupPath`" /setowner `"NT SERVICE\TrustedInstaller`"" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
|
||||
Start-Process -FilePath "icacls.exe" -ArgumentList "`"$backupPath`" /remove *S-1-1-0" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host "Warning: Could not rename $dll.dll - $($_.Exception.Message)" -ForegroundColor Yellow
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Delete downloaded update files
|
||||
Write-Host "Cleaning up downloaded update files..." -ForegroundColor Yellow
|
||||
|
||||
try {
|
||||
$softwareDistPath = "C:\Windows\SoftwareDistribution"
|
||||
if (Test-Path $softwareDistPath) {
|
||||
Get-ChildItem -Path $softwareDistPath -Recurse -Force | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue
|
||||
Write-Host "Cleared SoftwareDistribution folder"
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host "Warning: Could not fully clear SoftwareDistribution folder - $($_.Exception.Message)" -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
# Disable update related scheduled tasks
|
||||
Write-Host "Disabling update related scheduled tasks..." -ForegroundColor Yellow
|
||||
|
||||
$taskPaths = @(
|
||||
'\Microsoft\Windows\InstallService\*'
|
||||
'\Microsoft\Windows\UpdateOrchestrator\*'
|
||||
'\Microsoft\Windows\UpdateAssistant\*'
|
||||
'\Microsoft\Windows\WaaSMedic\*'
|
||||
'\Microsoft\Windows\WindowsUpdate\*'
|
||||
'\Microsoft\WindowsUpdate\*'
|
||||
)
|
||||
|
||||
foreach ($taskPath in $taskPaths) {
|
||||
try {
|
||||
$tasks = Get-ScheduledTask -TaskPath $taskPath -ErrorAction SilentlyContinue
|
||||
foreach ($task in $tasks) {
|
||||
Disable-ScheduledTask -TaskName $task.TaskName -TaskPath $task.TaskPath -ErrorAction SilentlyContinue
|
||||
Write-Host "Disabled task: $($task.TaskName)"
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host "Warning: Could not disable tasks in path $taskPath - $($_.Exception.Message)" -ForegroundColor Yellow
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "=================================" -ForegroundColor Green
|
||||
Write-Host "--- Updates ARE DISABLED ---" -ForegroundColor Green
|
||||
Write-Host "===================================" -ForegroundColor Green
|
||||
Write-Host "Note: Some operations may require a system restart to take full effect." -ForegroundColor Yellow
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ $commonKeyEvents = {
|
||||
$sync["Form"].Add_PreViewKeyDown($commonKeyEvents)
|
||||
|
||||
$sync["Form"].Add_MouseLeftButtonDown({
|
||||
Invoke-WPFPopup -Action "Hide" -Popups @("Settings", "Theme")
|
||||
Invoke-WPFPopup -Action "Hide" -Popups @("Settings", "Theme", "FontScaling")
|
||||
$sync["Form"].DragMove()
|
||||
})
|
||||
|
||||
@ -279,7 +279,7 @@ $sync["Form"].Add_MouseDoubleClick({
|
||||
|
||||
$sync["Form"].Add_Deactivated({
|
||||
Write-Debug "WinUtil lost focus"
|
||||
Invoke-WPFPopup -Action "Hide" -Popups @("Settings", "Theme")
|
||||
Invoke-WPFPopup -Action "Hide" -Popups @("Settings", "Theme", "FontScaling")
|
||||
})
|
||||
|
||||
$sync["Form"].Add_ContentRendered({
|
||||
@ -315,33 +315,40 @@ $sync["Form"].Add_ContentRendered({
|
||||
|
||||
# maybe this is not the best place to load and execute config file?
|
||||
# maybe community can help?
|
||||
if ($PARAM_CONFIG) {
|
||||
if ($PARAM_CONFIG -and -not [string]::IsNullOrWhiteSpace($PARAM_CONFIG)) {
|
||||
Invoke-WPFImpex -type "import" -Config $PARAM_CONFIG
|
||||
if ($PARAM_RUN) {
|
||||
# Wait for any existing process to complete before starting
|
||||
while ($sync.ProcessRunning) {
|
||||
Start-Sleep -Seconds 5
|
||||
}
|
||||
Start-Sleep -Seconds 5
|
||||
|
||||
Write-Host "Applying tweaks..."
|
||||
Invoke-WPFtweaksbutton
|
||||
while ($sync.ProcessRunning) {
|
||||
Start-Sleep -Seconds 5
|
||||
if (-not $sync.ProcessRunning) {
|
||||
Invoke-WPFtweaksbutton
|
||||
while ($sync.ProcessRunning) {
|
||||
Start-Sleep -Seconds 5
|
||||
}
|
||||
}
|
||||
Start-Sleep -Seconds 5
|
||||
|
||||
Write-Host "Installing features..."
|
||||
Invoke-WPFFeatureInstall
|
||||
while ($sync.ProcessRunning) {
|
||||
Start-Sleep -Seconds 5
|
||||
if (-not $sync.ProcessRunning) {
|
||||
Invoke-WPFFeatureInstall
|
||||
while ($sync.ProcessRunning) {
|
||||
Start-Sleep -Seconds 5
|
||||
}
|
||||
}
|
||||
|
||||
Start-Sleep -Seconds 5
|
||||
|
||||
Write-Host "Installing applications..."
|
||||
while ($sync.ProcessRunning) {
|
||||
Start-Sleep -Seconds 1
|
||||
if (-not $sync.ProcessRunning) {
|
||||
Invoke-WPFInstall
|
||||
while ($sync.ProcessRunning) {
|
||||
Start-Sleep -Seconds 1
|
||||
}
|
||||
}
|
||||
Invoke-WPFInstall
|
||||
Start-Sleep -Seconds 5
|
||||
|
||||
Write-Host "Done."
|
||||
@ -441,7 +448,7 @@ $sync["Form"].Add_Activated({
|
||||
|
||||
$sync["ThemeButton"].Add_Click({
|
||||
Write-Debug "ThemeButton clicked"
|
||||
Invoke-WPFPopup -PopupActionTable @{ "Settings" = "Hide"; "Theme" = "Toggle" }
|
||||
Invoke-WPFPopup -PopupActionTable @{ "Settings" = "Hide"; "Theme" = "Toggle"; "FontScaling" = "Hide" }
|
||||
})
|
||||
$sync["AutoThemeMenuItem"].Add_Click({
|
||||
Write-Debug "About clicked"
|
||||
@ -461,7 +468,7 @@ $sync["LightThemeMenuItem"].Add_Click({
|
||||
|
||||
$sync["SettingsButton"].Add_Click({
|
||||
Write-Debug "SettingsButton clicked"
|
||||
Invoke-WPFPopup -PopupActionTable @{ "Settings" = "Toggle"; "Theme" = "Hide" }
|
||||
Invoke-WPFPopup -PopupActionTable @{ "Settings" = "Toggle"; "Theme" = "Hide"; "FontScaling" = "Hide" }
|
||||
})
|
||||
$sync["ImportMenuItem"].Add_Click({
|
||||
Write-Debug "Import clicked"
|
||||
@ -481,7 +488,7 @@ $sync["AboutMenuItem"].Add_Click({
|
||||
Author : <a href="https://github.com/ChrisTitusTech">@christitustech</a>
|
||||
UI : <a href="https://github.com/MyDrift-user">@MyDrift-user</a>, <a href="https://github.com/Marterich">@Marterich</a>
|
||||
Runspace : <a href="https://github.com/DeveloperDurp">@DeveloperDurp</a>, <a href="https://github.com/Marterich">@Marterich</a>
|
||||
MicroWin : <a href="https://github.com/KonTy">@KonTy</a>, <a href="https://github.com/CodingWonders">@CodingWonders</a>
|
||||
MicroWin : <a href="https://github.com/KonTy">@KonTy</a>, <a href="https://github.com/CodingWonders">@CodingWonders</a>, <a href="https://github.com/Real-MullaC">@Real-MullaC</a>
|
||||
GitHub : <a href="https://github.com/ChrisTitusTech/winutil">ChrisTitusTech/winutil</a>
|
||||
Version : <a href="https://github.com/ChrisTitusTech/winutil/releases/tag/$($sync.version)">$($sync.version)</a>
|
||||
"@
|
||||
@ -506,5 +513,30 @@ $sync["SponsorMenuItem"].Add_Click({
|
||||
Show-CustomDialog -Title "Sponsors" -Message $authorInfo -EnableScroll $true
|
||||
})
|
||||
|
||||
# Font Scaling Event Handlers
|
||||
$sync["FontScalingButton"].Add_Click({
|
||||
Write-Debug "FontScalingButton clicked"
|
||||
Invoke-WPFPopup -PopupActionTable @{ "Settings" = "Hide"; "Theme" = "Hide"; "FontScaling" = "Toggle" }
|
||||
})
|
||||
|
||||
$sync["FontScalingSlider"].Add_ValueChanged({
|
||||
param($slider)
|
||||
$percentage = [math]::Round($slider.Value * 100)
|
||||
$sync.FontScalingValue.Text = "$percentage%"
|
||||
})
|
||||
|
||||
$sync["FontScalingResetButton"].Add_Click({
|
||||
Write-Debug "FontScalingResetButton clicked"
|
||||
$sync.FontScalingSlider.Value = 1.0
|
||||
$sync.FontScalingValue.Text = "100%"
|
||||
})
|
||||
|
||||
$sync["FontScalingApplyButton"].Add_Click({
|
||||
Write-Debug "FontScalingApplyButton clicked"
|
||||
$scaleFactor = $sync.FontScalingSlider.Value
|
||||
Invoke-WinUtilFontScaling -ScaleFactor $scaleFactor
|
||||
Invoke-WPFPopup -Action "Hide" -Popups @("FontScaling")
|
||||
})
|
||||
|
||||
$sync["Form"].ShowDialog() | out-null
|
||||
Stop-Transcript
|
||||
|
@ -801,6 +801,7 @@
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="CaretBrush" Value="{DynamicResource MainForegroundColor}"/>
|
||||
<Setter Property="ContextMenu">
|
||||
<Setter.Value>
|
||||
<ContextMenu>
|
||||
@ -855,6 +856,7 @@
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="CaretBrush" Value="{DynamicResource MainForegroundColor}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="PasswordBox">
|
||||
@ -946,6 +948,7 @@
|
||||
<ColumnDefinition Width="Auto"/><!-- Space for close button -->
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/><!-- Space for Font Scaling button-->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--
|
||||
@ -992,34 +995,6 @@
|
||||
Margin="210,0,0,0" Visibility="Collapsed">
|
||||
</Button>
|
||||
|
||||
<ProgressBar
|
||||
Grid.Column="1"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
Width="250"
|
||||
Height="{DynamicResource SearchBarHeight}"
|
||||
Foreground="{DynamicResource ProgressBarForegroundColor}" Background="{DynamicResource ProgressBarBackgroundColor}" BorderBrush="{DynamicResource ProgressBarForegroundColor}"
|
||||
Visibility="Collapsed"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
Margin="2,0,0,0" BorderThickness="1" Padding="6,2,2,2"
|
||||
Name="ProgressBar">
|
||||
</ProgressBar>
|
||||
<Label
|
||||
Grid.Column="1"
|
||||
Width="250"
|
||||
Height="{DynamicResource SearchBarHeight}"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
FontSize="{DynamicResource SearchBarTextBoxFontSize}"
|
||||
Background="Transparent"
|
||||
Visibility="Collapsed"
|
||||
Margin="2,0,0,0" BorderThickness="0" Padding="6,2,2,2"
|
||||
Name="ProgressBarLabel">
|
||||
<TextBlock
|
||||
TextTrimming="CharacterEllipsis"
|
||||
Background="Transparent"
|
||||
Foreground="{DynamicResource ProgressBarTextColor}">
|
||||
</TextBlock>
|
||||
</Label>
|
||||
<Button Name="ThemeButton"
|
||||
Style="{StaticResource HoverButtonStyle}"
|
||||
Grid.Column="2" BorderBrush="Transparent"
|
||||
@ -1058,7 +1033,7 @@
|
||||
</Border>
|
||||
</Popup>
|
||||
|
||||
<Button Name="SettingsButton"
|
||||
<Button Name="FontScalingButton"
|
||||
Style="{StaticResource HoverButtonStyle}"
|
||||
Grid.Column="3" BorderBrush="Transparent"
|
||||
Background="{DynamicResource MainBackgroundColor}"
|
||||
@ -1066,6 +1041,74 @@
|
||||
FontSize="{DynamicResource SettingsIconFontSize}"
|
||||
Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||
Margin="0,5,5,0"
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
Content=""
|
||||
ToolTip="Adjust Font Scaling for Accessibility"
|
||||
/>
|
||||
<Popup Grid.Column="3" Name="FontScalingPopup"
|
||||
IsOpen="False"
|
||||
PlacementTarget="{Binding ElementName=FontScalingButton}" Placement="Bottom"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Top">
|
||||
<Border Background="{DynamicResource MainBackgroundColor}" BorderBrush="{DynamicResource MainForegroundColor}" BorderThickness="1" CornerRadius="0" Margin="0">
|
||||
<StackPanel Background="{DynamicResource MainBackgroundColor}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MinWidth="200">
|
||||
<TextBlock Text="Font Scaling"
|
||||
FontSize="{DynamicResource ButtonFontSize}"
|
||||
Foreground="{DynamicResource MainForegroundColor}"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="10,5,10,5"
|
||||
FontWeight="Bold"/>
|
||||
<Separator Margin="5,0,5,5"/>
|
||||
<StackPanel Orientation="Horizontal" Margin="10,5,10,10">
|
||||
<TextBlock Text="Small"
|
||||
FontSize="{DynamicResource ButtonFontSize}"
|
||||
Foreground="{DynamicResource MainForegroundColor}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,10,0"/>
|
||||
<Slider Name="FontScalingSlider"
|
||||
Minimum="0.75" Maximum="2.0"
|
||||
Value="1.0"
|
||||
TickFrequency="0.25"
|
||||
TickPlacement="BottomRight"
|
||||
IsSnapToTickEnabled="True"
|
||||
Width="120"
|
||||
VerticalAlignment="Center"/>
|
||||
<TextBlock Text="Large"
|
||||
FontSize="{DynamicResource ButtonFontSize}"
|
||||
Foreground="{DynamicResource MainForegroundColor}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="10,0,0,0"/>
|
||||
</StackPanel>
|
||||
<TextBlock Name="FontScalingValue"
|
||||
Text="100%"
|
||||
FontSize="{DynamicResource ButtonFontSize}"
|
||||
Foreground="{DynamicResource MainForegroundColor}"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="10,0,10,5"/>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="10,0,10,10">
|
||||
<Button Name="FontScalingResetButton"
|
||||
Content="Reset"
|
||||
Style="{StaticResource HoverButtonStyle}"
|
||||
Width="60" Height="25"
|
||||
Margin="5,0,5,0"/>
|
||||
<Button Name="FontScalingApplyButton"
|
||||
Content="Apply"
|
||||
Style="{StaticResource HoverButtonStyle}"
|
||||
Width="60" Height="25"
|
||||
Margin="5,0,5,0"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Popup>
|
||||
|
||||
<Button Name="SettingsButton"
|
||||
Style="{StaticResource HoverButtonStyle}"
|
||||
Grid.Column="4" BorderBrush="Transparent"
|
||||
Background="{DynamicResource MainBackgroundColor}"
|
||||
Foreground="{DynamicResource MainForegroundColor}"
|
||||
FontSize="{DynamicResource SettingsIconFontSize}"
|
||||
Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||
Margin="5,5,5,0"
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
Content=""/>
|
||||
@ -1093,7 +1136,7 @@
|
||||
</Popup>
|
||||
|
||||
<Button
|
||||
Grid.Column="4"
|
||||
Grid.Column="5"
|
||||
Content="×" BorderThickness="0"
|
||||
BorderBrush="Transparent"
|
||||
Background="{DynamicResource MainBackgroundColor}"
|
||||
@ -1287,7 +1330,7 @@
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalAlignment="Stretch">
|
||||
<StackPanel Name="MicrowinMain" Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Column="0" Grid.Row="0">
|
||||
<StackPanel Background="Transparent" SnapsToDevicePixels="True" Margin="1">
|
||||
<StackPanel Name="MicrowinISOPanel" Background="Transparent" SnapsToDevicePixels="True" Margin="1">
|
||||
<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}">
|
||||
Choose a Windows ISO file that you've downloaded <LineBreak/>
|
||||
@ -1342,8 +1385,46 @@
|
||||
</Button.Content>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Visibility="Hidden" -->
|
||||
<StackPanel Name="MicrowinOptionsPanel" HorizontalAlignment="Left" SnapsToDevicePixels="True" Margin="1" Visibility="Hidden">
|
||||
<Grid Margin="0,0,0,10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="WPFMicrowinPanelBack"
|
||||
Grid.Column="0"
|
||||
Width="30" Height="30"
|
||||
HorizontalAlignment="Left"
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
FontSize="12"
|
||||
Content=""
|
||||
ToolTip="Back to main view"
|
||||
Background="{DynamicResource ButtonBackgroundColor}"
|
||||
Foreground="{DynamicResource ButtonForegroundColor}"
|
||||
BorderBrush="{DynamicResource ButtonBackgroundColor}"
|
||||
BorderThickness="1"
|
||||
Padding="0">
|
||||
<Button.ContentTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</DataTemplate>
|
||||
</Button.ContentTemplate>
|
||||
</Button>
|
||||
|
||||
<TextBlock Name="MicrowinPanel2Title"
|
||||
Grid.Column="1"
|
||||
Text="Configure Windows ISO"
|
||||
Margin="10,0,0,0"
|
||||
Foreground="{DynamicResource MainForegroundColor}"
|
||||
FontSize="16"
|
||||
VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">Choose Windows SKU</TextBlock>
|
||||
<ComboBox x:Name = "MicrowinWindowsFlavors" Margin="1" />
|
||||
<Rectangle Fill="{DynamicResource MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
||||
@ -1371,13 +1452,44 @@
|
||||
Foreground="{DynamicResource LabelboxForegroundColor}"
|
||||
MaxLength="20"
|
||||
/>
|
||||
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">Password (characters will not be shown for your security):</TextBlock>
|
||||
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">Password:</TextBlock>
|
||||
<PasswordBox Name="MicrowinUserPassword" Background="Transparent" BorderThickness="1" BorderBrush="{DynamicResource MainForegroundColor}"
|
||||
Margin="6"
|
||||
PasswordChar="*"
|
||||
Foreground="{DynamicResource LabelboxForegroundColor}"
|
||||
/>
|
||||
<Rectangle Fill="{DynamicResource MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
||||
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap"><Bold>Tweaks (leave empty for default settings)</Bold></TextBlock>
|
||||
<CheckBox Name="MicroWinWPBT" Margin="{DynamicResource MicrowinCheckBoxMargin}" IsChecked="False" ToolTip="If enabled then allows your computer vendor to execute a program each time it boots. It enables computer vendors to force install anti-theft software, software drivers, or a software program conveniently. This could also be a security risk."><AccessText TextWrapping="Wrap" Text="Disable Windows Platform Binary Table (WPBT) (ADVANCED TWEAK)" /></CheckBox>
|
||||
<CheckBox Name="MicroWinUnsupported" Margin="{DynamicResource MicrowinCheckBoxMargin}" IsChecked="False" ToolTip="If enabled then it will allow you to upgrade your PC to Windows 11 if your PC does not support Windows 11 yet. This is good for if you do not have a USB and want to upgrade to Windows 11 on unsupported hardware."><AccessText TextWrapping="Wrap" Text="Allow this PC to upgrade to Windows 11" /></CheckBox>
|
||||
<CheckBox Name="MicroWinESD" Margin="{DynamicResource MicrowinCheckBoxMargin}" IsChecked="False" ToolTip="The ESD file format compresses the installation image even further, therefore reducing ISO file sizes a little more. Select this if you have a small USB."><AccessText TextWrapping="Wrap" Text="Convert this image to ESD (This will take longer)" /></CheckBox>
|
||||
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">WinUtil configuration file (JSON)</TextBlock>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" /> <!-- Takes the remaining space -->
|
||||
<ColumnDefinition Width="32" /> <!-- Fixed width for Button -->
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox Name="MicrowinAutoConfigBox" Background="Transparent" BorderBrush="{DynamicResource MainForegroundColor}"
|
||||
Text=""
|
||||
Margin="2"
|
||||
IsReadOnly="False"
|
||||
Grid.Column="0"
|
||||
ToolTip="Path of your configuration file"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource LabelboxForegroundColor}">
|
||||
</TextBox>
|
||||
<Button Name="MicrowinAutoConfigBtn"
|
||||
Width="Auto"
|
||||
Height="Auto"
|
||||
Grid.Column="1"
|
||||
Margin="2"
|
||||
Padding="1" VerticalAlignment="Center">
|
||||
<Button.Content>
|
||||
...
|
||||
</Button.Content>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Rectangle Fill="{DynamicResource MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
||||
<Button Name="WPFMicrowin" Content="Start the process" Margin="2" Padding="15"/>
|
||||
</StackPanel>
|
||||
<StackPanel HorizontalAlignment="Left" SnapsToDevicePixels="True" Margin="1" Visibility="Collapsed">
|
||||
@ -1395,11 +1507,17 @@
|
||||
Grid.Row="0" Grid.Column="1">
|
||||
<StackPanel HorizontalAlignment="Left" Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True" Visibility="Visible">
|
||||
|
||||
<Grid Name = "BusyMessage" Visibility="Collapsed">
|
||||
<TextBlock Name = "BusyText" Text="NBusy" Padding="22,2,1,1" />
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="Segoe MDL2 Assets"
|
||||
FontSize="{DynamicResource IconFontSize}" Margin="16,0,0,0"></TextBlock>
|
||||
</Grid>
|
||||
<StackPanel x:Name="MicrowinBusyIndicator" Orientation="Horizontal" Margin="15,15,15,0">
|
||||
<TextBlock x:Name="BusyIcon" FontFamily="Segoe MDL2 Assets" Text=""
|
||||
Margin="0,0,8,2"
|
||||
FontSize="16"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource MicrowinBusyColor}"/>
|
||||
<TextBlock x:Name="BusyText" Text="Microwin"
|
||||
VerticalAlignment="Center"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
Foreground="{DynamicResource MicrowinBusyColor}"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock x:Name = "asciiTextBlock"
|
||||
xml:space ="preserve"
|
||||
@ -1440,7 +1558,7 @@
|
||||
May take several minutes to process the ISO depending on your machine and connection <LineBreak/>
|
||||
- Put it somewhere on the C:\ drive so it is easily accessible <LineBreak/>
|
||||
- Launch WinUtil and MicroWin <LineBreak/>
|
||||
- Click on the "Select Windows ISO" button and wait for WinUtil to process the image <LineBreak/>
|
||||
- Click on the "Get Windows ISO" button and wait for WinUtil to process the image <LineBreak/>
|
||||
It will be processed and unpacked which may take some time <LineBreak/>
|
||||
- Once complete, choose which Windows flavor you want to base your image on <LineBreak/>
|
||||
- Click the "Start Process" button <LineBreak/>
|
||||
|
Reference in New Issue
Block a user