Compare commits

..

14 Commits

Author SHA1 Message Date
72c23823b2 Deploying to main from @ ChrisTitusTech/winutil@4e1ce7e417 🚀 2025-01-11 15:30:55 +00:00
4e1ce7e417 Bump jinja2 from 3.1.4 to 3.1.5 in /.github (#3126)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.4...3.1.5)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-10 13:42:46 -06:00
1dd0367417 Add timestamp server to code signature (#3139)
Co-authored-by: maxi322 <maxi322@users.noreply.github.com>
2025-01-10 13:41:54 -06:00
201f24c76e [FEAT] Remove Start Menu Recommendations / Fix GetToggle Logic (#3089)
* add WPFToggleRemoveRecommended

- add WPFToggleStartMenuRecommendations
- add reg entrys to modify for toggle
- add non working link bc devdocs are broken in general

* add iseducationenvironment notice

* improve handling if entry does not exist

- add DefaultState property
- add handler for DefaultState in Get-WinUtilToggleStatus

* remove helper console logs

* fix search defaultstate

* added missing default states
2025-01-10 13:41:26 -06:00
9183e92692 [MicroWin] Preparation for 2025 (#3066)
* Set Boot Manager entry timeout to 0

Fixes #2562

* Exclude Windows Hello stuff from package removal

* Obscure passwords with Base64 and fix indentation

Fixes #3064

* Fix name of excluded package

* Update comment

It reflects my feelings towards Microsoft when it comes to security a lot better

* Remove jargon of scratch directory options

* Package exclusion improvements

- Removed AppX packages from OS package exclusion list
- Added exclusion of PowerShell ISE (source: Discord server - yes, some people still use the PowerShell ISE)

* Exclude Windows Photo Viewer from dir removal

* Improve copy operation to Ventoy drives

This change may fix the issues where there's a conflict between both Ventoy's and MicroWin's unattended answer files, causing target images to stop working as expected during OOBE

* Add VirtIO functionality and more enhancements

- Added the ability to grab VirtIO Guest Tools
- Modified the description of the Copy ISO files function because it basically had nonsense

* Fix typo (#3104)

* Access specific property of ISO image object

Only show the ISO path. No one is interested in the storage type

* Add detections for expedited app removal

They only affect 24H2 and newer. Earlier releases don't have these expedited apps

* Update message

* Add VirtIO instructions to MicroWin page

* Add DISM command fallback

This fallback is triggered if an exception occurs while getting information with the cmdlets (I couldn't test this on my host as everything magically works now - sometimes it threw the Class not registered error)

* Exclude OpenSSH from package removal

Some people need this to avoid installing third-party programs like PuTTY

* Fixed some more indentation
2025-01-10 13:40:25 -06:00
fa9dbcace4 Move Installer for OpenSSH to a runspace (#3117) 2025-01-10 13:39:21 -06:00
02f0f85c25 Deploying to main from @ ChrisTitusTech/winutil@83ae0579ba 🚀 2025-01-09 15:32:34 +00:00
83ae0579ba Deploying to main from @ ChrisTitusTech/winutil@5ebcacf404 🚀 2025-01-06 15:31:53 +00:00
5ebcacf404 Deploying to main from @ ChrisTitusTech/winutil@28bea518f0 🚀 2024-12-31 15:31:36 +00:00
28bea518f0 Add exception catch for Unauthorized Access (#3114) 2024-12-28 15:38:40 -06:00
61c2e39ddb Deploying to main from @ ChrisTitusTech/winutil@0dfa9617fc 🚀 2024-12-27 15:31:18 +00:00
0dfa9617fc Deploying to main from @ ChrisTitusTech/winutil@2ce4f54b80 🚀 2024-12-26 15:31:44 +00:00
2ce4f54b80 Deploying to main from @ ChrisTitusTech/winutil@a05556a896 🚀 2024-12-17 15:34:08 +00:00
a05556a896 Deploying to main from @ ChrisTitusTech/winutil@985d415db1 🚀 2024-12-16 15:34:05 +00:00
14 changed files with 346 additions and 100 deletions

View File

@ -15,7 +15,7 @@ gitdb==4.0.11
GitPython==3.1.43 GitPython==3.1.43
htmlmin2==0.1.13 htmlmin2==0.1.13
idna==3.7 idna==3.7
Jinja2==3.1.4 Jinja2==3.1.5
jsmin==3.0.1 jsmin==3.0.1
Markdown==3.6 Markdown==3.6
MarkupSafe==2.1.5 MarkupSafe==2.1.5

View File

@ -60,7 +60,7 @@ jobs:
run: | run: |
$cert = Get-ChildItem -Path Cert:\CurrentUser\My -CodeSigningCert | Select-Object -First 1 $cert = Get-ChildItem -Path Cert:\CurrentUser\My -CodeSigningCert | Select-Object -First 1
if ($null -eq $cert) { throw "Code signing certificate not found" } if ($null -eq $cert) { throw "Code signing certificate not found" }
Set-AuthenticodeSignature -FilePath ./winutil.ps1 -Certificate $cert Set-AuthenticodeSignature -FilePath ./winutil.ps1 -Certificate $cert -TimeStampServer "http://timestamp.digicert.com"
- name: Verify code signature - name: Verify code signature
shell: pwsh shell: pwsh

View File

@ -52,7 +52,7 @@ If you have Issues, refer to [Known Issues](https://christitustech.github.io/win
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;avatars.githubusercontent.com&#x2F;u&#x2F;39857764?u&#x3D;5dbda638f45530582eee1703b4473f2a5e229e28&amp;v&#x3D;4" width="60px" alt="TriHydera" /></a><a href="https://github.com/jozozovko"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;3272468?u&#x3D;4391ed4655e4fd8b56e23b4169e44e2ac9b6cd97&amp;v&#x3D;4" width="60px" alt="" /></a><a href="https://github.com/DelDongo"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;127976398?v&#x3D;4" width="60px" alt="" /></a><a href="https://github.com/markamos"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;9561861?u&#x3D;3cca179dcff0413538591e57a3abea116d65ce56&amp;v&#x3D;4" width="60px" alt="Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;54533224?u&#x3D;a49ea000a8f52adb31382ea69a1a7501b27fefdd&amp;v&#x3D;4" width="60px" alt="" /></a><a href="https://github.com/mews-se"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;58894405?v&#x3D;4" width="60px" alt="" /></a><a href="https://github.com/jdiegmueller"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;18660571?u&#x3D;601d0a23040a271c86b5d40339f899a6dbf27086&amp;v&#x3D;4" width="60px" alt="Jason A. Diegmueller" /></a><a href="https://github.com/AlanTristar"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;105566568?v&#x3D;4" width="60px" alt="" /></a><a href="https://github.com/zepled112"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;65176625?v&#x3D;4" width="60px" alt="wyatt" /></a><a href="https://github.com/altugtekiner"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;105917451?u&#x3D;ee73ff639c7bd9feb4708ab4ba7b14eff80196f7&amp;v&#x3D;4" width="60px" alt="" /></a><a href="https://github.com/robertsandrock"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;12015331?u&#x3D;76849d3cb36b420922d235299558e00a09f2f8b4&amp;v&#x3D;4" width="60px" alt="RMS" /></a><a href="https://github.com/mmomega"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;71956566?v&#x3D;4" width="60px" alt="" /></a><a href="https://github.com/KenichiQaz"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;31177857?u&#x3D;efdbae734a4c60a7bb95df4659d0535e60a6fd57&amp;v&#x3D;4" width="60px" alt="Stefan" /></a><a href="https://github.com/paulsheets"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;45240946?u&#x3D;d4db66f8e8d7a2606fe7a5521daf48ca9f097105&amp;v&#x3D;4" width="60px" alt="Paul" /></a><a href="https://github.com/djones369"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;4107092?v&#x3D;4" width="60px" alt="Dave Jones" /></a><a href="https://github.com/anthonymendez"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;19240897?u&#x3D;f82b4be098cac65c8421421b70ebd2d1da85c67e&amp;v&#x3D;4" width="60px" alt="Anthony Mendez" /></a><a href="https://github.com/claudemods"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;73653396?u&#x3D;d64c656fb8db24ef56bb000197532df9b618d06c&amp;v&#x3D;4" width="60px" alt="Claudemods" /></a><a href="https://github.com/FatBastard0"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;173957728?v&#x3D;4" width="60px" alt="" /></a><a href="https://github.com/Ascent7910"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;118260621?v&#x3D;4" width="60px" alt="Max" /></a><a href="https://github.com/DursleyGuy"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;140165544?v&#x3D;4" width="60px" alt="DursleyGuy" /></a><a href="https://github.com/YamiSandman616"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;183505690?u&#x3D;c3bd20157058b6215e28f7568d4f8c4fbbe92838&amp;v&#x3D;4" width="60px" alt="Sandman616" /></a><a href="https://github.com/realmuddy"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;30978236?v&#x3D;4" width="60px" alt="Phillip Waters" /></a><a href="https://github.com/quaszi"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;51266738?u&#x3D;2e3185214607e51239c5969c866ddd5eb1bdee48&amp;v&#x3D;4" width="60px" alt="" /></a><a href="https://github.com/Psyhackological"><img src="https:&#x2F;&#x2F;avatars.githubusercontent.com&#x2F;u&#x2F;47569716?u&#x3D;66dc5e86731eaf8c6bc78a1bff34420ed2e5402b&amp;v&#x3D;4" width="60px" alt="Konrad Konieczny" /></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/jozozovko"><img src="https:&#x2F;&#x2F;github.com&#x2F;jozozovko.png" width="60px" alt="User avatar: " /></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/AlanTristar"><img src="https:&#x2F;&#x2F;github.com&#x2F;AlanTristar.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/zepled112"><img src="https:&#x2F;&#x2F;github.com&#x2F;zepled112.png" width="60px" alt="User avatar: wyatt" /></a><a href="https://github.com/altugtekiner"><img src="https:&#x2F;&#x2F;github.com&#x2F;altugtekiner.png" width="60px" alt="User avatar: " /></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 Jones" /></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/claudemods"><img src="https:&#x2F;&#x2F;github.com&#x2F;claudemods.png" width="60px" alt="User avatar: Claudemods" /></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/Ascent7910"><img src="https:&#x2F;&#x2F;github.com&#x2F;Ascent7910.png" width="60px" alt="User avatar: Max" /></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/YamiSandman616"><img src="https:&#x2F;&#x2F;github.com&#x2F;YamiSandman616.png" width="60px" alt="User avatar: Sandman616" /></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/EgoRaInevitable"><img src="https:&#x2F;&#x2F;github.com&#x2F;EgoRaInevitable.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/Unambiguous"><img src="https:&#x2F;&#x2F;github.com&#x2F;Unambiguous.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/Freestyler589"><img src="https:&#x2F;&#x2F;github.com&#x2F;Freestyler589.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/EA-1356"><img src="https:&#x2F;&#x2F;github.com&#x2F;EA-1356.png" width="60px" alt="User avatar: meris" /></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

@ -3301,6 +3301,7 @@
"Name": "AppsUseLightTheme", "Name": "AppsUseLightTheme",
"Value": "0", "Value": "0",
"OriginalValue": "1", "OriginalValue": "1",
"DefaultState": "false",
"Type": "DWord" "Type": "DWord"
}, },
{ {
@ -3308,6 +3309,7 @@
"Name": "SystemUsesLightTheme", "Name": "SystemUsesLightTheme",
"Value": "0", "Value": "0",
"OriginalValue": "1", "OriginalValue": "1",
"DefaultState": "false",
"Type": "DWord" "Type": "DWord"
} }
], ],
@ -3342,6 +3344,7 @@
"Name": "BingSearchEnabled", "Name": "BingSearchEnabled",
"Value": "1", "Value": "1",
"OriginalValue": "0", "OriginalValue": "0",
"DefaultState": "true",
"Type": "DWord" "Type": "DWord"
} }
], ],
@ -3360,6 +3363,7 @@
"Name": "InitialKeyboardIndicators", "Name": "InitialKeyboardIndicators",
"Value": "2", "Value": "2",
"OriginalValue": "0", "OriginalValue": "0",
"DefaultState": "false",
"Type": "DWord" "Type": "DWord"
}, },
{ {
@ -3367,6 +3371,7 @@
"Name": "InitialKeyboardIndicators", "Name": "InitialKeyboardIndicators",
"Value": "2", "Value": "2",
"OriginalValue": "0", "OriginalValue": "0",
"DefaultState": "false",
"Type": "DWord" "Type": "DWord"
} }
], ],
@ -3385,17 +3390,53 @@
"Name": "VerboseStatus", "Name": "VerboseStatus",
"Value": "1", "Value": "1",
"OriginalValue": "0", "OriginalValue": "0",
"DefaultState": "false",
"Type": "DWord" "Type": "DWord"
} }
], ],
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/VerboseLogon" "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/VerboseLogon"
}, },
"WPFToggleStartMenuRecommendations": {
"Content": "Recommendations in Start Menu",
"Description": "If disabled then you will not see recommendations in the Start Menu. | Enables 'iseducationenvironment' | Relogin Required.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a104_",
"Type": "Toggle",
"registry": [
{
"Path": "HKLM:\\SOFTWARE\\Microsoft\\PolicyManager\\current\\device\\Start",
"Name": "HideRecommendedSection",
"Value": "0",
"OriginalValue": "1",
"DefaultState": "true",
"Type": "DWord"
},
{
"Path": "HKLM:\\SOFTWARE\\Microsoft\\PolicyManager\\current\\device\\Education",
"Name": "IsEducationEnvironment",
"Value": "0",
"OriginalValue": "1",
"DefaultState": "true",
"Type": "DWord"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer",
"Name": "HideRecommendedSection",
"Value": "0",
"OriginalValue": "1",
"DefaultState": "true",
"Type": "DWord"
}
],
"link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/WPFToggleStartMenuRecommendations"
},
"WPFToggleSnapWindow": { "WPFToggleSnapWindow": {
"Content": "Snap Window", "Content": "Snap Window",
"Description": "If enabled you can align windows by dragging them. | Relogin Required", "Description": "If enabled you can align windows by dragging them. | Relogin Required",
"category": "Customize Preferences", "category": "Customize Preferences",
"panel": "2", "panel": "2",
"Order": "a104_", "Order": "a105_",
"Type": "Toggle", "Type": "Toggle",
"registry": [ "registry": [
{ {
@ -3403,6 +3444,7 @@
"Name": "WindowArrangementActive", "Name": "WindowArrangementActive",
"Value": "1", "Value": "1",
"OriginalValue": "0", "OriginalValue": "0",
"DefaultState": "true",
"Type": "String" "Type": "String"
} }
], ],
@ -3413,7 +3455,7 @@
"Description": "If enabled then Snap preview is disabled when maximize button is hovered.", "Description": "If enabled then Snap preview is disabled when maximize button is hovered.",
"category": "Customize Preferences", "category": "Customize Preferences",
"panel": "2", "panel": "2",
"Order": "a105_", "Order": "a106_",
"Type": "Toggle", "Type": "Toggle",
"registry": [ "registry": [
{ {
@ -3421,6 +3463,7 @@
"Name": "EnableSnapAssistFlyout", "Name": "EnableSnapAssistFlyout",
"Value": "1", "Value": "1",
"OriginalValue": "0", "OriginalValue": "0",
"DefaultState": "true",
"Type": "DWord" "Type": "DWord"
} }
], ],
@ -3441,7 +3484,7 @@
"Description": "If enabled then you will get suggestions to snap other applications in the left over spaces.", "Description": "If enabled then you will get suggestions to snap other applications in the left over spaces.",
"category": "Customize Preferences", "category": "Customize Preferences",
"panel": "2", "panel": "2",
"Order": "a106_", "Order": "a107_",
"Type": "Toggle", "Type": "Toggle",
"registry": [ "registry": [
{ {
@ -3449,6 +3492,7 @@
"Name": "SnapAssist", "Name": "SnapAssist",
"Value": "1", "Value": "1",
"OriginalValue": "0", "OriginalValue": "0",
"DefaultState": "true",
"Type": "DWord" "Type": "DWord"
} }
], ],
@ -3469,7 +3513,7 @@
"Description": "If Enabled then Cursor movement is affected by the speed of your physical mouse movements.", "Description": "If Enabled then Cursor movement is affected by the speed of your physical mouse movements.",
"category": "Customize Preferences", "category": "Customize Preferences",
"panel": "2", "panel": "2",
"Order": "a107_", "Order": "a108_",
"Type": "Toggle", "Type": "Toggle",
"registry": [ "registry": [
{ {
@ -3477,6 +3521,7 @@
"Name": "MouseSpeed", "Name": "MouseSpeed",
"Value": "1", "Value": "1",
"OriginalValue": "0", "OriginalValue": "0",
"DefaultState": "true",
"Type": "DWord" "Type": "DWord"
}, },
{ {
@ -3484,6 +3529,7 @@
"Name": "MouseThreshold1", "Name": "MouseThreshold1",
"Value": "6", "Value": "6",
"OriginalValue": "0", "OriginalValue": "0",
"DefaultState": "true",
"Type": "DWord" "Type": "DWord"
}, },
{ {
@ -3491,6 +3537,7 @@
"Name": "MouseThreshold2", "Name": "MouseThreshold2",
"Value": "10", "Value": "10",
"OriginalValue": "0", "OriginalValue": "0",
"DefaultState": "true",
"Type": "DWord" "Type": "DWord"
} }
], ],
@ -3501,7 +3548,7 @@
"Description": "If Enabled then Sticky Keys is activated - Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury.", "Description": "If Enabled then Sticky Keys is activated - Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury.",
"category": "Customize Preferences", "category": "Customize Preferences",
"panel": "2", "panel": "2",
"Order": "a108_", "Order": "a109_",
"Type": "Toggle", "Type": "Toggle",
"registry": [ "registry": [
{ {
@ -3509,6 +3556,7 @@
"Name": "Flags", "Name": "Flags",
"Value": "510", "Value": "510",
"OriginalValue": "58", "OriginalValue": "58",
"DefaultState": "true",
"Type": "DWord" "Type": "DWord"
} }
], ],
@ -3527,6 +3575,7 @@
"Name": "Hidden", "Name": "Hidden",
"Value": "1", "Value": "1",
"OriginalValue": "0", "OriginalValue": "0",
"DefaultState": "false",
"Type": "DWord" "Type": "DWord"
} }
], ],
@ -3555,6 +3604,7 @@
"Name": "HideFileExt", "Name": "HideFileExt",
"Value": "0", "Value": "0",
"OriginalValue": "1", "OriginalValue": "1",
"DefaultState": "false",
"Type": "DWord" "Type": "DWord"
} }
], ],
@ -3583,6 +3633,7 @@
"Name": "SearchboxTaskbarMode", "Name": "SearchboxTaskbarMode",
"Value": "1", "Value": "1",
"OriginalValue": "0", "OriginalValue": "0",
"DefaultState": "true",
"Type": "DWord" "Type": "DWord"
} }
], ],
@ -3601,6 +3652,7 @@
"Name": "ShowTaskViewButton", "Name": "ShowTaskViewButton",
"Value": "1", "Value": "1",
"OriginalValue": "0", "OriginalValue": "0",
"DefaultState": "true",
"Type": "DWord" "Type": "DWord"
} }
], ],
@ -3619,6 +3671,7 @@
"Name": "TaskbarDa", "Name": "TaskbarDa",
"Value": "1", "Value": "1",
"OriginalValue": "0", "OriginalValue": "0",
"DefaultState": "true",
"Type": "DWord" "Type": "DWord"
} }
], ],
@ -3637,6 +3690,7 @@
"Name": "TaskbarAl", "Name": "TaskbarAl",
"Value": "1", "Value": "1",
"OriginalValue": "0", "OriginalValue": "0",
"DefaultState": "true",
"Type": "DWord" "Type": "DWord"
} }
], ],
@ -3655,6 +3709,7 @@
"Name": "DisplayParameters", "Name": "DisplayParameters",
"Value": "1", "Value": "1",
"OriginalValue": "0", "OriginalValue": "0",
"DefaultState": "false",
"Type": "DWord" "Type": "DWord"
}, },
{ {
@ -3662,6 +3717,7 @@
"Name": "DisableEmoticon", "Name": "DisableEmoticon",
"Value": "1", "Value": "1",
"OriginalValue": "0", "OriginalValue": "0",
"DefaultState": "false",
"Type": "DWord" "Type": "DWord"
} }
], ],

View File

@ -163,12 +163,12 @@ public class PowerManagement {
} }
Write-Host "Remove Features from the image" Write-Host "Remove Features from the image"
Microwin-RemoveFeatures Microwin-RemoveFeatures -UseCmdlets $true
Write-Host "Removing features complete!" Write-Host "Removing features complete!"
Write-Host "Removing OS packages" Write-Host "Removing OS packages"
Microwin-RemovePackages Microwin-RemovePackages -UseCmdlets $true
Write-Host "Removing Appx Bloat" Write-Host "Removing Appx Bloat"
Microwin-RemoveProvisionedPackages Microwin-RemoveProvisionedPackages -UseCmdlets $true
# Detect Windows 11 24H2 and add dependency to FileExp to prevent Explorer look from going back - thanks @WitherOrNot and @thecatontheceiling # Detect Windows 11 24H2 and add dependency to FileExp to prevent Explorer look from going back - thanks @WitherOrNot and @thecatontheceiling
if ((Microwin-TestCompatibleImage $imgVersion $([System.Version]::new(10,0,26100,1))) -eq $true) { if ((Microwin-TestCompatibleImage $imgVersion $([System.Version]::new(10,0,26100,1))) -eq $true) {

View File

@ -3,14 +3,21 @@ function Microwin-RemoveFeatures() {
.SYNOPSIS .SYNOPSIS
Removes certain features from ISO image Removes certain features from ISO image
.PARAMETER Name .PARAMETER UseCmdlets
No Params Determines whether or not to use the DISM cmdlets for processing.
- If true, DISM cmdlets will be used
- If false, calls to the DISM executable will be made whilst selecting bits and pieces from the output as a string (that was how MicroWin worked before
the DISM conversion to cmdlets)
.EXAMPLE .EXAMPLE
Microwin-RemoveFeatures Microwin-RemoveFeatures -UseCmdlets $true
#> #>
param (
[Parameter(Mandatory = $true, Position = 0)] [bool]$UseCmdlets
)
try { try {
$featlist = (Get-WindowsOptionalFeature -Path $scratchDir) if ($UseCmdlets) {
$featlist = (Get-WindowsOptionalFeature -Path "$scratchDir")
$featlist = $featlist | Where-Object { $featlist = $featlist | Where-Object {
$_.FeatureName -NotLike "*Defender*" -AND $_.FeatureName -NotLike "*Defender*" -AND
@ -24,17 +31,52 @@ function Microwin-RemoveFeatures() {
$_.FeatureName -NotLike "*RemoteDesktop*" -AND $_.FeatureName -NotLike "*RemoteDesktop*" -AND
$_.State -ne "Disabled" $_.State -ne "Disabled"
} }
} else {
$featList = dism /english /image="$scratchDir" /get-features | Select-String -Pattern "Feature Name : " -CaseSensitive -SimpleMatch
if ($?) {
$featList = $featList -split "Feature Name : " | Where-Object {$_}
# Exclude the same items. Note: for now, this doesn't exclude those features that are disabled.
# This will appear in the future
$featList = $featList | Where-Object {
$_ -NotLike "*Defender*" -AND
$_ -NotLike "*Printing*" -AND
$_ -NotLike "*TelnetClient*" -AND
$_ -NotLike "*PowerShell*" -AND
$_ -NotLike "*NetFx*" -AND
$_ -NotLike "*Media*" -AND
$_ -NotLike "*NFS*" -AND
$_ -NotLike "*SearchEngine*" -AND
$_ -NotLike "*RemoteDesktop*"
}
} else {
Write-Host "Features could not be obtained with DISM. MicroWin processing will continue, but features will be skipped."
return
}
}
foreach($feature in $featlist) { if ($UseCmdlets) {
foreach ($feature in $featList) {
$status = "Removing feature $($feature.FeatureName)" $status = "Removing feature $($feature.FeatureName)"
Write-Progress -Activity "Removing features" -Status $status -PercentComplete ($counter++/$featlist.Count*100) Write-Progress -Activity "Removing features" -Status $status -PercentComplete ($counter++/$featlist.Count*100)
Write-Debug "Removing feature $($feature.FeatureName)" Write-Debug "Removing feature $($feature.FeatureName)"
Disable-WindowsOptionalFeature -Path "$scratchDir" -FeatureName $($feature.FeatureName) -Remove -ErrorAction SilentlyContinue -NoRestart Disable-WindowsOptionalFeature -Path "$scratchDir" -FeatureName $($feature.FeatureName) -Remove -ErrorAction SilentlyContinue -NoRestart
} }
} else {
foreach ($feature in $featList) {
$status = "Removing feature $feature"
Write-Progress -Activity "Removing features" -Status $status -PercentComplete ($counter++/$featlist.Count*100)
Write-Debug "Removing feature $feature"
dism /english /image="$scratchDir" /disable-feature /featurename=$feature /remove /quiet /norestart | Out-Null
if ($? -eq $false) {
Write-Host "Feature $feature could not be disabled."
}
}
}
Write-Progress -Activity "Removing features" -Status "Ready" -Completed Write-Progress -Activity "Removing features" -Status "Ready" -Completed
Write-Host "You can re-enable the disabled features at any time, using either Windows Update or the SxS folder in <installation media>\Sources." Write-Host "You can re-enable the disabled features at any time, using either Windows Update or the SxS folder in <installation media>\Sources."
} catch { } catch {
Write-Host "Unable to get information about the features. MicroWin processing will continue, but features will not be processed" Write-Host "Unable to get information about the features. A fallback will be used..."
Write-Host "Error information: $($_.Exception.Message)" -ForegroundColor Yellow Write-Host "Error information: $($_.Exception.Message)" -ForegroundColor Yellow
Microwin-RemoveFeatures -UseCmdlets $false
} }
} }

View File

@ -1,5 +1,22 @@
function Microwin-RemovePackages { function Microwin-RemovePackages {
<#
.SYNOPSIS
Removes certain packages from ISO image
.PARAMETER UseCmdlets
Determines whether or not to use the DISM cmdlets for processing.
- If true, DISM cmdlets will be used
- If false, calls to the DISM executable will be made whilst selecting bits and pieces from the output as a string (that was how MicroWin worked before
the DISM conversion to cmdlets)
.EXAMPLE
Microwin-RemovePackages -UseCmdlets $true
#>
param (
[Parameter(Mandatory = $true, Position = 0)] [bool]$UseCmdlets
)
try { try {
if ($useCmdlets) {
$pkglist = (Get-WindowsPackage -Path "$scratchDir").PackageName $pkglist = (Get-WindowsPackage -Path "$scratchDir").PackageName
$pkglist = $pkglist | Where-Object { $pkglist = $pkglist | Where-Object {
@ -18,9 +35,40 @@ function Microwin-RemovePackages {
$_ -NotLike "*VBSCRIPT*" -AND $_ -NotLike "*VBSCRIPT*" -AND
$_ -NotLike "*License*" -AND $_ -NotLike "*License*" -AND
$_ -NotLike "*Hello-Face*" -AND $_ -NotLike "*Hello-Face*" -AND
$_ -NotLike "*ISE*" $_ -NotLike "*ISE*" -AND
$_ -NotLike "*OpenSSH*"
}
} else {
$pkgList = dism /english /image="$scratchDir" /get-packages | Select-String -Pattern "Package Identity : " -CaseSensitive -SimpleMatch
if ($?) {
$pkgList = $pkgList -split "Package Identity : " | Where-Object {$_}
# Exclude the same items.
$pkgList = $pkgList | Where-Object {
$_ -NotLike "*ApplicationModel*" -AND
$_ -NotLike "*indows-Client-LanguagePack*" -AND
$_ -NotLike "*LanguageFeatures-Basic*" -AND
$_ -NotLike "*Package_for_ServicingStack*" -AND
$_ -NotLike "*DotNet*" -AND
$_ -NotLike "*Notepad*" -AND
$_ -NotLike "*WMIC*" -AND
$_ -NotLike "*Ethernet*" -AND
$_ -NotLike "*Wifi*" -AND
$_ -NotLike "*FodMetadata*" -AND
$_ -NotLike "*Foundation*" -AND
$_ -NotLike "*LanguageFeatures*" -AND
$_ -NotLike "*VBSCRIPT*" -AND
$_ -NotLike "*License*" -AND
$_ -NotLike "*Hello-Face*" -AND
$_ -NotLike "*ISE*" -AND
$_ -NotLike "*OpenSSH*"
}
} else {
Write-Host "Packages could not be obtained with DISM. MicroWin processing will continue, but packages will be skipped."
return
}
} }
if ($UseCmdlets) {
$failedCount = 0 $failedCount = 0
$erroredPackages = [System.Collections.Generic.List[ErroredPackage]]::new() $erroredPackages = [System.Collections.Generic.List[ErroredPackage]]::new()
@ -37,8 +85,19 @@ function Microwin-RemovePackages {
continue continue
} }
} }
} else {
foreach ($package in $pkgList) {
$status = "Removing package $package"
Write-Progress -Activity "Removing features" -Status $status -PercentComplete ($counter++/$featlist.Count*100)
Write-Debug "Removing package $package"
dism /english /image="$scratchDir" /remove-package /packagename=$package /remove /quiet /norestart | Out-Null
if ($? -eq $false) {
Write-Host "Package $package could not be removed."
}
}
}
Write-Progress -Activity "Removing Packages" -Status "Ready" -Completed Write-Progress -Activity "Removing Packages" -Status "Ready" -Completed
if ($failedCount -gt 0) if ($UseCmdlets -and $failedCount -gt 0)
{ {
Write-Host "$failedCount package(s) could not be removed. Your image will still work fine, however. Below is information on what packages failed to be removed and why." Write-Host "$failedCount package(s) could not be removed. Your image will still work fine, however. Below is information on what packages failed to be removed and why."
if ($erroredPackages.Count -gt 0) if ($erroredPackages.Count -gt 0)
@ -63,7 +122,8 @@ function Microwin-RemovePackages {
} }
} }
} catch { } catch {
Write-Host "Unable to get information about the packages. MicroWin processing will continue, but packages will not be processed" Write-Host "Unable to get information about the packages. A fallback will be used..."
Write-Host "Error information: $($_.Exception.Message)" -ForegroundColor Yellow Write-Host "Error information: $($_.Exception.Message)" -ForegroundColor Yellow
Microwin-RemovePackages -UseCmdlets $false
} }
} }

View File

@ -3,14 +3,21 @@ function Microwin-RemoveProvisionedPackages() {
.SYNOPSIS .SYNOPSIS
Removes AppX packages from a Windows image during MicroWin processing Removes AppX packages from a Windows image during MicroWin processing
.PARAMETER Name .PARAMETER UseCmdlets
No Params Determines whether or not to use the DISM cmdlets for processing.
- If true, DISM cmdlets will be used
- If false, calls to the DISM executable will be made whilst selecting bits and pieces from the output as a string (that was how MicroWin worked before
the DISM conversion to cmdlets)
.EXAMPLE .EXAMPLE
Microwin-RemoveProvisionedPackages Microwin-RemoveProvisionedPackages
#> #>
param (
[Parameter(Mandatory = $true, Position = 0)] [bool]$UseCmdlets
)
try try
{ {
if ($UseCmdlets) {
$appxProvisionedPackages = Get-AppxProvisionedPackage -Path "$($scratchDir)" | Where-Object { $appxProvisionedPackages = Get-AppxProvisionedPackage -Path "$($scratchDir)" | Where-Object {
$_.PackageName -NotLike "*AppInstaller*" -AND $_.PackageName -NotLike "*AppInstaller*" -AND
$_.PackageName -NotLike "*Store*" -and $_.PackageName -NotLike "*Store*" -and
@ -28,8 +35,36 @@ function Microwin-RemoveProvisionedPackages() {
$_.PackageName -NotLike "*SecHealthUI*" -and $_.PackageName -NotLike "*SecHealthUI*" -and
$_.PackageName -NotLike "*ScreenSketch*" $_.PackageName -NotLike "*ScreenSketch*"
} }
} else {
$appxProvisionedPackages = dism /english /image="$scratchDir" /get-provisionedappxpackages | Select-String -Pattern "PackageName : " -CaseSensitive -SimpleMatch
if ($?) {
$appxProvisionedPackages = $appxProvisionedPackages -split "PackageName : " | Where-Object {$_}
# Exclude the same items.
$appxProvisionedPackages = $appxProvisionedPackages | Where-Object {
$_ -NotLike "*AppInstaller*" -AND
$_ -NotLike "*Store*" -and
$_ -NotLike "*Notepad*" -and
$_ -NotLike "*Printing*" -and
$_ -NotLike "*YourPhone*" -and
$_ -NotLike "*Xbox*" -and
$_ -NotLike "*WindowsTerminal*" -and
$_ -NotLike "*Calculator*" -and
$_ -NotLike "*Photos*" -and
$_ -NotLike "*VCLibs*" -and
$_ -NotLike "*Paint*" -and
$_ -NotLike "*Gaming*" -and
$_ -NotLike "*Extension*" -and
$_ -NotLike "*SecHealthUI*" -and
$_ -NotLike "*ScreenSketch*"
}
} else {
Write-Host "AppX packages could not be obtained with DISM. MicroWin processing will continue, but AppX packages will be skipped."
return
}
}
$counter = 0 $counter = 0
if ($UseCmdlets) {
foreach ($appx in $appxProvisionedPackages) { foreach ($appx in $appxProvisionedPackages) {
$status = "Removing Provisioned $($appx.PackageName)" $status = "Removing Provisioned $($appx.PackageName)"
Write-Progress -Activity "Removing Provisioned Apps" -Status $status -PercentComplete ($counter++/$appxProvisionedPackages.Count*100) Write-Progress -Activity "Removing Provisioned Apps" -Status $status -PercentComplete ($counter++/$appxProvisionedPackages.Count*100)
@ -40,12 +75,22 @@ function Microwin-RemoveProvisionedPackages() {
continue continue
} }
} }
} else {
foreach ($appx in $appxProvisionedPackages) {
$status = "Removing Provisioned $appx"
Write-Progress -Activity "Removing Provisioned Apps" -Status $status -PercentComplete ($counter++/$appxProvisionedPackages.Count*100)
dism /english /image="$scratchDir" /remove-provisionedappxpackage /packagename=$appx /quiet /norestart | Out-Null
if ($? -eq $false) {
Write-Host "AppX package $appx could not be removed."
}
}
}
Write-Progress -Activity "Removing Provisioned Apps" -Status "Ready" -Completed Write-Progress -Activity "Removing Provisioned Apps" -Status "Ready" -Completed
} }
catch catch
{ {
# This can happen if getting AppX packages fails Write-Host "Unable to get information about the AppX packages. A fallback will be used..."
Write-Host "Unable to get information about the AppX packages. MicroWin processing will continue, but AppX packages will not be processed"
Write-Host "Error information: $($_.Exception.Message)" -ForegroundColor Yellow Write-Host "Error information: $($_.Exception.Message)" -ForegroundColor Yellow
Microwin-RemoveProvisionedPackages -UseCmdlets $false
} }
} }

View File

@ -35,6 +35,9 @@ Function Get-WinUtilToggleStatus {
foreach ($regentry in $ToggleSwitchReg) { foreach ($regentry in $ToggleSwitchReg) {
try { try {
if (!(Test-Path $regentry.Path)) {
New-Item -Path $regentry.Path -Force | Out-Null
}
$regstate = (Get-ItemProperty -path $regentry.Path).$($regentry.Name) $regstate = (Get-ItemProperty -path $regentry.Path).$($regentry.Name)
if ($regstate -eq $regentry.Value) { if ($regstate -eq $regentry.Value) {
$count += 1 $count += 1
@ -42,8 +45,23 @@ Function Get-WinUtilToggleStatus {
} else { } else {
Write-Debug "$($regentry.Name) is false (state: $regstate, value: $($regentry.Value), original: $($regentry.OriginalValue))" Write-Debug "$($regentry.Name) is false (state: $regstate, value: $($regentry.Value), original: $($regentry.OriginalValue))"
} }
if (!$regstate) {
switch ($regentry.DefaultState) {
"true" {
$regstate = $regentry.Value
$count += 1
}
"false" {
$regstate = $regentry.OriginalValue
}
default {
Write-Error "Entry for $($regentry.Name) does not exist and no DefaultState is defined."
$regstate = $regentry.OriginalValue
}
}
}
} catch { } catch {
Write-Error "An error occurred while accessing registry entry $($regentry.Path): $_" Write-Error "An unexpected error occurred: $_"
} }
} }

View File

@ -47,6 +47,8 @@ function Set-WinUtilRegistry {
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
} catch [System.Management.Automation.ItemNotFoundException] { } catch [System.Management.Automation.ItemNotFoundException] {
Write-Warning $psitem.Exception.ErrorRecord Write-Warning $psitem.Exception.ErrorRecord
} catch [System.UnauthorizedAccessException]{
Write-Warning $psitem.Exception.Message
} catch { } catch {
Write-Warning "Unable to set $Name due to unhandled exception" Write-Warning "Unable to set $Name due to unhandled exception"
Write-Warning $psitem.Exception.StackTrace Write-Warning $psitem.Exception.StackTrace

View File

@ -59,6 +59,6 @@ function Invoke-WPFButton {
"MicrowinScratchDirBT" {Invoke-ScratchDialog} "MicrowinScratchDirBT" {Invoke-ScratchDialog}
"WPFWinUtilInstallPSProfile" {Invoke-WinUtilInstallPSProfile} "WPFWinUtilInstallPSProfile" {Invoke-WinUtilInstallPSProfile}
"WPFWinUtilUninstallPSProfile" {Invoke-WinUtilUninstallPSProfile} "WPFWinUtilUninstallPSProfile" {Invoke-WinUtilUninstallPSProfile}
"WPFWinUtilSSHServer" {Invoke-WinUtilSSHServer} "WPFWinUtilSSHServer" {Invoke-WPFSSHServer}
} }
} }

View File

@ -0,0 +1,17 @@
function Invoke-WPFSSHServer {
<#
.SYNOPSIS
Invokes the OpenSSH Server install in a runspace
#>
Invoke-WPFRunspace -DebugPreference $DebugPreference -ScriptBlock {
Invoke-WinUtilSSHServer
Write-Host "======================================="
Write-Host "-- OpenSSH Server installed! ---"
Write-Host "======================================="
}
}

View File

@ -1266,7 +1266,13 @@
- Once complete, the target ISO file will be in the directory you have specified <LineBreak/> - Once complete, the target ISO file will be in the directory you have specified <LineBreak/>
- Copy this image to your Ventoy USB Stick, boot to this image, gg - Copy this image to your Ventoy USB Stick, boot to this image, gg
<LineBreak/> <LineBreak/>
If you are injecting drivers ensure you put all your inf, sys, and dll files for each driver into a separate directory If you are injecting drivers ensure you put all your inf, sys, and dll files for each driver into a separate directory <LineBreak/><LineBreak/>
<Bold>Installing VirtIO drivers</Bold><LineBreak/>
If you plan on using your ISO on QEMU/Proxmox VE, you can bundle VirtIO drivers with your ISO to automatically install drivers. Simply tick the "Include VirtIO drivers" checkbox before starting the process. Then, follow these instructions:<LineBreak/><LineBreak/>
<TextBlock TextWrapping="WrapWithOverflow" Margin="15,0,0,0" Text="1. Proceed with Setup until you reach the disk selection screen, in which you won't see any drives" Foreground="{DynamicResource ComboBoxForegroundColor}"/><LineBreak/>
<TextBlock TextWrapping="WrapWithOverflow" Margin="15,0,0,0" Text="2. Click &quot;Load Driver&quot; and click Browse" Foreground="{DynamicResource ComboBoxForegroundColor}"/><LineBreak/>
<TextBlock TextWrapping="WrapWithOverflow" Margin="15,0,0,0" Text="3. In the folder selection dialog, point to this path: &quot;D:\VirtIO\vioscsi\w11\amd64&quot; (replace amd64 with ARM64 if you are using Windows on ARM, and &quot;D:&quot; with the drive letter of the ISO)" Foreground="{DynamicResource ComboBoxForegroundColor}"/><LineBreak/>
<TextBlock TextWrapping="WrapWithOverflow" Margin="15,0,0,0" Text="4. Select all drivers that will appear in the list box and click OK" Foreground="{DynamicResource ComboBoxForegroundColor}"/><LineBreak/>
</TextBlock> </TextBlock>
<TextBlock Margin="15,0,15,15" <TextBlock Margin="15,0,15,15"
Padding = "1" Padding = "1"
@ -1277,7 +1283,7 @@
Foreground = "{DynamicResource ComboBoxForegroundColor}" Foreground = "{DynamicResource ComboBoxForegroundColor}"
xml:space = "preserve" xml:space = "preserve"
> >
<Bold>Example:</Bold> <Bold>Driver structure example:</Bold>
C:\drivers\ C:\drivers\
|-- Driver1\ |-- Driver1\
| |-- Driver1.inf | |-- Driver1.inf