Compare commits

...

18 Commits

Author SHA1 Message Date
cea4e088cf [Tweaks] Updated Copilot Removal (#3459)
* feat(copilot): update removal and installation for Copilot

* feat(copilot): registry entry to disable user eligibility

* fix indentation
2025-06-26 14:17:53 -05:00
32a4311901 expand disable recall and smart app off 2025-06-26 14:12:32 -05:00
ff95b35f24 refactor(tweaks): separate removal of Home and Gallery from explorer (#3454) 2025-06-26 13:52:01 -05:00
aea9c2cb47 Removed skype (#3453) 2025-06-26 13:41:02 -05:00
7fa0594267 fix MenuShowDelay reg changes (#3449)
- remove false MenuShowDelay
- replace original value with true default value
2025-06-26 13:38:13 -05:00
5e65505007 [Fixes] Improve Error Handling + UI (#3437)
* add proper error handling + Taskbaritem support to WPFSystemRepair

* implement other fixes

- add Taskbarprogress to WPFFixesNetwork
- add Taskbarprogress to WPFFixesUpdate
- add Error handling + Taskbarprogress to WPFFixesWinget
- add finalisation in WPFSystemRepair
2025-06-26 13:35:03 -05:00
686e65adcb [Tweaks] Fix Disabling of Ultimate Performance Profile (#3436)
* improve general codequality of function

* fix issue with disable process

- remove ".Line.Split()[3]"
- change $balancedPlanGUID to be in brackets
2025-06-26 13:29:24 -05:00
1935375f88 add T3Sleep Toggle (#3434) 2025-06-26 13:27:41 -05:00
069a1bda2f [Microwin] Adaptive Busy Icon + Message (#3433)
* Adaptive Busy Icon + Message

- added adaptive color & message of busy indicator
- fixed placement at some places for "Set-WinUtilTaskbaritem" as dialogbox which waits for user input came before

* seperate long Errormessaged for BusyIndication

* add CharacterEllipsis as TextTrimming on BusyText

Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>

* fix BusyIndication + add more detailed one

* removing wip busymessages before process

* Improve reporting of messages significantly (#15)

- Added parameter sets
- Implemented detections for interactive/noninteractive processes

* Fix hidden message action (#16)

---------

Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>
2025-06-26 13:26:35 -05:00
661dfa6318 add computer management + remove bloat from WPFControlPanel (#3431) 2025-06-26 13:23:33 -05:00
d6b78d1d06 fix winget package for viber application (#3430) 2025-06-26 13:21:59 -05:00
51f15a03c2 add note (#3429) 2025-06-26 13:13:47 -05:00
ce91307daf remove Hibernation tweak from standard preset (#3428) 2025-06-26 13:09:40 -05:00
8fe09d0054 remove msedge tweak (#3427) 2025-06-26 13:09:08 -05:00
e74258acf4 [Microwin] Fix & Cleanup UI (#3426)
* hide MicrowinISOPanel on proceeding steps

* fix textbox styling + remove Password text

* MicroWinPanelToggling
2025-06-26 12:21:49 -05:00
28958938fc Fixing the winget installing 0 failed error (#3391)
It just adds the `$null =` from the else to the start of the add line if the package is equal to `na`.

For winget the package added is put into an extra set of $(), because of how it is in the else. I haven't tested it without.
2025-06-26 12:14:46 -05:00
91de389c8f Add overlay and block app list during install/uninstall (#3385)
* Implement app installation progress overlay and refactor progress bar handling

* Add overlay background color settings and ensure minimum progress bar value

* Add busy overlay functionality and progress bar updates for installation process

* Refactor busy overlay implementation to dynamically adjust size based on app area dimensions
2025-06-26 12:11:38 -05:00
6b22c63d28 Deploying to main from @ ChrisTitusTech/winutil@faa4701c43 🚀 2025-06-26 15:34:46 +00:00
26 changed files with 613 additions and 368 deletions

View File

@ -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. These are the sponsors that help keep this project alive with monthly contributions.
<!-- sponsors --><a href="https://github.com/TriHydera"><img src="https:&#x2F;&#x2F;github.com&#x2F;TriHydera.png" width="60px" alt="User avatar: TriHydera" /></a><a href="https://github.com/DelDongo"><img src="https:&#x2F;&#x2F;github.com&#x2F;DelDongo.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/markamos"><img src="https:&#x2F;&#x2F;github.com&#x2F;markamos.png" width="60px" alt="User avatar: Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https:&#x2F;&#x2F;github.com&#x2F;dwelfusius.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/mews-se"><img src="https:&#x2F;&#x2F;github.com&#x2F;mews-se.png" width="60px" alt="User avatar: Martin Stockzell" /></a><a href="https://github.com/jdiegmueller"><img src="https:&#x2F;&#x2F;github.com&#x2F;jdiegmueller.png" width="60px" alt="User avatar: Jason A. Diegmueller" /></a><a href="https://github.com/robertsandrock"><img src="https:&#x2F;&#x2F;github.com&#x2F;robertsandrock.png" width="60px" alt="User avatar: RMS" /></a><a href="https://github.com/KenichiQaz"><img src="https:&#x2F;&#x2F;github.com&#x2F;KenichiQaz.png" width="60px" alt="User avatar: Stefan" /></a><a href="https://github.com/paulsheets"><img src="https:&#x2F;&#x2F;github.com&#x2F;paulsheets.png" width="60px" alt="User avatar: Paul" /></a><a href="https://github.com/djones369"><img src="https:&#x2F;&#x2F;github.com&#x2F;djones369.png" width="60px" alt="User avatar: Dave J. - WhamGeek" /></a><a href="https://github.com/anthonymendez"><img src="https:&#x2F;&#x2F;github.com&#x2F;anthonymendez.png" width="60px" alt="User avatar: Anthony Mendez" /></a><a href="https://github.com/FatBastard0"><img src="https:&#x2F;&#x2F;github.com&#x2F;FatBastard0.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DursleyGuy"><img src="https:&#x2F;&#x2F;github.com&#x2F;DursleyGuy.png" width="60px" alt="User avatar: DursleyGuy" /></a><a href="https://github.com/realmuddy"><img src="https:&#x2F;&#x2F;github.com&#x2F;realmuddy.png" width="60px" alt="User avatar: Phillip Waters" /></a><a href="https://github.com/quaszi"><img src="https:&#x2F;&#x2F;github.com&#x2F;quaszi.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DwayneTheRockLobster1"><img src="https:&#x2F;&#x2F;github.com&#x2F;DwayneTheRockLobster1.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/KieraKujisawa"><img src="https:&#x2F;&#x2F;github.com&#x2F;KieraKujisawa.png" width="60px" alt="User avatar: Kiera Meredith" /></a><a href="https://github.com/craigccfl"><img src="https:&#x2F;&#x2F;github.com&#x2F;craigccfl.png" width="60px" alt="User avatar: CraigW" /></a><a href="https://github.com/RoelCrabbe"><img src="https:&#x2F;&#x2F;github.com&#x2F;RoelCrabbe.png" width="60px" alt="User avatar: Roel Crabbé" /></a><a href="https://github.com/Data-Syd"><img src="https:&#x2F;&#x2F;github.com&#x2F;Data-Syd.png" width="60px" alt="User avatar: Data Syd" /></a><!-- sponsors --> <!-- sponsors --><a href="https://github.com/TriHydera"><img src="https:&#x2F;&#x2F;github.com&#x2F;TriHydera.png" width="60px" alt="User avatar: TriHydera" /></a><a href="https://github.com/DelDongo"><img src="https:&#x2F;&#x2F;github.com&#x2F;DelDongo.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/markamos"><img src="https:&#x2F;&#x2F;github.com&#x2F;markamos.png" width="60px" alt="User avatar: Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https:&#x2F;&#x2F;github.com&#x2F;dwelfusius.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/mews-se"><img src="https:&#x2F;&#x2F;github.com&#x2F;mews-se.png" width="60px" alt="User avatar: Martin Stockzell" /></a><a href="https://github.com/jdiegmueller"><img src="https:&#x2F;&#x2F;github.com&#x2F;jdiegmueller.png" width="60px" alt="User avatar: Jason A. Diegmueller" /></a><a href="https://github.com/robertsandrock"><img src="https:&#x2F;&#x2F;github.com&#x2F;robertsandrock.png" width="60px" alt="User avatar: RMS" /></a><a href="https://github.com/KenichiQaz"><img src="https:&#x2F;&#x2F;github.com&#x2F;KenichiQaz.png" width="60px" alt="User avatar: Stefan" /></a><a href="https://github.com/paulsheets"><img src="https:&#x2F;&#x2F;github.com&#x2F;paulsheets.png" width="60px" alt="User avatar: Paul" /></a><a href="https://github.com/djones369"><img src="https:&#x2F;&#x2F;github.com&#x2F;djones369.png" width="60px" alt="User avatar: Dave J. - WhamGeek" /></a><a href="https://github.com/anthonymendez"><img src="https:&#x2F;&#x2F;github.com&#x2F;anthonymendez.png" width="60px" alt="User avatar: Anthony Mendez" /></a><a href="https://github.com/FatBastard0"><img src="https:&#x2F;&#x2F;github.com&#x2F;FatBastard0.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DursleyGuy"><img src="https:&#x2F;&#x2F;github.com&#x2F;DursleyGuy.png" width="60px" alt="User avatar: DursleyGuy" /></a><a href="https://github.com/realmuddy"><img src="https:&#x2F;&#x2F;github.com&#x2F;realmuddy.png" width="60px" alt="User avatar: Phillip Waters" /></a><a href="https://github.com/quaszi"><img src="https:&#x2F;&#x2F;github.com&#x2F;quaszi.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DwayneTheRockLobster1"><img src="https:&#x2F;&#x2F;github.com&#x2F;DwayneTheRockLobster1.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/KieraKujisawa"><img src="https:&#x2F;&#x2F;github.com&#x2F;KieraKujisawa.png" width="60px" alt="User avatar: Kiera Meredith" /></a><a href="https://github.com/RoelCrabbe"><img src="https:&#x2F;&#x2F;github.com&#x2F;RoelCrabbe.png" width="60px" alt="User avatar: Roel Crabbé" /></a><a href="https://github.com/Data-Syd"><img src="https:&#x2F;&#x2F;github.com&#x2F;Data-Syd.png" width="60px" alt="User avatar: Data Syd" /></a><!-- sponsors -->
## 🏅 Thanks to all Contributors ## 🏅 Thanks to all Contributors
Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻. Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻.

View File

@ -547,7 +547,7 @@
"category": "Multimedia Tools", "category": "Multimedia Tools",
"choco": "ffmpeg-full", "choco": "ffmpeg-full",
"content": "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/", "link": "https://ffmpeg.org/",
"winget": "Gyan.FFmpeg" "winget": "Gyan.FFmpeg"
}, },
@ -1935,14 +1935,6 @@
"link": "https://github.com/henrypp/simplewall", "link": "https://github.com/henrypp/simplewall",
"winget": "Henry++.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": { "slack": {
"category": "Communications", "category": "Communications",
"choco": "slack", "choco": "slack",
@ -2301,7 +2293,7 @@
"content": "Viber", "content": "Viber",
"description": "Viber is a free messaging and calling app with features like group chats, video calls, and more.", "description": "Viber is a free messaging and calling app with features like group chats, video calls, and more.",
"link": "https://www.viber.com/", "link": "https://www.viber.com/",
"winget": "Viber.Viber" "winget": "Rakuten.Viber"
}, },
"videomass": { "videomass": {
"category": "Multimedia Tools", "category": "Multimedia Tools",

View File

@ -258,6 +258,14 @@
"ButtonWidth": "300", "ButtonWidth": "300",
"link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/control" "link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/control"
}, },
"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"
},
"WPFPanelpower": { "WPFPanelpower": {
"Content": "Power Panel", "Content": "Power Panel",
"category": "Legacy Windows Panels", "category": "Legacy Windows Panels",

View File

@ -4,7 +4,6 @@
"WPFTweaksConsumerFeatures", "WPFTweaksConsumerFeatures",
"WPFTweaksDisableExplorerAutoDiscovery", "WPFTweaksDisableExplorerAutoDiscovery",
"WPFTweaksDVR", "WPFTweaksDVR",
"WPFTweaksHiber",
"WPFTweaksHome", "WPFTweaksHome",
"WPFTweaksLoc", "WPFTweaksLoc",
"WPFTweaksServices", "WPFTweaksServices",

View File

@ -46,6 +46,7 @@
"AppInstallUnselectedColor": "#F7F7F7", "AppInstallUnselectedColor": "#F7F7F7",
"AppInstallHighlightedColor": "#CFCFCF", "AppInstallHighlightedColor": "#CFCFCF",
"AppInstallSelectedColor": "#C2C2C2", "AppInstallSelectedColor": "#C2C2C2",
"AppInstallOverlayBackgroundColor":"#6A6D72",
"ComboBoxForegroundColor": "#232629", "ComboBoxForegroundColor": "#232629",
"ComboBoxBackgroundColor": "#F7F7F7", "ComboBoxBackgroundColor": "#F7F7F7",
"LabelboxForegroundColor": "#232629", "LabelboxForegroundColor": "#232629",
@ -58,6 +59,7 @@
"ScrollBarHoverColor": "#5A5D62", "ScrollBarHoverColor": "#5A5D62",
"ScrollBarDraggingColor": "#6A6D72", "ScrollBarDraggingColor": "#6A6D72",
"MicrowinBusyColor": "#2e77ff",
"ProgressBarForegroundColor": "#2e77ff", "ProgressBarForegroundColor": "#2e77ff",
"ProgressBarBackgroundColor": "Transparent", "ProgressBarBackgroundColor": "Transparent",
"ProgressBarTextColor": "#232629", "ProgressBarTextColor": "#232629",
@ -85,6 +87,7 @@
"AppInstallUnselectedColor": "#232629", "AppInstallUnselectedColor": "#232629",
"AppInstallHighlightedColor": "#3C3C3C", "AppInstallHighlightedColor": "#3C3C3C",
"AppInstallSelectedColor": "#4C4C4C", "AppInstallSelectedColor": "#4C4C4C",
"AppInstallOverlayBackgroundColor":"#2E3135",
"ComboBoxForegroundColor": "#F7F7F7", "ComboBoxForegroundColor": "#F7F7F7",
"ComboBoxBackgroundColor": "#1E3747", "ComboBoxBackgroundColor": "#1E3747",
"LabelboxForegroundColor": "#0567ff", "LabelboxForegroundColor": "#0567ff",
@ -97,9 +100,10 @@
"ScrollBarHoverColor": "#3B4252", "ScrollBarHoverColor": "#3B4252",
"ScrollBarDraggingColor": "#5E81AC", "ScrollBarDraggingColor": "#5E81AC",
"MicrowinBusyColor": "#2e77ff",
"ProgressBarForegroundColor": "#222222", "ProgressBarForegroundColor": "#222222",
"ProgressBarBackgroundColor": "Transparent", "ProgressBarBackgroundColor": "Transparent",
"ProgressBarTextColor": "#cccccc", "ProgressBarTextColor": "#232629",
"ButtonInstallBackgroundColor": "#222222", "ButtonInstallBackgroundColor": "#222222",
"ButtonTweaksBackgroundColor": "#333333", "ButtonTweaksBackgroundColor": "#333333",
"ButtonConfigBackgroundColor": "#444444", "ButtonConfigBackgroundColor": "#444444",

View File

@ -2012,13 +2012,6 @@
"Value": "4294967295", "Value": "4294967295",
"Type": "DWord" "Type": "DWord"
}, },
{
"Path": "HKCU:\\Control Panel\\Desktop",
"OriginalValue": "1",
"Name": "MenuShowDelay",
"Value": "1",
"Type": "DWord"
},
{ {
"Path": "HKCU:\\Control Panel\\Desktop", "Path": "HKCU:\\Control Panel\\Desktop",
"OriginalValue": "1", "OriginalValue": "1",
@ -2154,28 +2147,46 @@
], ],
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/utc" "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/utc"
}, },
"WPFTweaksRemoveHomeGallery": { "WPFTweaksRemoveHome": {
"Content": "Remove Home and Gallery from explorer", "Content": "Remove Home from explorer",
"Description": "Removes the Home and Gallery from explorer and sets This PC as default", "Description": "Removes the Home from explorer and sets This PC as default",
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",
"panel": "1", "panel": "1",
"Order": "a029_", "Order": "a029_",
"InvokeScript": [ "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 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\" REG ADD \"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" /f /v \"LaunchTo\" /t REG_DWORD /d \"1\"
" "
], ],
"UndoScript": [ "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 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\" 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" "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": { "WPFTweaksDisplay": {
"Content": "Set Display for Performance", "Content": "Set Display for Performance",
"Description": "Sets the system preferences to performance. You can do this manually with sysdm.cpl as well.", "Description": "Sets the system preferences to performance. You can do this manually with sysdm.cpl as well.",
@ -2192,7 +2203,7 @@
}, },
{ {
"Path": "HKCU:\\Control Panel\\Desktop", "Path": "HKCU:\\Control Panel\\Desktop",
"OriginalValue": "1", "OriginalValue": "400",
"Name": "MenuShowDelay", "Name": "MenuShowDelay",
"Value": "200", "Value": "200",
"Type": "String" "Type": "String"
@ -2522,20 +2533,6 @@
], ],
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/storage" "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": { "WPFTweaksRemoveCopilot": {
"Content": "Disable Microsoft Copilot", "Content": "Disable Microsoft Copilot",
"Description": "Disables MS Copilot AI built into Windows since 23H2.", "Description": "Disables MS Copilot AI built into Windows since 23H2.",
@ -2563,18 +2560,56 @@
"Type": "DWord", "Type": "DWord",
"Value": "0", "Value": "0",
"OriginalValue": "1" "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": [ "InvokeScript": [
" "
Write-Host \"Remove Copilot\" 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 dism /online /remove-package /package-name:Microsoft.Windows.Copilot
" "
], ],
"UndoScript": [ "UndoScript": [
" "
Write-Host \"Install Copilot\" 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" "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removecopilot"
@ -2592,6 +2627,20 @@
"Type": "DWord", "Type": "DWord",
"Value": "1", "Value": "1",
"OriginalValue": "<RemoveEntry>" "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": [ "InvokeScript": [
@ -2689,7 +2738,7 @@
"Description": "Moves OneDrive files to Default Home Folders and Uninstalls it.", "Description": "Moves OneDrive files to Default Home Folders and Uninstalls it.",
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",
"panel": "1", "panel": "1",
"Order": "a030_", "Order": "a031_",
"InvokeScript": [ "InvokeScript": [
" "
$OneDrivePath = $($env:OneDrive) $OneDrivePath = $($env:OneDrive)
@ -2796,7 +2845,7 @@
"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.",
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",
"panel": "1", "panel": "1",
"Order": "a031_", "Order": "a032_",
"registry": [ "registry": [
{ {
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DriverSearching", "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DriverSearching",
@ -3758,6 +3807,24 @@
], ],
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/detailedbsod" "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": { "WPFOOSUbutton": {
"Content": "Run OO Shutup 10", "Content": "Run OO Shutup 10",
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",

View File

@ -39,12 +39,15 @@ public class PowerManagement {
$SaveDialog.ShowDialog() | Out-Null $SaveDialog.ShowDialog() | Out-Null
if ($SaveDialog.FileName -eq "") { 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" Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
return return
} }
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo" Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo"
Invoke-MicrowinBusyInfo -action "wip" -message "Busy..." -interactive $false
Write-Host "Target ISO location: $($SaveDialog.FileName)" Write-Host "Target ISO location: $($SaveDialog.FileName)"
@ -70,9 +73,10 @@ public class PowerManagement {
$index = 1 $index = 1
} else { } else {
$msg = "The export process has failed and MicroWin processing cannot continue" $msg = "The export process has failed and MicroWin processing cannot continue"
Write-Host "Failed to export the image" Write-Host $msg
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error)
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning" 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 return
} }
} }
@ -87,6 +91,7 @@ public class PowerManagement {
Write-Host $msg Write-Host $msg
[System.Windows.MessageBox]::Show($dlg_msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Exclamation) [System.Windows.MessageBox]::Show($dlg_msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Exclamation)
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning" Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
Invoke-MicrowinBusyInfo -action "warning" -message $msg
return return
} }
@ -101,8 +106,10 @@ public class PowerManagement {
$mountDirExists = Test-Path $mountDir $mountDirExists = Test-Path $mountDir
$scratchDirExists = Test-Path $scratchDir $scratchDirExists = Test-Path $scratchDir
if (-not $mountDirExists -or -not $scratchDirExists) { if (-not $mountDirExists -or -not $scratchDirExists) {
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" Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
Invoke-MicrowinBusyInfo -action "warning" -message $msg
return return
} }
@ -113,8 +120,10 @@ public class PowerManagement {
if ($?) { if ($?) {
Write-Host "The Windows image has been mounted successfully. Continuing processing..." Write-Host "The Windows image has been mounted successfully. Continuing processing..."
} else { } 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" Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
Invoke-MicrowinBusyInfo -action "warning" -message $msg
return return
} }
@ -368,7 +377,9 @@ public class PowerManagement {
Rename-Item "$mountDir\sources\install2.wim" "$mountDir\sources\install.wim" Rename-Item "$mountDir\sources\install2.wim" "$mountDir\sources\install.wim"
if (-not (Test-Path -Path "$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" Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
return return
} }
@ -459,6 +470,7 @@ public class PowerManagement {
$msg = "Done. ISO image is located here: $($SaveDialog.FileName)" $msg = "Done. ISO image is located here: $($SaveDialog.FileName)"
Write-Host $msg Write-Host $msg
Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" 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) [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Information)
} else { } else {
Write-Host "ISO creation failed. The "$($mountDir)" directory has not been removed." Write-Host "ISO creation failed. The "$($mountDir)" directory has not been removed."
@ -467,12 +479,14 @@ public class PowerManagement {
# Now, this will NOT throw an exception # Now, this will NOT throw an exception
$exitCode = New-Object System.ComponentModel.Win32Exception($LASTEXITCODE) $exitCode = New-Object System.ComponentModel.Win32Exception($LASTEXITCODE)
Write-Host "Reason: $($exitCode.Message)" Write-Host "Reason: $($exitCode.Message)"
Invoke-MicrowinBusyInfo -action "warning" -message $exitCode.Message
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
} catch { } catch {
# Could not get error description from Windows APIs # 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 = "$env:temp\microwin.iso"
$sync.MicrowinFinalIsoLocation.Text = "$($SaveDialog.FileName)" $sync.MicrowinFinalIsoLocation.Text = "$($SaveDialog.FileName)"

View 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
}

View File

@ -12,10 +12,8 @@ function Invoke-MicrowinGetIso {
return return
} }
$sync.BusyMessage.Visibility="Visible" # Provide immediate feedback to user
$sync.BusyText.Text="N Busy" Invoke-MicrowinBusyInfo -action "wip" -message "Initializing MicroWin process..." -interactive $false
Write-Host " _ __ __ _ " Write-Host " _ __ __ _ "
Write-Host " /\/\ (_) ___ _ __ ___ / / /\ \ \(_) _ __ " Write-Host " /\/\ (_) ___ _ __ ___ / / /\ \ \(_) _ __ "
@ -23,47 +21,9 @@ function Invoke-MicrowinGetIso {
Write-Host "/ /\/\ \| || (__ | | | (_) | \ /\ / | || | | | " Write-Host "/ /\/\ \| || (__ | | | (_) | \ /\ / | || | | | "
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) { if ($sync["ISOmanual"].IsChecked) {
# Open file dialog to let user choose the ISO file # 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 [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | Out-Null
$openFileDialog = New-Object System.Windows.Forms.OpenFileDialog $openFileDialog = New-Object System.Windows.Forms.OpenFileDialog
$openFileDialog.initialDirectory = $initialDirectory $openFileDialog.initialDirectory = $initialDirectory
@ -73,20 +33,26 @@ function Invoke-MicrowinGetIso {
if ([string]::IsNullOrEmpty($filePath)) { if ([string]::IsNullOrEmpty($filePath)) {
Write-Host "No ISO is chosen" Write-Host "No ISO is chosen"
$sync.BusyMessage.Visibility="Hidden" Invoke-MicrowinBusyInfo -action "hide" -message " "
return return
} }
} elseif ($sync["ISOdownloader"].IsChecked) { } elseif ($sync["ISOdownloader"].IsChecked) {
# Create folder browsers for user-specified locations # 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 [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
$isoDownloaderFBD = New-Object System.Windows.Forms.FolderBrowserDialog $isoDownloaderFBD = New-Object System.Windows.Forms.FolderBrowserDialog
$isoDownloaderFBD.Description = "Please specify the path to download the ISO file to:" $isoDownloaderFBD.Description = "Please specify the path to download the ISO file to:"
$isoDownloaderFBD.ShowNewFolderButton = $true $isoDownloaderFBD.ShowNewFolderButton = $true
if ($isoDownloaderFBD.ShowDialog() -ne [System.Windows.Forms.DialogResult]::OK) if ($isoDownloaderFBD.ShowDialog() -ne [System.Windows.Forms.DialogResult]::OK)
{ {
Invoke-MicrowinBusyInfo -action "hide" -message " "
return 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 # Grab the location of the selected path
$targetFolder = $isoDownloaderFBD.SelectedPath $targetFolder = $isoDownloaderFBD.SelectedPath
@ -95,6 +61,7 @@ function Invoke-MicrowinGetIso {
$fidopath = "$env:temp\Fido.ps1" $fidopath = "$env:temp\Fido.ps1"
$originalLocation = $PSScriptRoot $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 Invoke-WebRequest "https://github.com/pbatard/Fido/raw/master/Fido.ps1" -OutFile $fidopath
Set-Location -Path $env:temp Set-Location -Path $env:temp
@ -105,11 +72,14 @@ function Invoke-MicrowinGetIso {
$sync["ISOLanguage"].SelectedItem $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" & $fidopath -Win 'Windows 11' -Rel $sync["ISORelease"].SelectedItem -Arch "x64" -Lang $lang -Ed "Windows 11 Home/Pro/Edu"
if (-not $?) if (-not $?)
{ {
Write-Host "Could not download the ISO file. Look at the output of the console for more information." 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" $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) [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error)
return return
} }
@ -131,8 +101,11 @@ function Invoke-MicrowinGetIso {
} }
catch 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 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)" Write-Host "File path $($filePath)"
if (-not (Test-Path -Path "$filePath" -PathType Leaf)) { if (-not (Test-Path -Path "$filePath" -PathType Leaf)) {
$msg = "File you've chosen doesn't exist" $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) [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error)
return return
} }
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo" 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 # Detect the file size of the ISO and compare it with the free space of the system drive
$isoSize = (Get-Item -Path "$filePath").Length $isoSize = (Get-Item -Path "$filePath").Length
@ -159,14 +178,17 @@ function Invoke-MicrowinGetIso {
} }
elseif ($driveSpace -lt $isoSize) { elseif ($driveSpace -lt $isoSize) {
# It's critical and we can't continue. Output an error # 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" Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
Invoke-MicrowinBusyInfo -action "warning" -message $msg
return return
} else { } else {
Write-Host "You have enough space for this operation." Write-Host "You have enough space for this operation."
} }
try { try {
Invoke-MicrowinBusyInfo -action "wip" -message "Mounting ISO file..." -interactive $false
Write-Host "Mounting Iso. Please wait." Write-Host "Mounting Iso. Please wait."
$mountedISO = Mount-DiskImage -PassThru "$filePath" $mountedISO = Mount-DiskImage -PassThru "$filePath"
Write-Host "Done mounting Iso `"$($mountedISO.ImagePath)`"" Write-Host "Done mounting Iso `"$($mountedISO.ImagePath)`""
@ -174,10 +196,12 @@ function Invoke-MicrowinGetIso {
Write-Host "Iso mounted to '$driveLetter'" Write-Host "Iso mounted to '$driveLetter'"
} catch { } catch {
# @ChrisTitusTech please copy this wiki and change the link below to your copy of the wiki # @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-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 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" Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
Invoke-MicrowinBusyInfo -action "warning" -message $msg
return return
} }
# storing off values in hidden fields for further steps # storing off values in hidden fields for further steps
@ -236,23 +260,32 @@ function Invoke-MicrowinGetIso {
try { try {
#$data = @($driveLetter, $filePath) #$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 "$($mountDir)" | Out-Null
New-Item -ItemType Directory -Force -Path "$($scratchDir)" | 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!" 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 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 # 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" 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" $wimFile = "$mountDir\sources\install.wim"
Write-Host "Getting image information $wimFile" 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))) { 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/" $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 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/"
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error) Invoke-MicrowinBusyInfo -action "warning" -message $msg
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning" Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error)
throw throw
} }
elseif ((-not (Test-Path -Path $wimFile -PathType Leaf)) -and (Test-Path -Path $wimFile.Replace(".wim", ".esd").Trim() -PathType Leaf)) { 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 $imageName = $_.ImageName
$sync.MicrowinWindowsFlavors.Items.Add("$imageIdx : $imageName") $sync.MicrowinWindowsFlavors.Items.Add("$imageIdx : $imageName")
} }
[System.Windows.Forms.Application]::DoEvents()
$sync.MicrowinWindowsFlavors.SelectedIndex = 0 $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." 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 { Get-WindowsImage -ImagePath $wimFile | ForEach-Object {
if ((Get-WindowsImage -ImagePath $wimFile -Index $_.ImageIndex).EditionId -eq "Professional") { if ((Get-WindowsImage -ImagePath $wimFile -Index $_.ImageIndex).EditionId -eq "Professional") {
# We have found the Pro edition # We have found the Pro edition
$sync.MicrowinWindowsFlavors.SelectedIndex = $_.ImageIndex - 1 $sync.MicrowinWindowsFlavors.SelectedIndex = $_.ImageIndex - 1
} }
# Allow UI updates during this loop
[System.Windows.Forms.Application]::DoEvents()
} }
Get-Volume $driveLetter | Get-DiskImage | Dismount-DiskImage Get-Volume $driveLetter | Get-DiskImage | Dismount-DiskImage
Write-Host "Selected value '$($sync.MicrowinWindowsFlavors.SelectedValue)'....." Write-Host "Selected value '$($sync.MicrowinWindowsFlavors.SelectedValue)'....."
$sync.MicrowinOptionsPanel.Visibility = 'Visible' Toggle-MicrowinPanel 2
} catch { } catch {
Write-Host "Dismounting bad image..." Write-Host "Dismounting bad image..."
Get-Volume $driveLetter | Get-DiskImage | Dismount-DiskImage Get-Volume $driveLetter | Get-DiskImage | Dismount-DiskImage
Remove-Item -Recurse -Force "$($scratchDir)" Remove-Item -Recurse -Force "$($scratchDir)"
Remove-Item -Recurse -Force "$($mountDir)" 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" Write-Host "Done reading and unpacking ISO"
@ -289,7 +333,7 @@ function Invoke-MicrowinGetIso {
Write-Host "*********************************" Write-Host "*********************************"
Write-Host "Check the UI for further steps!!!" Write-Host "Check the UI for further steps!!!"
$sync.BusyMessage.Visibility="Hidden" Invoke-MicrowinBusyInfo -action "done" -message "Done! Proceed with customization."
$sync.ProcessRunning = $false $sync.ProcessRunning = $false
Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" Set-WinUtilTaskbaritem -state "None" -overlay "checkmark"
} }

View 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'
}
}

View File

@ -33,7 +33,7 @@ function Get-WinUtilSelectedPackages
"Choco" { "Choco" {
if ($package.choco -eq "na") { if ($package.choco -eq "na") {
Write-Debug "$($package.content) has no Choco value." Write-Debug "$($package.content) has no Choco value."
$packagesWinget.add($package.winget) $null = $packagesWinget.add($($package.winget))
Write-Host "Queueing $($package.winget) for Winget" Write-Host "Queueing $($package.winget) for Winget"
} else { } else {
$null = $packagesChoco.add($package.choco) $null = $packagesChoco.add($package.choco)
@ -44,7 +44,7 @@ function Get-WinUtilSelectedPackages
"Winget" { "Winget" {
if ($package.winget -eq "na") { if ($package.winget -eq "na") {
Write-Debug "$($package.content) has no Winget value." Write-Debug "$($package.content) has no Winget value."
$packagesChoco.add($package.choco) $null = $packagesChoco.add($package.choco)
Write-Host "Queueing $($package.choco) for Chocolatey" Write-Host "Queueing $($package.choco) for Chocolatey"
} else { } else {
$null = $packagesWinget.add($($package.winget)) $null = $packagesWinget.add($($package.winget))

View 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
})
}

View File

@ -5,6 +5,8 @@
This is used as the parent object for all category and app entries on the install tab 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 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 .PARAMETER TargetElement
The element to which the AppArea shoud be added The element to which the AppArea shoud be added
@ -17,6 +19,7 @@
$Border = New-Object Windows.Controls.Border $Border = New-Object Windows.Controls.Border
$Border.VerticalAlignment = "Stretch" $Border.VerticalAlignment = "Stretch"
$Border.SetResourceReference([Windows.Controls.Control]::StyleProperty, "BorderStyle") $Border.SetResourceReference([Windows.Controls.Control]::StyleProperty, "BorderStyle")
$sync.InstallAppAreaBorder = $Border
# Add a ScrollViewer, because the ItemsControl does not support scrolling by itself # Add a ScrollViewer, because the ItemsControl does not support scrolling by itself
$scrollViewer = New-Object Windows.Controls.ScrollViewer $scrollViewer = New-Object Windows.Controls.ScrollViewer
@ -24,11 +27,19 @@
$scrollViewer.HorizontalAlignment = 'Stretch' $scrollViewer.HorizontalAlignment = 'Stretch'
$scrollViewer.VerticalAlignment = 'Stretch' $scrollViewer.VerticalAlignment = 'Stretch'
$scrollViewer.CanContentScroll = $true $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 ## Create the ItemsControl, which will be the parent of all the app entries
$itemsControl = New-Object Windows.Controls.ItemsControl $itemsControl = New-Object Windows.Controls.ItemsControl
$itemsControl.HorizontalAlignment = 'Stretch' $itemsControl.HorizontalAlignment = 'Stretch'
$itemsControl.VerticalAlignment = '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) # 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 $itemsPanelTemplate = New-Object Windows.Controls.ItemsPanelTemplate
@ -38,8 +49,64 @@
$itemsControl.SetValue([Windows.Controls.VirtualizingStackPanel]::IsVirtualizingProperty, $true) $itemsControl.SetValue([Windows.Controls.VirtualizingStackPanel]::IsVirtualizingProperty, $true)
$itemsControl.SetValue([Windows.Controls.VirtualizingStackPanel]::VirtualizationModeProperty, [Windows.Controls.VirtualizationMode]::Recycling) $itemsControl.SetValue([Windows.Controls.VirtualizingStackPanel]::VirtualizationModeProperty, [Windows.Controls.VirtualizationMode]::Recycling)
$scrollViewer.Content = $itemsControl # Add the Border containing the App Area to the target Grid
$Border.Child = $scrollViewer $targetGrid.Children.Add($Border) | Out-Null
$null = $targetGrid.Children.Add($Border)
$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 return $itemsControl
} }

View File

@ -7,24 +7,18 @@ function Set-WinUtilProgressbar{
The Text to be overlayed onto the Progress Bar The Text to be overlayed onto the Progress Bar
.PARAMETER PERCENT .PARAMETER PERCENT
The percentage of the Progress Bar that should be filled (0-100) 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( param(
[string]$Label, [string]$Label,
[ValidateRange(0,100)] [ValidateRange(0,100)]
[int]$Percent, [int]$Percent
$Hide
) )
if ($hide) {
$sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Visibility = "Collapsed"}) $sync.form.Dispatcher.Invoke([action]{$sync.progressBarTextBlock.Text = $label})
$sync.form.Dispatcher.Invoke([action]{$sync.ProgressBar.Visibility = "Collapsed"}) $sync.form.Dispatcher.Invoke([action]{$sync.progressBarTextBlock.ToolTip = $label})
} else { if ($percent -lt 5 ) {
$sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Visibility = "Visible"}) $percent = 5 # Ensure the progress bar is not empty, as it looks weird
$sync.form.Dispatcher.Invoke([action]{$sync.ProgressBar.Visibility = "Visible"})
} }
$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}) $sync.form.Dispatcher.Invoke([action]{ $sync.ProgressBar.Value = $percent})
} }

View 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
})
}

View File

@ -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
}
}

View File

@ -15,7 +15,7 @@ function Invoke-WPFButton {
# Use this to get the name of the button # Use this to get the name of the button
#[System.Windows.MessageBox]::Show("$Button","Chris Titus Tech's Windows Utility","OK","Info") #[System.Windows.MessageBox]::Show("$Button","Chris Titus Tech's Windows Utility","OK","Info")
if (-not $sync.ProcessRunning) { if (-not $sync.ProcessRunning) {
Set-WinUtilProgressBar -label "" -percent 0 -hide $true Set-WinUtilProgressBar -label "" -percent 0
} }
Switch -Wildcard ($Button) { Switch -Wildcard ($Button) {
@ -35,6 +35,7 @@ function Invoke-WPFButton {
"WPFFeatureInstall" {Invoke-WPFFeatureInstall} "WPFFeatureInstall" {Invoke-WPFFeatureInstall}
"WPFPanelDISM" {Invoke-WPFSystemRepair} "WPFPanelDISM" {Invoke-WPFSystemRepair}
"WPFPanelAutologin" {Invoke-WPFPanelAutologin} "WPFPanelAutologin" {Invoke-WPFPanelAutologin}
"WPFPanelcomputer" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelcontrol" {Invoke-WPFControlPanel -Panel $button} "WPFPanelcontrol" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelnetwork" {Invoke-WPFControlPanel -Panel $button} "WPFPanelnetwork" {Invoke-WPFControlPanel -Panel $button}
"WPFPanelpower" {Invoke-WPFControlPanel -Panel $button} "WPFPanelpower" {Invoke-WPFControlPanel -Panel $button}
@ -62,5 +63,6 @@ function Invoke-WPFButton {
"WPFWinUtilUninstallPSProfile" {Invoke-WinUtilUninstallPSProfile} "WPFWinUtilUninstallPSProfile" {Invoke-WinUtilUninstallPSProfile}
"WPFWinUtilSSHServer" {Invoke-WPFSSHServer} "WPFWinUtilSSHServer" {Invoke-WPFSSHServer}
"WPFselectedAppsButton" {$sync.selectedAppsPopup.IsOpen = -not $sync.selectedAppsPopup.IsOpen} "WPFselectedAppsButton" {$sync.selectedAppsPopup.IsOpen = -not $sync.selectedAppsPopup.IsOpen}
"WPFMicrowinPanelBack" {Toggle-MicrowinPanel 1}
} }
} }

View File

@ -11,14 +11,15 @@ function Invoke-WPFControlPanel {
param($Panel) param($Panel)
switch ($Panel) { switch ($Panel) {
"WPFPanelcontrol" {cmd /c control} "WPFPanelcontrol" {control}
"WPFPanelnetwork" {cmd /c ncpa.cpl} "WPFPanelcomputer" {compmgmt.msc}
"WPFPanelpower" {cmd /c powercfg.cpl} "WPFPanelnetwork" {ncpa.cpl}
"WPFPanelregion" {cmd /c intl.cpl} "WPFPanelpower" {powercfg.cpl}
"WPFPanelsound" {cmd /c mmsys.cpl} "WPFPanelregion" {intl.cpl}
"WPFPanelsound" {mmsys.cpl}
"WPFPanelprinter" {Start-Process "shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}"} "WPFPanelprinter" {Start-Process "shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}"}
"WPFPanelsystem" {cmd /c sysdm.cpl} "WPFPanelsystem" {sysdm.cpl}
"WPFPaneluser" {cmd /c "control userpasswords2"} "WPFPaneluser" {control userpasswords2}
"WPFPanelGodMode" {Start-Process "shell:::{ED7BA470-8E54-465E-825C-99712043E01C}"} "WPFPanelGodMode" {Start-Process "shell:::{ED7BA470-8E54-465E-825C-99712043E01C}"}
} }
} }

View File

@ -8,13 +8,20 @@ function Invoke-WPFFixesNetwork {
Write-Host "Resetting Network with netsh" Write-Host "Resetting Network with netsh"
Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo"
# Reset WinSock catalog to a clean state # Reset WinSock catalog to a clean state
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winsock", "reset" Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winsock", "reset"
Set-WinUtilTaskbaritem -state "Normal" -value 0.35 -overlay "logo"
# Resets WinHTTP proxy setting to DIRECT # Resets WinHTTP proxy setting to DIRECT
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winhttp", "reset", "proxy" Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winhttp", "reset", "proxy"
Set-WinUtilTaskbaritem -state "Normal" -value 0.7 -overlay "logo"
# Removes all user configured IP settings # Removes all user configured IP settings
Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "int", "ip", "reset" Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "int", "ip", "reset"
Set-WinUtilTaskbaritem -state "None" -overlay "checkmark"
Write-Host "Process complete. Please reboot your computer." Write-Host "Process complete. Please reboot your computer."
$ButtonType = [System.Windows.MessageBoxButton]::OK $ButtonType = [System.Windows.MessageBoxButton]::OK

View File

@ -30,6 +30,8 @@ function Invoke-WPFFixesUpdate {
param($Aggressive = $false) param($Aggressive = $false)
Write-Progress -Id 0 -Activity "Repairing Windows Update" -PercentComplete 0 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 # Wait for the first progress bar to show, otherwise the second one won't show
Start-Sleep -Milliseconds 200 Start-Sleep -Milliseconds 200
@ -190,12 +192,15 @@ function Invoke-WPFFixesUpdate {
try { try {
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow() (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
} catch { } catch {
Set-WinUtilTaskbaritem -state "Error" -overlay "warning"
Write-Warning "Failed to create Windows Update COM object: $_" Write-Warning "Failed to create Windows Update COM object: $_"
} }
Start-Process -NoNewWindow -FilePath "wuauclt" -ArgumentList "/resetauthorization", "/detectnow" Start-Process -NoNewWindow -FilePath "wuauclt" -ArgumentList "/resetauthorization", "/detectnow"
Write-Progress -Id 10 -ParentId 0 -Activity "Forcing discovery" -Status "Completed" -PercentComplete 100 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 Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Completed" -PercentComplete 100
Set-WinUtilTaskbaritem -state "None" -overlay "checkmark"
$ButtonType = [System.Windows.MessageBoxButton]::OK $ButtonType = [System.Windows.MessageBoxButton]::OK
$MessageboxTitle = "Reset Windows Update " $MessageboxTitle = "Reset Windows Update "
$Messageboxbody = ("Stock settings loaded.`n Please reboot your computer") $Messageboxbody = ("Stock settings loaded.`n Please reboot your computer")

View File

@ -8,7 +8,16 @@ function Invoke-WPFFixesWinget {
BravoNorris for the fantastic idea of a button to reinstall winget BravoNorris for the fantastic idea of a button to reinstall winget
#> #>
# Install Choco if not already present # Install Choco if not already present
try {
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo"
Install-WinUtilChoco Install-WinUtilChoco
Start-Process -FilePath "choco" -ArgumentList "install winget -y --force" -NoNewWindow -Wait 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"
}
} }

View File

@ -34,6 +34,8 @@ function Invoke-WPFInstall {
try { try {
$sync.ProcessRunning = $true $sync.ProcessRunning = $true
Show-WPFInstallAppBusy -text "Installing apps..."
if($packagesWinget.Count -gt 0) { if($packagesWinget.Count -gt 0) {
Install-WinUtilWinget Install-WinUtilWinget
Install-WinUtilProgramWinget -Action Install -Programs $packagesWinget Install-WinUtilProgramWinget -Action Install -Programs $packagesWinget
@ -43,6 +45,7 @@ function Invoke-WPFInstall {
Install-WinUtilChoco Install-WinUtilChoco
Install-WinUtilProgramChoco -Action Install -Programs $packagesChoco Install-WinUtilProgramChoco -Action Install -Programs $packagesChoco
} }
Hide-WPFInstallAppBusy
Write-Host "===========================================" Write-Host "==========================================="
Write-Host "-- Installs have finished ---" Write-Host "-- Installs have finished ---"
Write-Host "===========================================" Write-Host "==========================================="

View File

@ -104,6 +104,9 @@ function Invoke-WPFSystemRepair {
Write-Progress -Id 1 -Activity $childProgressBarActivity -Status "DISM Completed" -PercentComplete 100 -Completed Write-Progress -Id 1 -Activity $childProgressBarActivity -Status "DISM Completed" -PercentComplete 100 -Completed
} }
try {
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo"
$childProgressBarActivity = "Scanning for corruption" $childProgressBarActivity = "Scanning for corruption"
Write-Progress -Id 0 -Activity "Repairing Windows" -PercentComplete 0 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 # Step 1: Run chkdsk to fix disk and filesystem corruption before proceeding with system file repairs
@ -121,4 +124,14 @@ function Invoke-WPFSystemRepair {
# Step 4: Run SFC again to ensure system files are repaired using the now-fixed system image # Step 4: Run SFC again to ensure system files are repaired using the now-fixed system image
Invoke-SFC Invoke-SFC
Write-Progress -Id 0 -Activity "Repairing Windows" -PercentComplete 100 -Completed 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"
}
} }

View File

@ -8,13 +8,18 @@ Function Invoke-WPFUltimatePerformance {
Specifies whether to "Enable" or "Disable" the Ultimate Performance power scheme. Specifies whether to "Enable" or "Disable" the Ultimate Performance power scheme.
#> #>
param($State) param(
[Parameter(Mandatory = $true)]
[ValidateSet("Enable", "Disable")]
[string]$State
)
try { try {
# GUID of the Ultimate Performance power plan # GUID of the Ultimate Performance power plan
$ultimateGUID = "e9a42b02-d5df-448d-aa00-03f14749eb61" $ultimateGUID = "e9a42b02-d5df-448d-aa00-03f14749eb61"
if ($State -eq "Enable") { switch ($State) {
"Enable" {
# Duplicate the Ultimate Performance power plan using its GUID # Duplicate the Ultimate Performance power plan using its GUID
$duplicateOutput = powercfg /duplicatescheme $ultimateGUID $duplicateOutput = powercfg /duplicatescheme $ultimateGUID
@ -47,17 +52,17 @@ Function Invoke-WPFUltimatePerformance {
Write-Output $setActiveOutput Write-Output $setActiveOutput
Write-Host "> Ultimate Performance plan installed and set as active." Write-Host "> Ultimate Performance plan installed and set as active."
}
} elseif ($State -eq "Disable") { "Disable" {
# Check if the Ultimate Performance plan is installed by GUID # Check if the Ultimate Performance plan is installed by GUID
$installedPlan = (powercfg -list | Select-String -Pattern "ChrisTitus - Ultimate Power Plan").Line.Split()[3] $installedPlan = powercfg -list | Select-String -Pattern "ChrisTitus - Ultimate Power Plan"
if ($installedPlan) { if ($installedPlan) {
# Extract the GUID of the installed Ultimate Performance plan # Extract the GUID of the installed Ultimate Performance plan
$ultimatePlanGUID = $installedPlan.Line.Split()[3] $ultimatePlanGUID = $installedPlan.Line.Split()[3]
# Set a different power plan as active before deleting the Ultimate Performance plan # Set a different power plan as active before deleting the Ultimate Performance plan
$balancedPlanGUID = 381b4222-f694-41f0-9685-ff5bb260df2e $balancedPlanGUID = "381b4222-f694-41f0-9685-ff5bb260df2e"
powercfg -setactive $balancedPlanGUID powercfg -setactive $balancedPlanGUID
# Delete the Ultimate Performance plan by GUID # Delete the Ultimate Performance plan by GUID
@ -69,6 +74,10 @@ Function Invoke-WPFUltimatePerformance {
Write-Host "Ultimate Performance plan is not installed." Write-Host "Ultimate Performance plan is not installed."
} }
} }
default {
Write-Host "Invalid state. Please use 'Enable' or 'Disable'."
}
}
} catch { } catch {
Write-Error "Error occurred: $_" Write-Error "Error occurred: $_"
} }

View File

@ -41,6 +41,7 @@ function Invoke-WPFUnInstall {
try { try {
$sync.ProcessRunning = $true $sync.ProcessRunning = $true
Show-WPFInstallAppBusy -text "Uninstalling apps..."
# Uninstall all selected programs in new window # Uninstall all selected programs in new window
if($packagesWinget.Count -gt 0) { if($packagesWinget.Count -gt 0) {
@ -49,7 +50,7 @@ function Invoke-WPFUnInstall {
if($packagesChoco.Count -gt 0) { if($packagesChoco.Count -gt 0) {
Install-WinUtilProgramChoco -Action Uninstall -Programs $packagesChoco Install-WinUtilProgramChoco -Action Uninstall -Programs $packagesChoco
} }
Hide-WPFInstallAppBusy
Write-Host "===========================================" Write-Host "==========================================="
Write-Host "-- Uninstalls have finished ---" Write-Host "-- Uninstalls have finished ---"
Write-Host "===========================================" Write-Host "==========================================="

View File

@ -801,6 +801,7 @@
<Setter Property="HorizontalAlignment" Value="Stretch"/> <Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/> <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="CaretBrush" Value="{DynamicResource MainForegroundColor}"/>
<Setter Property="ContextMenu"> <Setter Property="ContextMenu">
<Setter.Value> <Setter.Value>
<ContextMenu> <ContextMenu>
@ -855,6 +856,7 @@
<Setter Property="HorizontalAlignment" Value="Stretch"/> <Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/> <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="CaretBrush" Value="{DynamicResource MainForegroundColor}"/>
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="PasswordBox"> <ControlTemplate TargetType="PasswordBox">
@ -992,34 +994,6 @@
Margin="210,0,0,0" Visibility="Collapsed"> Margin="210,0,0,0" Visibility="Collapsed">
</Button> </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" <Button Name="ThemeButton"
Style="{StaticResource HoverButtonStyle}" Style="{StaticResource HoverButtonStyle}"
Grid.Column="2" BorderBrush="Transparent" Grid.Column="2" BorderBrush="Transparent"
@ -1287,7 +1261,7 @@
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"> HorizontalAlignment="Stretch">
<StackPanel Name="MicrowinMain" Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Column="0" Grid.Row="0"> <StackPanel Name="MicrowinMain" Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Column="0" Grid.Row="0">
<StackPanel Background="Transparent" SnapsToDevicePixels="True" Margin="1"> <StackPanel 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}" /> <CheckBox x:Name="WPFMicrowinDownloadFromGitHub" Content="Download oscdimg.exe from CTT Github repo" IsChecked="True" Margin="{DynamicResource MicrowinCheckBoxMargin}" />
<TextBlock Margin="5" Padding="1" TextWrapping="Wrap" Foreground="{DynamicResource ComboBoxForegroundColor}"> <TextBlock Margin="5" Padding="1" TextWrapping="Wrap" Foreground="{DynamicResource ComboBoxForegroundColor}">
Choose a Windows ISO file that you've downloaded <LineBreak/> Choose a Windows ISO file that you've downloaded <LineBreak/>
@ -1342,8 +1316,46 @@
</Button.Content> </Button.Content>
</Button> </Button>
</StackPanel> </StackPanel>
<!-- Visibility="Hidden" --> <!-- Visibility="Hidden" -->
<StackPanel Name="MicrowinOptionsPanel" HorizontalAlignment="Left" SnapsToDevicePixels="True" Margin="1" 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="&#xE76B;"
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> <TextBlock Margin="6" Padding="1" TextWrapping="Wrap">Choose Windows SKU</TextBlock>
<ComboBox x:Name = "MicrowinWindowsFlavors" Margin="1" /> <ComboBox x:Name = "MicrowinWindowsFlavors" Margin="1" />
<Rectangle Fill="{DynamicResource MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/> <Rectangle Fill="{DynamicResource MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
@ -1371,7 +1383,7 @@
Foreground="{DynamicResource LabelboxForegroundColor}" Foreground="{DynamicResource LabelboxForegroundColor}"
MaxLength="20" 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}" <PasswordBox Name="MicrowinUserPassword" Background="Transparent" BorderThickness="1" BorderBrush="{DynamicResource MainForegroundColor}"
Margin="6" Margin="6"
PasswordChar="*" PasswordChar="*"
@ -1395,11 +1407,17 @@
Grid.Row="0" Grid.Column="1"> Grid.Row="0" Grid.Column="1">
<StackPanel HorizontalAlignment="Left" Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True" Visibility="Visible"> <StackPanel HorizontalAlignment="Left" Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True" Visibility="Visible">
<Grid Name = "BusyMessage" Visibility="Collapsed"> <StackPanel x:Name="MicrowinBusyIndicator" Orientation="Horizontal" Margin="15,15,15,0">
<TextBlock Name = "BusyText" Text="NBusy" Padding="22,2,1,1" /> <TextBlock x:Name="BusyIcon" FontFamily="Segoe MDL2 Assets" Text="&#xE701;"
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="Segoe MDL2 Assets" Margin="0,0,8,2"
FontSize="{DynamicResource IconFontSize}" Margin="16,0,0,0">&#xE701;</TextBlock> FontSize="16"
</Grid> VerticalAlignment="Center"
Foreground="{DynamicResource MicrowinBusyColor}"/>
<TextBlock x:Name="BusyText" Text="Microwin"
VerticalAlignment="Center"
TextTrimming="CharacterEllipsis"
Foreground="{DynamicResource MicrowinBusyColor}"/>
</StackPanel>
<TextBlock x:Name = "asciiTextBlock" <TextBlock x:Name = "asciiTextBlock"
xml:space ="preserve" xml:space ="preserve"