mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-15 17:30:37 -06:00
Compare commits
25 Commits
77e5c254a5
...
50cb1be797
Author | SHA1 | Date | |
---|---|---|---|
|
50cb1be797 | ||
|
4d2ea15e19 | ||
|
b0d54e41ad | ||
|
d0fa506e4f | ||
|
67be99bb7b | ||
|
46d9e2c437 | ||
|
863dd83faa | ||
|
09eb4eaa00 | ||
|
17d523d8f8 | ||
|
fa17abdd49 | ||
|
8fd08f7ac5 | ||
|
6c3539edbe | ||
|
ed1cdf0233 | ||
|
a046bcd6a2 | ||
|
bf518522f8 | ||
|
35dfd847ab | ||
|
0e85f20680 | ||
|
bdfc4c076c | ||
|
8c4dc82d31 | ||
|
e90156adb9 | ||
|
5d7d121e1f | ||
|
0919e78693 | ||
|
41ac93d09a | ||
|
5994105fba | ||
|
0bce9e2647 |
0
LICENSE → .github/LICENSE
vendored
0
LICENSE → .github/LICENSE
vendored
5
.github/SECURITY.md
vendored
Normal file
5
.github/SECURITY.md
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Security Policy
|
||||||
|
|
||||||
|
If you find a security issue please make post it in the issues tab. If you think it should be private you can email me at contact@christitus.com.
|
||||||
|
|
||||||
|
For immediate response check out our discord server @ [![](https://dcbadge.limes.pink/api/server/https://discord.gg/RUbZUZyByQ?theme=default-inverted&style=for-the-badge)](https://discord.gg/RUbZUZyByQ)
|
3
mkdocs.yml → .github/mkdocs.yml
vendored
3
mkdocs.yml → .github/mkdocs.yml
vendored
@ -1,4 +1,5 @@
|
|||||||
site_name: WinUtil Documentation
|
site_name: WinUtil Documentation
|
||||||
|
docs_dir: '../docs'
|
||||||
repo_url: https://github.com/ChrisTitusTech/winutil
|
repo_url: https://github.com/ChrisTitusTech/winutil
|
||||||
|
|
||||||
nav:
|
nav:
|
||||||
@ -12,7 +13,7 @@ nav:
|
|||||||
|
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
custom_dir: 'overrides'
|
custom_dir: '../overrides'
|
||||||
features:
|
features:
|
||||||
- navigation.tabs
|
- navigation.tabs
|
||||||
- navigation.sections
|
- navigation.sections
|
6
.github/workflows/github-pages.yaml
vendored
6
.github/workflows/github-pages.yaml
vendored
@ -24,8 +24,8 @@ jobs:
|
|||||||
python-version: 3.x # Install latest Stable release of Python 3
|
python-version: 3.x # Install latest Stable release of Python 3
|
||||||
cache: 'pip' # caching pip dependencies
|
cache: 'pip' # caching pip dependencies
|
||||||
|
|
||||||
- name: Install Necessary Dependencies using 'pip install -r requirements.txt'
|
- name: Install Necessary Dependencies using 'pip install -r .github/requirements.txt'
|
||||||
run: pip install -r requirements.txt
|
run: pip install -r .github/requirements.txt
|
||||||
|
|
||||||
- name: Build & Deploy using 'mkdocs'
|
- name: Build & Deploy using 'mkdocs'
|
||||||
run: mkdocs gh-deploy --force
|
run: mkdocs gh-deploy --force -f .github/mkdocs.yml
|
@ -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/GregoryNavasarkian"><img src="https://github.com/GregoryNavasarkian.png" width="60px" alt="Gregory Navasarkian" /></a><a href="https://github.com/ysaito8015"><img src="https://github.com/ysaito8015.png" width="60px" alt="Yusuke Saito" /></a><a href="https://github.com/TriHydera"><img src="https://github.com/TriHydera.png" width="60px" alt="TriHydera" /></a><a href="https://github.com/jozozovko"><img src="https://github.com/jozozovko.png" width="60px" alt="" /></a><a href="https://github.com/DelDongo"><img src="https://github.com/DelDongo.png" width="60px" alt="" /></a><a href="https://github.com/markamos"><img src="https://github.com/markamos.png" width="60px" alt="Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https://github.com/dwelfusius.png" width="60px" alt="" /></a><a href="https://github.com/mews-se"><img src="https://github.com/mews-se.png" width="60px" alt="" /></a><a href="https://github.com/jdiegmueller"><img src="https://github.com/jdiegmueller.png" width="60px" alt="Jason A. Diegmueller" /></a><a href="https://github.com/AlanTristar"><img src="https://github.com/AlanTristar.png" width="60px" alt="" /></a><a href="https://github.com/JennJones89"><img src="https://github.com/JennJones89.png" width="60px" alt="" /></a><a href="https://github.com/zepled112"><img src="https://github.com/zepled112.png" width="60px" alt="wyatt" /></a><a href="https://github.com/Owen-3456"><img src="https://github.com/Owen-3456.png" width="60px" alt="Owen" /></a><a href="https://github.com/altugtekiner"><img src="https://github.com/altugtekiner.png" width="60px" alt="" /></a><a href="https://github.com/getsmor"><img src="https://github.com/getsmor.png" width="60px" alt="" /></a><a href="https://github.com/robertsandrock"><img src="https://github.com/robertsandrock.png" width="60px" alt="" /></a><a href="https://github.com/jeffnesbit"><img src="https://github.com/jeffnesbit.png" width="60px" alt="" /></a><a href="https://github.com/mmomega"><img src="https://github.com/mmomega.png" width="60px" alt="" /></a><a href="https://github.com/KenichiQaz"><img src="https://github.com/KenichiQaz.png" width="60px" alt="Stefan" /></a><a href="https://github.com/thaddl"><img src="https://github.com/thaddl.png" width="60px" alt="thaddl" /></a><a href="https://github.com/paulsheets"><img src="https://github.com/paulsheets.png" width="60px" alt="Paul" /></a><a href="https://github.com/djones369"><img src="https://github.com/djones369.png" width="60px" alt="Dave Jones" /></a><a href="https://github.com/anthonymendez"><img src="https://github.com/anthonymendez.png" width="60px" alt="Anthony Mendez" /></a><a href="https://github.com/woobe-studio"><img src="https://github.com/woobe-studio.png" width="60px" alt="Michael Wozniak" /></a><!-- sponsors -->
|
<!-- sponsors --><a href="https://github.com/ysaito8015"><img src="https://github.com/ysaito8015.png" width="60px" alt="Yusuke Saito" /></a><a href="https://github.com/TriHydera"><img src="https://github.com/TriHydera.png" width="60px" alt="TriHydera" /></a><a href="https://github.com/jozozovko"><img src="https://github.com/jozozovko.png" width="60px" alt="" /></a><a href="https://github.com/DelDongo"><img src="https://github.com/DelDongo.png" width="60px" alt="" /></a><a href="https://github.com/markamos"><img src="https://github.com/markamos.png" width="60px" alt="Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https://github.com/dwelfusius.png" width="60px" alt="" /></a><a href="https://github.com/mews-se"><img src="https://github.com/mews-se.png" width="60px" alt="" /></a><a href="https://github.com/jdiegmueller"><img src="https://github.com/jdiegmueller.png" width="60px" alt="Jason A. Diegmueller" /></a><a href="https://github.com/AlanTristar"><img src="https://github.com/AlanTristar.png" width="60px" alt="" /></a><a href="https://github.com/JennJones89"><img src="https://github.com/JennJones89.png" width="60px" alt="" /></a><a href="https://github.com/zepled112"><img src="https://github.com/zepled112.png" width="60px" alt="wyatt" /></a><a href="https://github.com/altugtekiner"><img src="https://github.com/altugtekiner.png" width="60px" alt="" /></a><a href="https://github.com/getsmor"><img src="https://github.com/getsmor.png" width="60px" alt="" /></a><a href="https://github.com/robertsandrock"><img src="https://github.com/robertsandrock.png" width="60px" alt="" /></a><a href="https://github.com/jeffnesbit"><img src="https://github.com/jeffnesbit.png" width="60px" alt="" /></a><a href="https://github.com/mmomega"><img src="https://github.com/mmomega.png" width="60px" alt="" /></a><a href="https://github.com/KenichiQaz"><img src="https://github.com/KenichiQaz.png" width="60px" alt="Stefan" /></a><a href="https://github.com/thaddl"><img src="https://github.com/thaddl.png" width="60px" alt="thaddl" /></a><a href="https://github.com/paulsheets"><img src="https://github.com/paulsheets.png" width="60px" alt="Paul" /></a><a href="https://github.com/djones369"><img src="https://github.com/djones369.png" width="60px" alt="Dave Jones" /></a><a href="https://github.com/anthonymendez"><img src="https://github.com/anthonymendez.png" width="60px" alt="Anthony Mendez" /></a><a href="https://github.com/woobe-studio"><img src="https://github.com/woobe-studio.png" width="60px" alt="Michael Wozniak" /></a><a href="https://github.com/xBandaku"><img src="https://github.com/xBandaku.png" width="60px" alt="xPandaku" /></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 🍻.
|
||||||
|
442
config/autounattend.xml
Normal file
442
config/autounattend.xml
Normal file
@ -0,0 +1,442 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
|
||||||
|
<!--https://schneegans.de/windows/unattend-generator/?LanguageMode=Unattended&UILanguage=en-US&Locale=en-US&Keyboard=00000409&GeoLocation=244&ProcessorArchitecture=amd64&BypassRequirementsCheck=true&BypassNetworkCheck=true&ComputerNameMode=Random&TimeZoneMode=Implicit&PartitionMode=Interactive&WindowsEditionMode=Unattended&WindowsEdition=pro&UserAccountMode=Unattended&AccountName0=User&AccountPassword0=&AccountGroup0=Administrators&AccountName1=&AccountName2=&AccountName3=&AccountName4=&AutoLogonMode=Own&PasswordExpirationMode=Unlimited&LockoutMode=Default&HideFiles=Hidden&DisableWidgets=true&ClassicContextMenu=true&DisableFastStartup=true&EnableLongPaths=true&DisableAppSuggestions=true&PreventDeviceEncryption=true&WifiMode=Skip&ExpressSettings=DisableAll&Remove3DViewer=true&RemoveBingSearch=true&RemoveCamera=true&RemoveClipchamp=true&RemoveClock=true&RemoveCopilot=true&RemoveCortana=true&RemoveDevHome=true&RemoveFamily=true&RemoveFeedbackHub=true&RemoveGetHelp=true&RemoveInternetExplorer=true&RemoveMailCalendar=true&RemoveMaps=true&RemoveMathInputPanel=true&RemoveZuneVideo=true&RemoveNews=true&RemoveNotepad=true&RemoveOffice365=true&RemoveOneDrive=true&RemoveOneNote=true&RemoveOpenSSHClient=true&RemoveOutlook=true&RemovePaint3D=true&RemovePeople=true&RemovePowerAutomate=true&RemoveQuickAssist=true&RemoveSkype=true&RemoveSolitaire=true&RemoveStepsRecorder=true&RemoveStickyNotes=true&RemoveTeams=true&RemoveGetStarted=true&RemoveToDo=true&RemoveVoiceRecorder=true&RemoveWeather=true&RemoveWindowsMediaPlayer=true&RemoveZuneMusic=true&RemoveWordPad=true&WdacMode=Skip-->
|
||||||
|
<settings pass="offlineServicing"></settings>
|
||||||
|
<settings pass="windowsPE">
|
||||||
|
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<SetupUILanguage>
|
||||||
|
<UILanguage>en-US</UILanguage>
|
||||||
|
</SetupUILanguage>
|
||||||
|
<InputLocale>0409:00000409</InputLocale>
|
||||||
|
<SystemLocale>en-US</SystemLocale>
|
||||||
|
<UILanguage>en-US</UILanguage>
|
||||||
|
<UserLocale>en-US</UserLocale>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<UserData>
|
||||||
|
<ProductKey>
|
||||||
|
<Key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</Key>
|
||||||
|
</ProductKey>
|
||||||
|
<AcceptEula>true</AcceptEula>
|
||||||
|
</UserData>
|
||||||
|
<RunSynchronous>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>1</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassTPMCheck /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassSecureBootCheck /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>3</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassRAMCheck /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
</RunSynchronous>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="generalize"></settings>
|
||||||
|
<settings pass="specialize">
|
||||||
|
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<RunSynchronous>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>1</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v BypassNRO /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>3</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Runonce" /v "UninstallCopilot" /t REG_SZ /d "powershell.exe -NoProfile -Command \"Get-AppxPackage -Name 'Microsoft.Windows.Ai.Copilot.Provider' | Remove-AppxPackage;\"" /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>4</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Policies\Microsoft\Windows\WindowsCopilot" /v TurnOffWindowsCopilot /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>5</Order>
|
||||||
|
<Path>reg.exe unload "HKU\DefaultUser"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>6</Order>
|
||||||
|
<Path>reg.exe delete "HKLM\SOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\DevHomeUpdate" /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>7</Order>
|
||||||
|
<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>8</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Notepad" /v ShowStoreBanner /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>9</Order>
|
||||||
|
<Path>reg.exe unload "HKU\DefaultUser"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>10</Order>
|
||||||
|
<Path>cmd.exe /c "del "C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk""</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>11</Order>
|
||||||
|
<Path>cmd.exe /c "del "C:\Windows\System32\OneDriveSetup.exe""</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>12</Order>
|
||||||
|
<Path>cmd.exe /c "del "C:\Windows\SysWOW64\OneDriveSetup.exe""</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>13</Order>
|
||||||
|
<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>14</Order>
|
||||||
|
<Path>reg.exe delete "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>15</Order>
|
||||||
|
<Path>reg.exe unload "HKU\DefaultUser"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>16</Order>
|
||||||
|
<Path>reg.exe delete "HKLM\SOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\OutlookUpdate" /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>17</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications" /v ConfigureChatAutoInstall /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>18</Order>
|
||||||
|
<Path>powershell.exe -NoProfile -Command "$xml = [xml]::new(); $xml.Load('C:\Windows\Panther\unattend.xml'); $sb = [scriptblock]::Create( $xml.unattend.Extensions.ExtractScript ); Invoke-Command -ScriptBlock $sb -ArgumentList $xml;"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>19</Order>
|
||||||
|
<Path>powershell.exe -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Temp\remove-packages.ps1' -Raw | Invoke-Expression;"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>20</Order>
|
||||||
|
<Path>powershell.exe -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Temp\remove-caps.ps1' -Raw | Invoke-Expression;"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>21</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins /t REG_SZ /d "{ \"pinnedList\": [] }" /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>22</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins_ProviderSet /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>23</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins_WinningProvider /t REG_SZ /d B5292708-1619-419B-9923-E5D9F3925E71 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>24</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\providers\B5292708-1619-419B-9923-E5D9F3925E71\default\Device\Start" /v ConfigureStartPins /t REG_SZ /d "{ \"pinnedList\": [] }" /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>25</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\providers\B5292708-1619-419B-9923-E5D9F3925E71\default\Device\Start" /v ConfigureStartPins_LastWrite /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>26</Order>
|
||||||
|
<Path>net.exe accounts /maxpwage:UNLIMITED</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>27</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>28</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>29</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>30</Order>
|
||||||
|
<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>31</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "ContentDeliveryAllowed" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>32</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "FeatureManagementEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>33</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "OEMPreInstalledAppsEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>34</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>35</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEverEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>36</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>37</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SoftLandingEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>38</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContentEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>39</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-310093Enabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>40</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338387Enabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>41</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338388Enabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>42</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338389Enabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>43</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338393Enabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>44</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353698Enabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>45</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SystemPaneSuggestionsEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>46</Order>
|
||||||
|
<Path>reg.exe unload "HKU\DefaultUser"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>47</Order>
|
||||||
|
<Path>reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>48</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\BitLocker" /v "PreventDeviceEncryption" /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>49</Order>
|
||||||
|
<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>50</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Runonce" /v "ClassicContextMenu" /t REG_SZ /d "reg.exe add \"HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32\" /ve /f" /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>51</Order>
|
||||||
|
<Path>reg.exe unload "HKU\DefaultUser"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
</RunSynchronous>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="auditSystem"></settings>
|
||||||
|
<settings pass="auditUser"></settings>
|
||||||
|
<settings pass="oobeSystem">
|
||||||
|
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<InputLocale>0409:00000409</InputLocale>
|
||||||
|
<SystemLocale>en-US</SystemLocale>
|
||||||
|
<UILanguage>en-US</UILanguage>
|
||||||
|
<UserLocale>en-US</UserLocale>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<UserAccounts>
|
||||||
|
<LocalAccounts>
|
||||||
|
<LocalAccount wcm:action="add">
|
||||||
|
<Name>User</Name>
|
||||||
|
<Group>Administrators</Group>
|
||||||
|
<Password>
|
||||||
|
<Value></Value>
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</Password>
|
||||||
|
</LocalAccount>
|
||||||
|
</LocalAccounts>
|
||||||
|
</UserAccounts>
|
||||||
|
<AutoLogon>
|
||||||
|
<Username>User</Username>
|
||||||
|
<Enabled>true</Enabled>
|
||||||
|
<LogonCount>1</LogonCount>
|
||||||
|
<Password>
|
||||||
|
<Value></Value>
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</Password>
|
||||||
|
</AutoLogon>
|
||||||
|
<OOBE>
|
||||||
|
<ProtectYourPC>3</ProtectYourPC>
|
||||||
|
<HideEULAPage>true</HideEULAPage>
|
||||||
|
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||||
|
</OOBE>
|
||||||
|
<FirstLogonCommands>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>1</Order>
|
||||||
|
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
|
</SynchronousCommand>
|
||||||
|
</FirstLogonCommands>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<Extensions xmlns="https://schneegans.de/windows/unattend-generator/">
|
||||||
|
<ExtractScript>
|
||||||
|
param(
|
||||||
|
[xml] $Document
|
||||||
|
);
|
||||||
|
|
||||||
|
$scriptsDir = 'C:\Windows\Setup\Scripts\';
|
||||||
|
foreach( $file in $Document.unattend.Extensions.File ) {
|
||||||
|
$path = [System.Environment]::ExpandEnvironmentVariables(
|
||||||
|
$file.GetAttribute( 'path' )
|
||||||
|
);
|
||||||
|
if( $path.StartsWith( $scriptsDir ) ) {
|
||||||
|
mkdir -Path $scriptsDir -ErrorAction 'SilentlyContinue';
|
||||||
|
}
|
||||||
|
$encoding = switch( [System.IO.Path]::GetExtension( $path ) ) {
|
||||||
|
{ $_ -in '.ps1', '.xml' } { [System.Text.Encoding]::UTF8; }
|
||||||
|
{ $_ -in '.reg', '.vbs', '.js' } { [System.Text.UnicodeEncoding]::new( $false, $true ); }
|
||||||
|
default { [System.Text.Encoding]::Default; }
|
||||||
|
};
|
||||||
|
[System.IO.File]::WriteAllBytes( $path, ( $encoding.GetPreamble() + $encoding.GetBytes( $file.InnerText.Trim() ) ) );
|
||||||
|
}
|
||||||
|
</ExtractScript>
|
||||||
|
<File path="C:\Windows\Temp\remove-packages.ps1">
|
||||||
|
$selectors = @(
|
||||||
|
'Microsoft.Microsoft3DViewer';
|
||||||
|
'Microsoft.BingSearch';
|
||||||
|
'Microsoft.WindowsCamera';
|
||||||
|
'Clipchamp.Clipchamp';
|
||||||
|
'Microsoft.WindowsAlarms';
|
||||||
|
'Microsoft.549981C3F5F10';
|
||||||
|
'Microsoft.Windows.DevHome';
|
||||||
|
'MicrosoftCorporationII.MicrosoftFamily';
|
||||||
|
'Microsoft.WindowsFeedbackHub';
|
||||||
|
'Microsoft.GetHelp';
|
||||||
|
'Microsoft.Getstarted';
|
||||||
|
'microsoft.windowscommunicationsapps';
|
||||||
|
'Microsoft.WindowsMaps';
|
||||||
|
'Microsoft.BingNews';
|
||||||
|
'Microsoft.WindowsNotepad';
|
||||||
|
'Microsoft.MicrosoftOfficeHub';
|
||||||
|
'Microsoft.Office.OneNote';
|
||||||
|
'Microsoft.OutlookForWindows';
|
||||||
|
'Microsoft.MSPaint';
|
||||||
|
'Microsoft.People';
|
||||||
|
'Microsoft.PowerAutomateDesktop';
|
||||||
|
'MicrosoftCorporationII.QuickAssist';
|
||||||
|
'Microsoft.SkypeApp';
|
||||||
|
'Microsoft.MicrosoftSolitaireCollection';
|
||||||
|
'Microsoft.MicrosoftStickyNotes';
|
||||||
|
'MSTeams';
|
||||||
|
'Microsoft.Todos';
|
||||||
|
'Microsoft.WindowsSoundRecorder';
|
||||||
|
'Microsoft.BingWeather';
|
||||||
|
'Microsoft.ZuneMusic';
|
||||||
|
'Microsoft.ZuneVideo';
|
||||||
|
);
|
||||||
|
$getCommand = { Get-AppxProvisionedPackage -Online; };
|
||||||
|
$filterCommand = { $_.DisplayName -eq $selector; };
|
||||||
|
$removeCommand = {
|
||||||
|
[CmdletBinding()]
|
||||||
|
param(
|
||||||
|
[Parameter( Mandatory, ValueFromPipeline )]
|
||||||
|
$InputObject
|
||||||
|
);
|
||||||
|
process {
|
||||||
|
$InputObject | Remove-AppxProvisionedPackage -AllUsers -Online -ErrorAction 'Continue';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$type = 'Package';
|
||||||
|
$logfile = 'C:\Windows\Temp\remove-packages.log';
|
||||||
|
& {
|
||||||
|
$installed = & $getCommand;
|
||||||
|
foreach( $selector in $selectors ) {
|
||||||
|
$result = [ordered] @{
|
||||||
|
Selector = $selector;
|
||||||
|
};
|
||||||
|
$found = $installed | Where-Object -FilterScript $filterCommand;
|
||||||
|
if( $found ) {
|
||||||
|
$result.Output = $found | & $removeCommand;
|
||||||
|
if( $? ) {
|
||||||
|
$result.Message = "$type removed.";
|
||||||
|
} else {
|
||||||
|
$result.Message = "$type not removed.";
|
||||||
|
$result.Error = $Error[0];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$result.Message = "$type not installed.";
|
||||||
|
}
|
||||||
|
$result | ConvertTo-Json -Depth 3 -Compress;
|
||||||
|
}
|
||||||
|
} *>&1 >> $logfile;
|
||||||
|
</File>
|
||||||
|
<File path="C:\Windows\Temp\remove-caps.ps1">
|
||||||
|
$selectors = @(
|
||||||
|
'Browser.InternetExplorer';
|
||||||
|
'MathRecognizer';
|
||||||
|
'OpenSSH.Client';
|
||||||
|
'App.Support.QuickAssist';
|
||||||
|
'App.StepsRecorder';
|
||||||
|
'Media.WindowsMediaPlayer';
|
||||||
|
'Microsoft.Windows.WordPad';
|
||||||
|
);
|
||||||
|
$getCommand = { Get-WindowsCapability -Online; };
|
||||||
|
$filterCommand = { ($_.Name -split '~')[0] -eq $selector; };
|
||||||
|
$removeCommand = {
|
||||||
|
[CmdletBinding()]
|
||||||
|
param(
|
||||||
|
[Parameter( Mandatory, ValueFromPipeline )]
|
||||||
|
$InputObject
|
||||||
|
);
|
||||||
|
process {
|
||||||
|
$InputObject | Remove-WindowsCapability -Online -ErrorAction 'Continue';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$type = 'Capability';
|
||||||
|
$logfile = 'C:\Windows\Temp\remove-caps.log';
|
||||||
|
& {
|
||||||
|
$installed = & $getCommand;
|
||||||
|
foreach( $selector in $selectors ) {
|
||||||
|
$result = [ordered] @{
|
||||||
|
Selector = $selector;
|
||||||
|
};
|
||||||
|
$found = $installed | Where-Object -FilterScript $filterCommand;
|
||||||
|
if( $found ) {
|
||||||
|
$result.Output = $found | & $removeCommand;
|
||||||
|
if( $? ) {
|
||||||
|
$result.Message = "$type removed.";
|
||||||
|
} else {
|
||||||
|
$result.Message = "$type not removed.";
|
||||||
|
$result.Error = $Error[0];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$result.Message = "$type not installed.";
|
||||||
|
}
|
||||||
|
$result | ConvertTo-Json -Depth 3 -Compress;
|
||||||
|
}
|
||||||
|
} *>&1 >> $logfile;
|
||||||
|
</File>
|
||||||
|
<File path="C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml"><![CDATA[
|
||||||
|
<LayoutModificationTemplate Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
|
||||||
|
<LayoutOptions StartTileGroupCellWidth="6" />
|
||||||
|
<DefaultLayoutOverride>
|
||||||
|
<StartLayoutCollection>
|
||||||
|
<StartLayout GroupCellWidth="6" xmlns="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" />
|
||||||
|
</StartLayoutCollection>
|
||||||
|
</DefaultLayoutOverride>
|
||||||
|
</LayoutModificationTemplate>
|
||||||
|
]]></File>
|
||||||
|
</Extensions>
|
||||||
|
</unattend>
|
@ -2562,15 +2562,10 @@
|
|||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a029_",
|
"Order": "a029_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"Uninstall-WinUtilEdgeBrowser -action \"Uninstall\""
|
||||||
Uninstall-WinUtilEdgeBrowser
|
|
||||||
"
|
|
||||||
],
|
],
|
||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
"
|
"Uninstall-WinUtilEdgeBrowser -action \"Install\""
|
||||||
Write-Host \"Install Microsoft Edge\"
|
|
||||||
Start-Process -FilePath winget -ArgumentList \"install --force -e --accept-source-agreements --accept-package-agreements --silent Microsoft.Edge \" -NoNewWindow -Wait
|
|
||||||
"
|
|
||||||
],
|
],
|
||||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveEdge"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveEdge"
|
||||||
},
|
},
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
--8<-- "CONTRIBUTING.md"
|
--8<-- ".github/CONTRIBUTING.md"
|
||||||
|
|
||||||
<!-- The content is sourced from "CONTRIBUTING.md," located in the root directory of the project. -->
|
<!-- The content is sourced from "CONTRIBUTING.md," located in the root directory of the project. -->
|
||||||
|
@ -140,8 +140,9 @@ Function Get-WinUtilToggleStatus {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($ToggleSwitch -eq "WPFToggleDetailedBSoD") {
|
if ($ToggleSwitch -eq "WPFToggleDetailedBSoD") {
|
||||||
$DetailedBSoD = (Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl').DisplayParameters
|
$DetailedBSoD1 = (Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl').DisplayParameters
|
||||||
if($DetailedBSoD -eq 0) {
|
$DetailedBSoD2 = (Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl').DisableEmoticon
|
||||||
|
if (($DetailedBSoD1 -eq 0) -or ($DetailedBSoD2 -eq 0) -or !$DetailedBSoD1 -or !$DetailedBSoD2) {
|
||||||
return $false
|
return $false
|
||||||
} else {
|
} else {
|
||||||
return $true
|
return $true
|
||||||
|
@ -18,6 +18,10 @@ Function Invoke-WinUtilDetailedBSoD {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$Path = "HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl"
|
$Path = "HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl"
|
||||||
|
$dwords = ("DisplayParameters", "DisableEmoticon")
|
||||||
|
foreach ($name in $dwords) {
|
||||||
|
Set-ItemProperty -Path $Path -Name $name -Value $value
|
||||||
|
}
|
||||||
Set-ItemProperty -Path $Path -Name DisplayParameters -Value $value
|
Set-ItemProperty -Path $Path -Name DisplayParameters -Value $value
|
||||||
} catch [System.Security.SecurityException] {
|
} catch [System.Security.SecurityException] {
|
||||||
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"
|
||||||
|
@ -25,25 +25,22 @@ function Test-CompatibleImage() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function Remove-Features([switch]$dumpFeatures = $false, [switch]$keepDefender = $false) {
|
function Remove-Features() {
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Removes certain features from ISO image
|
Removes certain features from ISO image
|
||||||
|
|
||||||
.PARAMETER Name
|
.PARAMETER Name
|
||||||
dumpFeatures - Dumps all features found in the ISO into a file called allfeaturesdump.txt. This file can be examined and used to decide what to remove.
|
No Params
|
||||||
keepDefender - Should Defender be removed from the ISO?
|
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
Remove-Features -keepDefender:$false
|
Remove-Features
|
||||||
#>
|
#>
|
||||||
try {
|
try {
|
||||||
$featlist = (Get-WindowsOptionalFeature -Path $scratchDir).FeatureName
|
$featlist = (Get-WindowsOptionalFeature -Path $scratchDir).FeatureName
|
||||||
if ($dumpFeatures) {
|
|
||||||
$featlist > allfeaturesdump.txt
|
|
||||||
}
|
|
||||||
|
|
||||||
$featlist = $featlist | Where-Object {
|
$featlist = $featlist | Where-Object {
|
||||||
|
$_ -NotLike "*Defender*" -AND
|
||||||
$_ -NotLike "*Printing*" -AND
|
$_ -NotLike "*Printing*" -AND
|
||||||
$_ -NotLike "*TelnetClient*" -AND
|
$_ -NotLike "*TelnetClient*" -AND
|
||||||
$_ -NotLike "*PowerShell*" -AND
|
$_ -NotLike "*PowerShell*" -AND
|
||||||
@ -52,8 +49,6 @@ function Remove-Features([switch]$dumpFeatures = $false, [switch]$keepDefender =
|
|||||||
$_ -NotLike "*NFS*"
|
$_ -NotLike "*NFS*"
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($keepDefender) { $featlist = $featlist | Where-Object { $_ -NotLike "*Defender*" }}
|
|
||||||
|
|
||||||
foreach($feature in $featlist) {
|
foreach($feature in $featlist) {
|
||||||
$status = "Removing feature $feature"
|
$status = "Removing feature $feature"
|
||||||
Write-Progress -Activity "Removing features" -Status $status -PercentComplete ($counter++/$featlist.Count*100)
|
Write-Progress -Activity "Removing features" -Status $status -PercentComplete ($counter++/$featlist.Count*100)
|
||||||
@ -126,46 +121,59 @@ function Remove-Packages {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function Remove-ProvisionedPackages([switch]$keepSecurity = $false) {
|
function Remove-ProvisionedPackages() {
|
||||||
<#
|
<#
|
||||||
.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 Name
|
||||||
keepSecurity - Boolean that determines whether to keep "Microsoft.SecHealthUI" (Windows Security) in the Windows image
|
No Params
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
Remove-ProvisionedPackages -keepSecurity:$false
|
Remove-ProvisionedPackages
|
||||||
#>
|
#>
|
||||||
$appxProvisionedPackages = Get-AppxProvisionedPackage -Path "$($scratchDir)" | Where-Object {
|
try
|
||||||
$_.PackageName -NotLike "*AppInstaller*" -AND
|
{
|
||||||
$_.PackageName -NotLike "*Store*" -and
|
$appxProvisionedPackages = Get-AppxProvisionedPackage -Path "$($scratchDir)" | Where-Object {
|
||||||
$_.PackageName -NotLike "*dism*" -and
|
$_.PackageName -NotLike "*AppInstaller*" -AND
|
||||||
$_.PackageName -NotLike "*Foundation*" -and
|
$_.PackageName -NotLike "*Store*" -and
|
||||||
$_.PackageName -NotLike "*FodMetadata*" -and
|
$_.PackageName -NotLike "*dism*" -and
|
||||||
$_.PackageName -NotLike "*LanguageFeatures*" -and
|
$_.PackageName -NotLike "*Foundation*" -and
|
||||||
$_.PackageName -NotLike "*Notepad*" -and
|
$_.PackageName -NotLike "*FodMetadata*" -and
|
||||||
$_.PackageName -NotLike "*Printing*" -and
|
$_.PackageName -NotLike "*LanguageFeatures*" -and
|
||||||
$_.PackageName -NotLike "*Wifi*" -and
|
$_.PackageName -NotLike "*Notepad*" -and
|
||||||
$_.PackageName -NotLike "*Foundation*"
|
$_.PackageName -NotLike "*Printing*" -and
|
||||||
|
$_.PackageName -NotLike "*Wifi*" -and
|
||||||
|
$_.PackageName -NotLike "*Foundation*" -and
|
||||||
|
$_.PackageName -NotLike "*YourPhone*" -and
|
||||||
|
$_.PackageName -NotLike "*Xbox*" -and
|
||||||
|
$_.PackageName -NotLike "*WindowsTerminal*" -and
|
||||||
|
$_.PackageName -NotLike "*Calculator*" -and
|
||||||
|
$_.PackageName -NotLike "*Photos*" -and
|
||||||
|
$_.PackageName -NotLike "*VCLibs*" -and
|
||||||
|
$_.PackageName -NotLike "*Paint*" -and
|
||||||
|
$_.PackageName -NotLike "*Gaming*" -and
|
||||||
|
$_.PackageName -NotLike "*Extension*" -and
|
||||||
|
$_.PackageName -NotLike "*SecHealthUI*"
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($?) {
|
|
||||||
if ($keepSecurity) { $appxProvisionedPackages = $appxProvisionedPackages | Where-Object { $_.PackageName -NotLike "*SecHealthUI*" }}
|
|
||||||
$counter = 0
|
$counter = 0
|
||||||
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)
|
||||||
try {
|
try {
|
||||||
Remove-AppxProvisionedPackage -Path $scratchDir -PackageName $appx.PackageName -ErrorAction SilentlyContinue
|
Remove-AppxProvisionedPackage -Path "$scratchDir" -PackageName $appx.PackageName -ErrorAction SilentlyContinue
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host "Application $($appx.PackageName) could not be removed"
|
Write-Host "Application $($appx.PackageName) could not be removed"
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Write-Progress -Activity "Removing Provisioned Apps" -Status "Ready" -Completed
|
Write-Progress -Activity "Removing Provisioned Apps" -Status "Ready" -Completed
|
||||||
} else {
|
}
|
||||||
Write-Host "Could not get Provisioned App information. Skipping process..."
|
catch
|
||||||
|
{
|
||||||
|
# This can happen if getting AppX packages fails
|
||||||
|
Write-Host "Unable to get information about the AppX packages. MicroWin processing will continue, but AppX packages will not be processed"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,9 +183,9 @@ function Copy-ToUSB([string]$fileToCopy) {
|
|||||||
$destinationPath = "$($volume.DriveLetter):\"
|
$destinationPath = "$($volume.DriveLetter):\"
|
||||||
#Copy-Item -Path $fileToCopy -Destination $destinationPath -Force
|
#Copy-Item -Path $fileToCopy -Destination $destinationPath -Force
|
||||||
# Get the total size of the file
|
# Get the total size of the file
|
||||||
$totalSize = (Get-Item $fileToCopy).length
|
$totalSize = (Get-Item "$fileToCopy").length
|
||||||
|
|
||||||
Copy-Item -Path $fileToCopy -Destination $destinationPath -Verbose -Force -Recurse -Container -PassThru |
|
Copy-Item -Path "$fileToCopy" -Destination "$destinationPath" -Verbose -Force -Recurse -Container -PassThru |
|
||||||
ForEach-Object {
|
ForEach-Object {
|
||||||
# Calculate the percentage completed
|
# Calculate the percentage completed
|
||||||
$completed = ($_.BytesTransferred / $totalSize) * 100
|
$completed = ($_.BytesTransferred / $totalSize) * 100
|
||||||
@ -200,22 +208,6 @@ function Remove-FileOrDirectory([string]$pathToDelete, [string]$mask = "", [swit
|
|||||||
$yesNo = Get-LocalizedYesNo
|
$yesNo = Get-LocalizedYesNo
|
||||||
Write-Host "[INFO] In Your local takeown expects '$($yesNo[0])' as a Yes answer."
|
Write-Host "[INFO] In Your local takeown expects '$($yesNo[0])' as a Yes answer."
|
||||||
|
|
||||||
# Specify the path to the directory
|
|
||||||
# $directoryPath = "$($scratchDir)\Windows\System32\LogFiles\WMI\RtBackup"
|
|
||||||
# takeown /a /r /d $yesNo[0] /f "$($directoryPath)" > $null
|
|
||||||
# icacls "$($directoryPath)" /q /c /t /reset > $null
|
|
||||||
# icacls $directoryPath /setowner "*S-1-5-32-544"
|
|
||||||
# icacls $directoryPath /grant "*S-1-5-32-544:(OI)(CI)F" /t /c /q
|
|
||||||
# Remove-Item -Path $directoryPath -Recurse -Force
|
|
||||||
|
|
||||||
# # Grant full control to BUILTIN\Administrators using icacls
|
|
||||||
# $directoryPath = "$($scratchDir)\Windows\System32\WebThreatDefSvc"
|
|
||||||
# takeown /a /r /d $yesNo[0] /f "$($directoryPath)" > $null
|
|
||||||
# icacls "$($directoryPath)" /q /c /t /reset > $null
|
|
||||||
# icacls $directoryPath /setowner "*S-1-5-32-544"
|
|
||||||
# icacls $directoryPath /grant "*S-1-5-32-544:(OI)(CI)F" /t /c /q
|
|
||||||
# Remove-Item -Path $directoryPath -Recurse -Force
|
|
||||||
|
|
||||||
$itemsToDelete = [System.Collections.ArrayList]::new()
|
$itemsToDelete = [System.Collections.ArrayList]::new()
|
||||||
|
|
||||||
if ($mask -eq "") {
|
if ($mask -eq "") {
|
||||||
@ -254,46 +246,6 @@ function Remove-FileOrDirectory([string]$pathToDelete, [string]$mask = "", [swit
|
|||||||
|
|
||||||
function New-Unattend {
|
function New-Unattend {
|
||||||
|
|
||||||
# later if we wont to remove even more bloat EU requires MS to remove everything from English(world)
|
|
||||||
# Below is an example how to do it we probably should create a drop down with common locals
|
|
||||||
# <settings pass="specialize">
|
|
||||||
# <!-- Specify English (World) locale -->
|
|
||||||
# <component name="Microsoft-Windows-International-Core" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
||||||
# <SetupUILanguage>
|
|
||||||
# <UILanguage>en-US</UILanguage>
|
|
||||||
# </SetupUILanguage>
|
|
||||||
# <InputLocale>en-US</InputLocale>
|
|
||||||
# <SystemLocale>en-US</SystemLocale>
|
|
||||||
# <UILanguage>en-US</UILanguage>
|
|
||||||
# <UserLocale>en-US</UserLocale>
|
|
||||||
# </component>
|
|
||||||
# </settings>
|
|
||||||
|
|
||||||
# <settings pass="oobeSystem">
|
|
||||||
# <!-- Specify English (World) locale -->
|
|
||||||
# <component name="Microsoft-Windows-International-Core" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
||||||
# <InputLocale>en-US</InputLocale>
|
|
||||||
# <SystemLocale>en-US</SystemLocale>
|
|
||||||
# <UILanguage>en-US</UILanguage>
|
|
||||||
# <UserLocale>en-US</UserLocale>
|
|
||||||
# </component>
|
|
||||||
# </settings>
|
|
||||||
# using here string to embedd unattend
|
|
||||||
# <RunSynchronousCommand wcm:action="add">
|
|
||||||
# <Order>1</Order>
|
|
||||||
# <Path>net user administrator /active:yes</Path>
|
|
||||||
# </RunSynchronousCommand>
|
|
||||||
|
|
||||||
# this section doesn't work in win10/????
|
|
||||||
# <settings pass="specialize">
|
|
||||||
# <component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
||||||
# <CEIPEnabled>0</CEIPEnabled>
|
|
||||||
# </component>
|
|
||||||
# <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
||||||
# <ConfigureChatAutoInstall>false</ConfigureChatAutoInstall>
|
|
||||||
# </component>
|
|
||||||
# </settings>
|
|
||||||
|
|
||||||
$unattend = @'
|
$unattend = @'
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<unattend xmlns="urn:schemas-microsoft-com:unattend"
|
<unattend xmlns="urn:schemas-microsoft-com:unattend"
|
||||||
@ -313,10 +265,31 @@ function New-Unattend {
|
|||||||
</settings>
|
</settings>
|
||||||
<settings pass="oobeSystem">
|
<settings pass="oobeSystem">
|
||||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<UserAccounts>
|
||||||
|
<LocalAccounts>
|
||||||
|
<LocalAccount wcm:action="add">
|
||||||
|
<Name>User</Name>
|
||||||
|
<Group>Administrators</Group>
|
||||||
|
<Password>
|
||||||
|
<Value></Value>
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</Password>
|
||||||
|
</LocalAccount>
|
||||||
|
</LocalAccounts>
|
||||||
|
</UserAccounts>
|
||||||
|
<AutoLogon>
|
||||||
|
<Username>User</Username>
|
||||||
|
<Enabled>true</Enabled>
|
||||||
|
<LogonCount>1</LogonCount>
|
||||||
|
<Password>
|
||||||
|
<Value></Value>
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</Password>
|
||||||
|
</AutoLogon>
|
||||||
<OOBE>
|
<OOBE>
|
||||||
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
||||||
<SkipUserOOBE>false</SkipUserOOBE>
|
<SkipUserOOBE>true</SkipUserOOBE>
|
||||||
<SkipMachineOOBE>false</SkipMachineOOBE>
|
<SkipMachineOOBE>true</SkipMachineOOBE>
|
||||||
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||||||
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||||
<HideEULAPage>true</HideEULAPage>
|
<HideEULAPage>true</HideEULAPage>
|
||||||
@ -325,14 +298,18 @@ function New-Unattend {
|
|||||||
<FirstLogonCommands>
|
<FirstLogonCommands>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>1</Order>
|
<Order>1</Order>
|
||||||
<CommandLine>cmd.exe /c echo 23>c:\windows\csup.txt</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>2</Order>
|
<Order>2</Order>
|
||||||
<CommandLine>CMD /C echo GG>C:\Windows\LogOobeSystem.txt</CommandLine>
|
<CommandLine>cmd.exe /c echo 23>c:\windows\csup.txt</CommandLine>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>3</Order>
|
<Order>3</Order>
|
||||||
|
<CommandLine>CMD /C echo GG>C:\Windows\LogOobeSystem.txt</CommandLine>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>4</Order>
|
||||||
<CommandLine>powershell -ExecutionPolicy Bypass -File c:\windows\FirstStartup.ps1</CommandLine>
|
<CommandLine>powershell -ExecutionPolicy Bypass -File c:\windows\FirstStartup.ps1</CommandLine>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
</FirstLogonCommands>
|
</FirstLogonCommands>
|
||||||
@ -343,10 +320,218 @@ function New-Unattend {
|
|||||||
$specPass = @'
|
$specPass = @'
|
||||||
<settings pass="specialize">
|
<settings pass="specialize">
|
||||||
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
<CEIPEnabled>0</CEIPEnabled>
|
<CEIPEnabled>0</CEIPEnabled>
|
||||||
</component>
|
</component>
|
||||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
<ConfigureChatAutoInstall>false</ConfigureChatAutoInstall>
|
<ConfigureChatAutoInstall>false</ConfigureChatAutoInstall>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<RunSynchronous>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>1</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v BypassNRO /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>3</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Runonce" /v "UninstallCopilot" /t REG_SZ /d "powershell.exe -NoProfile -Command \"Get-AppxPackage -Name 'Microsoft.Windows.Ai.Copilot.Provider' | Remove-AppxPackage;\"" /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>4</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Policies\Microsoft\Windows\WindowsCopilot" /v TurnOffWindowsCopilot /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>5</Order>
|
||||||
|
<Path>reg.exe unload "HKU\DefaultUser"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>6</Order>
|
||||||
|
<Path>reg.exe delete "HKLM\SOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\DevHomeUpdate" /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>7</Order>
|
||||||
|
<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>8</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Notepad" /v ShowStoreBanner /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>9</Order>
|
||||||
|
<Path>reg.exe unload "HKU\DefaultUser"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>10</Order>
|
||||||
|
<Path>cmd.exe /c "del "C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk""</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>11</Order>
|
||||||
|
<Path>cmd.exe /c "del "C:\Windows\System32\OneDriveSetup.exe""</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>12</Order>
|
||||||
|
<Path>cmd.exe /c "del "C:\Windows\SysWOW64\OneDriveSetup.exe""</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>13</Order>
|
||||||
|
<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>14</Order>
|
||||||
|
<Path>reg.exe delete "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>15</Order>
|
||||||
|
<Path>reg.exe unload "HKU\DefaultUser"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>16</Order>
|
||||||
|
<Path>reg.exe delete "HKLM\SOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\OutlookUpdate" /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>17</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications" /v ConfigureChatAutoInstall /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>18</Order>
|
||||||
|
<Path>powershell.exe -NoProfile -Command "$xml = [xml]::new(); $xml.Load('C:\Windows\Panther\unattend.xml'); $sb = [scriptblock]::Create( $xml.unattend.Extensions.ExtractScript ); Invoke-Command -ScriptBlock $sb -ArgumentList $xml;"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>19</Order>
|
||||||
|
<Path>powershell.exe -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Temp\remove-packages.ps1' -Raw | Invoke-Expression;"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>20</Order>
|
||||||
|
<Path>powershell.exe -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Temp\remove-caps.ps1' -Raw | Invoke-Expression;"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>21</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins /t REG_SZ /d "{ \"pinnedList\": [] }" /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>22</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins_ProviderSet /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>23</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins_WinningProvider /t REG_SZ /d B5292708-1619-419B-9923-E5D9F3925E71 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>24</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\providers\B5292708-1619-419B-9923-E5D9F3925E71\default\Device\Start" /v ConfigureStartPins /t REG_SZ /d "{ \"pinnedList\": [] }" /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>25</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\providers\B5292708-1619-419B-9923-E5D9F3925E71\default\Device\Start" /v ConfigureStartPins_LastWrite /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>26</Order>
|
||||||
|
<Path>net.exe accounts /maxpwage:UNLIMITED</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>27</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>28</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>29</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>30</Order>
|
||||||
|
<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>31</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "ContentDeliveryAllowed" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>32</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "FeatureManagementEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>33</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "OEMPreInstalledAppsEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>34</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>35</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEverEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>36</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>37</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SoftLandingEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>38</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContentEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>39</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-310093Enabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>40</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338387Enabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>41</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338388Enabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>42</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338389Enabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>43</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338393Enabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>44</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353698Enabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>45</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SystemPaneSuggestionsEnabled" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>46</Order>
|
||||||
|
<Path>reg.exe unload "HKU\DefaultUser"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>47</Order>
|
||||||
|
<Path>reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d 0 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>48</Order>
|
||||||
|
<Path>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\BitLocker" /v "PreventDeviceEncryption" /t REG_DWORD /d 1 /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>49</Order>
|
||||||
|
<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>50</Order>
|
||||||
|
<Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Runonce" /v "ClassicContextMenu" /t REG_SZ /d "reg.exe add \"HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32\" /ve /f" /f</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>51</Order>
|
||||||
|
<Path>reg.exe unload "HKU\DefaultUser"</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
</RunSynchronous>
|
||||||
</component>
|
</component>
|
||||||
</settings>
|
</settings>
|
||||||
'@
|
'@
|
||||||
@ -466,94 +651,8 @@ function New-FirstRun {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function Stop-UnnecessaryServices {
|
|
||||||
$servicesToExclude = @(
|
|
||||||
"AudioSrv",
|
|
||||||
"AudioEndpointBuilder",
|
|
||||||
"BFE",
|
|
||||||
"BITS",
|
|
||||||
"BrokerInfrastructure",
|
|
||||||
"CDPSvc",
|
|
||||||
"CDPUserSvc_dc2a4",
|
|
||||||
"CoreMessagingRegistrar",
|
|
||||||
"CryptSvc",
|
|
||||||
"DPS",
|
|
||||||
"DcomLaunch",
|
|
||||||
"Dhcp",
|
|
||||||
"DispBrokerDesktopSvc",
|
|
||||||
"Dnscache",
|
|
||||||
"DoSvc",
|
|
||||||
"DusmSvc",
|
|
||||||
"EventLog",
|
|
||||||
"EventSystem",
|
|
||||||
"FontCache",
|
|
||||||
"LSM",
|
|
||||||
"LanmanServer",
|
|
||||||
"LanmanWorkstation",
|
|
||||||
"MapsBroker",
|
|
||||||
"MpsSvc",
|
|
||||||
"OneSyncSvc_dc2a4",
|
|
||||||
"Power",
|
|
||||||
"ProfSvc",
|
|
||||||
"RpcEptMapper",
|
|
||||||
"RpcSs",
|
|
||||||
"SCardSvr",
|
|
||||||
"SENS",
|
|
||||||
"SamSs",
|
|
||||||
"Schedule",
|
|
||||||
"SgrmBroker",
|
|
||||||
"ShellHWDetection",
|
|
||||||
"Spooler",
|
|
||||||
"SysMain",
|
|
||||||
"SystemEventsBroker",
|
|
||||||
"TextInputManagementService",
|
|
||||||
"Themes",
|
|
||||||
"TrkWks",
|
|
||||||
"UserManager",
|
|
||||||
"VGAuthService",
|
|
||||||
"VMTools",
|
|
||||||
"WSearch",
|
|
||||||
"Wcmsvc",
|
|
||||||
"WinDefend",
|
|
||||||
"Winmgmt",
|
|
||||||
"WlanSvc",
|
|
||||||
"WpnService",
|
|
||||||
"WpnUserService_dc2a4",
|
|
||||||
"cbdhsvc_dc2a4",
|
|
||||||
"edgeupdate",
|
|
||||||
"gpsvc",
|
|
||||||
"iphlpsvc",
|
|
||||||
"mpssvc",
|
|
||||||
"nsi",
|
|
||||||
"sppsvc",
|
|
||||||
"tiledatamodelsvc",
|
|
||||||
"vm3dservice",
|
|
||||||
"webthreatdefusersvc_dc2a4",
|
|
||||||
"wscsvc"
|
|
||||||
)
|
|
||||||
|
|
||||||
$runningServices = Get-Service | Where-Object { $servicesToExclude -notcontains $_.Name }
|
|
||||||
foreach($service in $runningServices) {
|
|
||||||
Stop-Service -Name $service.Name -PassThru
|
|
||||||
Set-Service $service.Name -StartupType Manual
|
|
||||||
"Stopping service $($service.Name)" | Out-File -FilePath c:\windows\LogFirstRun.txt -Append -NoClobber
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
"FirstStartup has worked" | Out-File -FilePath c:\windows\LogFirstRun.txt -Append -NoClobber
|
"FirstStartup has worked" | Out-File -FilePath c:\windows\LogFirstRun.txt -Append -NoClobber
|
||||||
|
|
||||||
$Theme = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
|
|
||||||
Set-ItemProperty -Path $Theme -Name AppsUseLightTheme -Value 1
|
|
||||||
Set-ItemProperty -Path $Theme -Name SystemUsesLightTheme -Value 1
|
|
||||||
|
|
||||||
# figure this out later how to set updates to security only
|
|
||||||
#Import-Module -Name PSWindowsUpdate;
|
|
||||||
#Stop-Service -Name wuauserv
|
|
||||||
#Set-WUSettings -MicrosoftUpdateEnabled -AutoUpdateOption 'Never'
|
|
||||||
#Start-Service -Name wuauserv
|
|
||||||
|
|
||||||
Stop-UnnecessaryServices
|
|
||||||
|
|
||||||
$taskbarPath = "$env:AppData\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"
|
$taskbarPath = "$env:AppData\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"
|
||||||
# Delete all files on the Taskbar
|
# Delete all files on the Taskbar
|
||||||
Get-ChildItem -Path $taskbarPath -File | Remove-Item -Force
|
Get-ChildItem -Path $taskbarPath -File | Remove-Item -Force
|
||||||
@ -561,14 +660,6 @@ function New-FirstRun {
|
|||||||
Remove-RegistryValue -RegistryPath "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -ValueName "FavoritesChanges"
|
Remove-RegistryValue -RegistryPath "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -ValueName "FavoritesChanges"
|
||||||
Remove-RegistryValue -RegistryPath "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -ValueName "Favorites"
|
Remove-RegistryValue -RegistryPath "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -ValueName "Favorites"
|
||||||
|
|
||||||
# Stop-Process -Name explorer -Force
|
|
||||||
|
|
||||||
$process = Get-Process -Name "explorer"
|
|
||||||
Stop-Process -InputObject $process
|
|
||||||
# Wait for the process to exit
|
|
||||||
Wait-Process -InputObject $process
|
|
||||||
Start-Sleep -Seconds 3
|
|
||||||
|
|
||||||
# Delete Edge Icon from the desktop
|
# Delete Edge Icon from the desktop
|
||||||
$edgeShortcutFiles = Get-ChildItem -Path $desktopPath -Filter "*Edge*.lnk"
|
$edgeShortcutFiles = Get-ChildItem -Path $desktopPath -Filter "*Edge*.lnk"
|
||||||
# Check if Edge shortcuts exist on the desktop
|
# Check if Edge shortcuts exist on the desktop
|
@ -6,6 +6,12 @@ Function Uninstall-WinUtilEdgeBrowser {
|
|||||||
This will switch up the region to one of the EEA countries temporarily and uninstall the Edge Browser (Chromium).
|
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 {
|
function Uninstall-EdgeClient {
|
||||||
param (
|
param (
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
@ -65,6 +71,16 @@ Function Uninstall-WinUtilEdgeBrowser {
|
|||||||
[microsoft.win32.registry]::SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdateDev", "AllowUninstall", 1, [Microsoft.Win32.RegistryValueKind]::DWord) | 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}'
|
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 {
|
function Uninstall-WebView {
|
||||||
@ -93,9 +109,30 @@ Function Uninstall-WinUtilEdgeBrowser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Start-Process cmd.exe "/c $uninstallCmdLine" -WindowStyle Hidden -Wait
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
Uninstall-Edge
|
function Install-Edge {
|
||||||
# Uninstall-WebView - WebView is needed for Visual Studio and some MS Store Games like Forza
|
$tempEdgePath = "$env:TEMP\MicrosoftEdgeSetup.exe"
|
||||||
Uninstall-EdgeUpdate
|
|
||||||
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ function Invoke-WPFGetIso {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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"
|
||||||
[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
|
||||||
@ -85,7 +85,7 @@ function Invoke-WPFGetIso {
|
|||||||
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo"
|
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo"
|
||||||
|
|
||||||
# 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
|
||||||
Write-Debug "Size of ISO file: $($isoSize) bytes"
|
Write-Debug "Size of ISO file: $($isoSize) bytes"
|
||||||
# Use this procedure to get the free space of the drive depending on where the user profile folder is stored.
|
# Use this procedure to get the free space of the drive depending on where the user profile folder is stored.
|
||||||
# This is done to guarantee a dynamic solution, as the installation drive may be mounted to a letter different than C
|
# This is done to guarantee a dynamic solution, as the installation drive may be mounted to a letter different than C
|
||||||
@ -122,7 +122,7 @@ function Invoke-WPFGetIso {
|
|||||||
# there is probably a better way of doing this, I don't have time to figure this out
|
# there is probably a better way of doing this, I don't have time to figure this out
|
||||||
$sync.MicrowinIsoDrive.Text = $driveLetter
|
$sync.MicrowinIsoDrive.Text = $driveLetter
|
||||||
|
|
||||||
$mountedISOPath = (Split-Path -Path $filePath)
|
$mountedISOPath = (Split-Path -Path "$filePath")
|
||||||
if ($sync.MicrowinScratchDirBox.Text.Trim() -eq "Scratch") {
|
if ($sync.MicrowinScratchDirBox.Text.Trim() -eq "Scratch") {
|
||||||
$sync.MicrowinScratchDirBox.Text =""
|
$sync.MicrowinScratchDirBox.Text =""
|
||||||
}
|
}
|
||||||
@ -186,7 +186,7 @@ function Invoke-WPFGetIso {
|
|||||||
$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, use only official images. Here are instructions how to download ISO images if the Microsoft website is not showing the link to download and ISO. https://www.techrepublic.com/article/how-to-download-a-windows-10-iso-file-without-using-the-media-creation-tool/"
|
||||||
Write-Host $msg
|
Write-Host $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)
|
||||||
|
@ -63,11 +63,11 @@ public class PowerManagement {
|
|||||||
$scratchDir = $sync.MicrowinScratchDir.Text
|
$scratchDir = $sync.MicrowinScratchDir.Text
|
||||||
|
|
||||||
# Detect if the Windows image is an ESD file and convert it to WIM
|
# Detect if the Windows image is an ESD file and convert it to WIM
|
||||||
if (-not (Test-Path -Path $mountDir\sources\install.wim -PathType Leaf) -and (Test-Path -Path $mountDir\sources\install.esd -PathType Leaf)) {
|
if (-not (Test-Path -Path "$mountDir\sources\install.wim" -PathType Leaf) -and (Test-Path -Path "$mountDir\sources\install.esd" -PathType Leaf)) {
|
||||||
Write-Host "Exporting Windows image to a WIM file, keeping the index we want to work on. This can take several minutes, depending on the performance of your computer..."
|
Write-Host "Exporting Windows image to a WIM file, keeping the index we want to work on. This can take several minutes, depending on the performance of your computer..."
|
||||||
Export-WindowsImage -SourceImagePath $mountDir\sources\install.esd -SourceIndex $index -DestinationImagePath $mountDir\sources\install.wim -CompressionType "Max"
|
Export-WindowsImage -SourceImagePath $mountDir\sources\install.esd -SourceIndex $index -DestinationImagePath $mountDir\sources\install.wim -CompressionType "Max"
|
||||||
if ($?) {
|
if ($?) {
|
||||||
Remove-Item -Path $mountDir\sources\install.esd -Force
|
Remove-Item -Path "$mountDir\sources\install.esd" -Force
|
||||||
# Since we've already exported the image index we wanted, switch to the first one
|
# Since we've already exported the image index we wanted, switch to the first one
|
||||||
$index = 1
|
$index = 1
|
||||||
} else {
|
} else {
|
||||||
@ -116,7 +116,7 @@ public class PowerManagement {
|
|||||||
if (Test-Path "$env:TEMP\DRV_EXPORT") {
|
if (Test-Path "$env:TEMP\DRV_EXPORT") {
|
||||||
Remove-Item "$env:TEMP\DRV_EXPORT" -Recurse -Force
|
Remove-Item "$env:TEMP\DRV_EXPORT" -Recurse -Force
|
||||||
}
|
}
|
||||||
if (($injectDrivers -and (Test-Path $sync.MicrowinDriverLocation.Text))) {
|
if (($injectDrivers -and (Test-Path "$($sync.MicrowinDriverLocation.Text)"))) {
|
||||||
Write-Host "Using specified driver source..."
|
Write-Host "Using specified driver source..."
|
||||||
dism /english /online /export-driver /destination="$($sync.MicrowinDriverLocation.Text)" | Out-Host
|
dism /english /online /export-driver /destination="$($sync.MicrowinDriverLocation.Text)" | Out-Host
|
||||||
if ($?) {
|
if ($?) {
|
||||||
@ -151,39 +151,16 @@ public class PowerManagement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Remove Features from the image"
|
Write-Host "Remove Features from the image"
|
||||||
Remove-Features -keepDefender:$keepDefender
|
Remove-Features
|
||||||
Write-Host "Removing features complete!"
|
Write-Host "Removing features complete!"
|
||||||
|
Write-Host "Removing OS packages"
|
||||||
|
Remove-Packages
|
||||||
|
Write-Host "Removing Appx Bloat"
|
||||||
|
Remove-ProvisionedPackages
|
||||||
|
|
||||||
if (!$keepPackages) {
|
|
||||||
Write-Host "Removing OS packages"
|
|
||||||
Remove-Packages
|
|
||||||
}
|
|
||||||
if (!$keepProvisionedPackages) {
|
|
||||||
Write-Host "Removing Appx Bloat"
|
|
||||||
Remove-ProvisionedPackages -keepSecurity:$keepDefender
|
|
||||||
}
|
|
||||||
|
|
||||||
# special code, for some reason when you try to delete some inbox apps
|
|
||||||
# we have to get and delete log files directory.
|
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\LogFiles\WMI\RtBackup" -Directory
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\LogFiles\WMI\RtBackup" -Directory
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\WebThreatDefSvc" -Directory
|
|
||||||
|
|
||||||
# Defender is hidden in 2 places we removed a feature above now need to remove it from the disk
|
|
||||||
if (!$keepDefender) {
|
|
||||||
Write-Host "Removing Defender"
|
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Program Files\Windows Defender" -Directory
|
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Program Files (x86)\Windows Defender"
|
|
||||||
}
|
|
||||||
if (!$keepEdge) {
|
|
||||||
Write-Host "Removing Edge"
|
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Program Files (x86)\Microsoft" -mask "*edge*" -Directory
|
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Program Files\Microsoft" -mask "*edge*" -Directory
|
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\SystemApps" -mask "*edge*" -Directory
|
|
||||||
}
|
|
||||||
|
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\DiagTrack" -Directory
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\DiagTrack" -Directory
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\InboxApps" -Directory
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\InboxApps" -Directory
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\SecurityHealthSystray.exe"
|
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\LocationNotificationWindows.exe"
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\LocationNotificationWindows.exe"
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Program Files (x86)\Windows Photo Viewer" -Directory
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Program Files (x86)\Windows Photo Viewer" -Directory
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Program Files\Windows Photo Viewer" -Directory
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Program Files\Windows Photo Viewer" -Directory
|
||||||
@ -196,9 +173,7 @@ public class PowerManagement {
|
|||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\GameBarPresenceWriter"
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\GameBarPresenceWriter"
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\OneDriveSetup.exe"
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\OneDriveSetup.exe"
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\OneDrive.ico"
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\OneDrive.ico"
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\SystemApps" -mask "*Windows.Search*" -Directory
|
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\SystemApps" -mask "*narratorquickstart*" -Directory
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\SystemApps" -mask "*narratorquickstart*" -Directory
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\SystemApps" -mask "*Xbox*" -Directory
|
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\SystemApps" -mask "*ParentalControls*" -Directory
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\SystemApps" -mask "*ParentalControls*" -Directory
|
||||||
Write-Host "Removal complete!"
|
Write-Host "Removal complete!"
|
||||||
|
|
||||||
@ -225,28 +200,6 @@ public class PowerManagement {
|
|||||||
New-Item -ItemType Directory -Force -Path "$desktopDir"
|
New-Item -ItemType Directory -Force -Path "$desktopDir"
|
||||||
dism /English /image:$($scratchDir) /set-profilepath:"$($scratchDir)\Windows\Users\Default"
|
dism /English /image:$($scratchDir) /set-profilepath:"$($scratchDir)\Windows\Users\Default"
|
||||||
|
|
||||||
# $command = "powershell.exe -NoProfile -ExecutionPolicy Bypass -Command 'irm https://christitus.com/win | iex'"
|
|
||||||
# $shortcutPath = "$desktopDir\WinUtil.lnk"
|
|
||||||
# $shell = New-Object -ComObject WScript.Shell
|
|
||||||
# $shortcut = $shell.CreateShortcut($shortcutPath)
|
|
||||||
|
|
||||||
# if (Test-Path -Path "$env:TEMP\cttlogo.png")
|
|
||||||
# {
|
|
||||||
# $pngPath = "$env:TEMP\cttlogo.png"
|
|
||||||
# $icoPath = "$env:TEMP\cttlogo.ico"
|
|
||||||
# ConvertTo-Icon -bitmapPath $pngPath -iconPath $icoPath
|
|
||||||
# Write-Host "ICO file created at: $icoPath"
|
|
||||||
# Copy-Item "$env:TEMP\cttlogo.png" "$($scratchDir)\Windows\cttlogo.png" -force
|
|
||||||
# Copy-Item "$env:TEMP\cttlogo.ico" "$($scratchDir)\Windows\cttlogo.ico" -force
|
|
||||||
# $shortcut.IconLocation = "c:\Windows\cttlogo.ico"
|
|
||||||
# }
|
|
||||||
|
|
||||||
# $shortcut.TargetPath = "powershell.exe"
|
|
||||||
# $shortcut.Arguments = "-NoProfile -ExecutionPolicy Bypass -Command `"$command`""
|
|
||||||
# $shortcut.Save()
|
|
||||||
# Write-Host "Shortcut to winutil created at: $shortcutPath"
|
|
||||||
# *************************** Automation black ***************************
|
|
||||||
|
|
||||||
Write-Host "Copy checkinstall.cmd into the ISO"
|
Write-Host "Copy checkinstall.cmd into the ISO"
|
||||||
New-CheckInstall
|
New-CheckInstall
|
||||||
Copy-Item "$env:temp\checkinstall.cmd" "$($scratchDir)\Windows\checkinstall.cmd" -force
|
Copy-Item "$env:temp\checkinstall.cmd" "$($scratchDir)\Windows\checkinstall.cmd" -force
|
||||||
@ -282,25 +235,20 @@ public class PowerManagement {
|
|||||||
reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d 1 /f
|
reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d 1 /f
|
||||||
reg add "HKLM\zSYSTEM\Setup\MoSetup" /v "AllowUpgradesWithUnsupportedTPMOrCPU" /t REG_DWORD /d 1 /f
|
reg add "HKLM\zSYSTEM\Setup\MoSetup" /v "AllowUpgradesWithUnsupportedTPMOrCPU" /t REG_DWORD /d 1 /f
|
||||||
|
|
||||||
if (!$keepEdge) {
|
# Prevent Windows Update Installing so called Expedited Apps
|
||||||
Write-Host "Removing Edge icon from taskbar"
|
@(
|
||||||
reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /v "Favorites" /f >$null 2>&1
|
'EdgeUpdate',
|
||||||
reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /v "FavoritesChanges" /f >$null 2>&1
|
'DevHomeUpdate',
|
||||||
reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /v "Pinned" /f >$null 2>&1
|
'OutlookUpdate',
|
||||||
reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /v "LayoutCycle" /f >$null 2>&1
|
'CrossDeviceUpdate'
|
||||||
Write-Host "Edge icon removed from taskbar"
|
) | ForEach-Object {
|
||||||
if (Test-Path "HKLM:\zSOFTWARE\WOW6432Node") {
|
Write-Host "Removing Windows Expedited App: $_"
|
||||||
# Remove leftovers of 64-bit installations
|
|
||||||
# ---
|
# Copied here After Installation (Online)
|
||||||
# Remove registry values first...
|
# reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Orchestrator\UScheduler\$_" /f | Out-Null
|
||||||
reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" /va /f > $null 2>&1
|
|
||||||
reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" /va /f > $null 2>&1
|
# When in Offline Image
|
||||||
reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" /va /f > $null 2>&1
|
reg delete "HKLM\zSOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\$_" /f | Out-Null
|
||||||
# ...then the registry keys
|
|
||||||
reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" /f > $null 2>&1
|
|
||||||
reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" /f > $null 2>&1
|
|
||||||
reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" /f > $null 2>&1
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 0 /f
|
reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 0 /f
|
||||||
@ -341,7 +289,7 @@ public class PowerManagement {
|
|||||||
Write-Host "Cleanup complete."
|
Write-Host "Cleanup complete."
|
||||||
|
|
||||||
Write-Host "Unmounting image..."
|
Write-Host "Unmounting image..."
|
||||||
Dismount-WindowsImage -Path $scratchDir -Save
|
Dismount-WindowsImage -Path "$scratchDir" -Save
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -403,7 +351,7 @@ public class PowerManagement {
|
|||||||
reg unload HKLM\zSYSTEM
|
reg unload HKLM\zSYSTEM
|
||||||
|
|
||||||
Write-Host "Unmounting image..."
|
Write-Host "Unmounting image..."
|
||||||
Dismount-WindowsImage -Path $scratchDir -Save
|
Dismount-WindowsImage -Path "$scratchDir" -Save
|
||||||
|
|
||||||
Write-Host "Creating ISO image"
|
Write-Host "Creating ISO image"
|
||||||
|
|
||||||
@ -417,7 +365,7 @@ public class PowerManagement {
|
|||||||
|
|
||||||
Write-Host "[INFO] Using oscdimg.exe from: $oscdimgPath"
|
Write-Host "[INFO] Using oscdimg.exe from: $oscdimgPath"
|
||||||
|
|
||||||
$oscdimgProc = Start-Process -FilePath "$oscdimgPath" -ArgumentList "-m -o -u2 -udfver102 -bootdata:2#p0,e,b$mountDir\boot\etfsboot.com#pEF,e,b$mountDir\efi\microsoft\boot\efisys.bin `"$mountDir`" `"$($SaveDialog.FileName)`"" -Wait -PassThru -NoNewWindow
|
$oscdimgProc = Start-Process -FilePath "$oscdimgPath" -ArgumentList "-m -o -u2 -udfver102 -bootdata:2#p0,e,b`"$mountDir\boot\etfsboot.com`"#pEF,e,b`"$mountDir\efi\microsoft\boot\efisys.bin`" `"$mountDir`" `"$($SaveDialog.FileName)`"" -Wait -PassThru -NoNewWindow
|
||||||
|
|
||||||
$LASTEXITCODE = $oscdimgProc.ExitCode
|
$LASTEXITCODE = $oscdimgProc.ExitCode
|
||||||
|
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
Get-ChildItem @(
|
|
||||||
"$env:SystemRoot\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package*.mum",
|
|
||||||
"$env:SystemRoot\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package*.mum"
|
|
||||||
) | ForEach-Object { dism.exe /online /norestart /add-package:"$_" }
|
|
@ -563,17 +563,17 @@ function Add-LinkAttributeToJson {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Update-Progress "Loading JSON files" 10
|
Update-Progress "Loading JSON files" 10
|
||||||
$tweaks = Get-Content -Path "config/tweaks.json" | ConvertFrom-Json
|
$tweaks = Get-Content -Path "../config/tweaks.json" | ConvertFrom-Json
|
||||||
$features = Get-Content -Path "config/feature.json" | ConvertFrom-Json
|
$features = Get-Content -Path "../config/feature.json" | ConvertFrom-Json
|
||||||
|
|
||||||
Update-Progress "Getting last modified dates of the JSON files" 20
|
Update-Progress "Getting last modified dates of the JSON files" 20
|
||||||
$tweaksLastModified = (Get-Item "config/tweaks.json").LastWriteTime.ToString("yyyy-MM-dd")
|
$tweaksLastModified = (Get-Item "../config/tweaks.json").LastWriteTime.ToString("yyyy-MM-dd")
|
||||||
$featuresLastModified = (Get-Item "config/feature.json").LastWriteTime.ToString("yyyy-MM-dd")
|
$featuresLastModified = (Get-Item "../config/feature.json").LastWriteTime.ToString("yyyy-MM-dd")
|
||||||
|
|
||||||
$tweaksOutputDir = "docs/dev/tweaks"
|
$tweaksOutputDir = "../docs/dev/tweaks"
|
||||||
$featuresOutputDir = "docs/dev/features"
|
$featuresOutputDir = "../docs/dev/features"
|
||||||
$privateFunctionsDir = "functions/private"
|
$privateFunctionsDir = "../functions/private"
|
||||||
$publicFunctionsDir = "functions/public"
|
$publicFunctionsDir = "../functions/public"
|
||||||
$functions = @{}
|
$functions = @{}
|
||||||
$itemnametocut = "WPF(WinUtil|Toggle|Features?|Tweaks?|Panel|Fix(es)?)?"
|
$itemnametocut = "WPF(WinUtil|Toggle|Features?|Tweaks?|Panel|Fix(es)?)?"
|
||||||
|
|
||||||
@ -592,7 +592,7 @@ Load-Functions -dir $publicFunctionsDir
|
|||||||
Update-Progress "Adding documentation links to JSON files" 50
|
Update-Progress "Adding documentation links to JSON files" 50
|
||||||
|
|
||||||
# Define the JSON file paths
|
# Define the JSON file paths
|
||||||
$jsonPaths = @(".\config\feature.json", ".\config\tweaks.json")
|
$jsonPaths = @("../config/feature.json", "../config/tweaks.json")
|
||||||
|
|
||||||
# Loop through each JSON file path
|
# Loop through each JSON file path
|
||||||
foreach ($jsonPath in $jsonPaths) {
|
foreach ($jsonPath in $jsonPaths) {
|
||||||
@ -612,12 +612,12 @@ foreach ($jsonPath in $jsonPaths) {
|
|||||||
Set-Content -Path $jsonPath -Value $jsonString
|
Set-Content -Path $jsonPath -Value $jsonString
|
||||||
}
|
}
|
||||||
|
|
||||||
Add-LinkAttributeToJson -jsonFilePath "config/tweaks.json" -outputDir "dev/tweaks"
|
Add-LinkAttributeToJson -jsonFilePath "../config/tweaks.json" -outputDir "dev/tweaks"
|
||||||
Add-LinkAttributeToJson -jsonFilePath "config/feature.json" -outputDir "dev/features"
|
Add-LinkAttributeToJson -jsonFilePath "../config/feature.json" -outputDir "dev/features"
|
||||||
|
|
||||||
Update-Progress "Generating content for documentation" 60
|
Update-Progress "Generating content for documentation" 60
|
||||||
$tweakResult = Generate-MarkdownFiles -data $tweaks -outputDir $tweaksOutputDir -jsonFilePath "config/tweaks.json" -lastModified $tweaksLastModified -type "tweak" -initialProgress 60
|
$tweakResult = Generate-MarkdownFiles -data $tweaks -outputDir $tweaksOutputDir -jsonFilePath "../config/tweaks.json" -lastModified $tweaksLastModified -type "tweak" -initialProgress 60
|
||||||
$featureResult = Generate-MarkdownFiles -data $features -outputDir $featuresOutputDir -jsonFilePath "config/feature.json" -lastModified $featuresLastModified -type "feature" -initialProgress 70
|
$featureResult = Generate-MarkdownFiles -data $features -outputDir $featuresOutputDir -jsonFilePath "../config/feature.json" -lastModified $featuresLastModified -type "feature" -initialProgress 70
|
||||||
|
|
||||||
Update-Progress "Generating table of contents" 80
|
Update-Progress "Generating table of contents" 80
|
||||||
$allTocEntries = $tweakResult.TocEntries + $featureResult.TocEntries
|
$allTocEntries = $tweakResult.TocEntries + $featureResult.TocEntries
|
||||||
@ -639,6 +639,6 @@ $indexContent += Process-MultilineStrings @"
|
|||||||
\\
|
\\
|
||||||
"@
|
"@
|
||||||
$indexContent += $(Generate-TypeSectionContent $featureEntries) + "`r`n"
|
$indexContent += $(Generate-TypeSectionContent $featureEntries) + "`r`n"
|
||||||
Set-Content -Path "docs/devdocs.md" -Value $indexContent -Encoding utf8
|
Set-Content -Path "../docs/devdocs.md" -Value $indexContent -Encoding utf8
|
||||||
|
|
||||||
Update-Progress "Process Completed" 100
|
Update-Progress "Process Completed" 100
|
@ -647,23 +647,25 @@
|
|||||||
Consider using a Math Solver, will help in making
|
Consider using a Math Solver, will help in making
|
||||||
development of these things much easier
|
development of these things much easier
|
||||||
-->
|
-->
|
||||||
|
<!-- Changed the font size from {SearchBarTextBoxFontSize} to 12. This now display the text box correctly in the text box.-->
|
||||||
<TextBox
|
<TextBox
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Width="{SearchBarWidth}"
|
Width="{SearchBarWidth}"
|
||||||
Height="{SearchBarHeight}"
|
Height="{SearchBarHeight}"
|
||||||
FontSize="{SearchBarTextBoxFontSize}"
|
FontSize="12"
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
Name="SearchBar"
|
Name="SearchBar"
|
||||||
Foreground="{MainForegroundColor}" Background="{MainBackgroundColor}"
|
Foreground="{MainForegroundColor}" Background="{MainBackgroundColor}"
|
||||||
ToolTip="Press Ctrl-F and type app name to filter application list below. Press Esc to reset the filter">
|
ToolTip="Press Ctrl-F and type app name to filter application list below. Press Esc to reset the filter">
|
||||||
</TextBox>
|
</TextBox>
|
||||||
|
<!--Changed the margin from 16 to 180, which now places the magnifying glass icon on the right side of the text box. Now able to see what is been searched for.-->
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||||
FontFamily="Segoe MDL2 Assets"
|
FontFamily="Segoe MDL2 Assets"
|
||||||
FontSize="{IconFontSize}"
|
FontSize="{IconFontSize}"
|
||||||
Margin="16,0,0,0"></TextBlock>
|
Margin="180,0,0,0"></TextBlock>
|
||||||
<!--
|
<!--
|
||||||
TODO:
|
TODO:
|
||||||
Make this ClearButton Positioning react to
|
Make this ClearButton Positioning react to
|
||||||
@ -671,11 +673,12 @@
|
|||||||
Consider using a Math Solver, will help in making
|
Consider using a Math Solver, will help in making
|
||||||
development of these things much easier
|
development of these things much easier
|
||||||
-->
|
-->
|
||||||
|
<!-- changed the {SearchBarClearButtonMargin} value from 193 to 205, which now places the clear button on the outside of the text box. -->
|
||||||
<Button Grid.Column="0"
|
<Button Grid.Column="0"
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||||
Name="SearchBarClearButton"
|
Name="SearchBarClearButton"
|
||||||
Style="{StaticResource SearchBarClearButtonStyle}"
|
Style="{StaticResource SearchBarClearButtonStyle}"
|
||||||
Margin="193,0,0,0" Visibility="Collapsed"/>
|
Margin="205,0,0,0" Visibility="Collapsed"/>
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
@ -904,11 +907,6 @@
|
|||||||
<StackPanel Name="MicrowinOptionsPanel" HorizontalAlignment="Left" SnapsToDevicePixels="True" Margin="1" Visibility="Hidden">
|
<StackPanel Name="MicrowinOptionsPanel" HorizontalAlignment="Left" SnapsToDevicePixels="True" Margin="1" Visibility="Hidden">
|
||||||
<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" />
|
||||||
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">Choose Windows features you want to remove from the ISO</TextBlock>
|
|
||||||
<CheckBox Name="WPFMicrowinKeepProvisionedPackages" Content="Keep Provisioned Packages" Margin="-10,5,0,0" ToolTip="Do not remove Microsoft Provisioned packages from the ISO."/>
|
|
||||||
<CheckBox Name="WPFMicrowinKeepAppxPackages" Content="Keep Appx Packages" Margin="-10,5,0,0" ToolTip="Do not remove Microsoft Appx packages from the ISO."/>
|
|
||||||
<CheckBox Name="WPFMicrowinKeepDefender" Content="Keep Defender" Margin="-10,5,0,0" IsChecked="True" ToolTip="Do not remove Microsoft Antivirus from the ISO."/>
|
|
||||||
<CheckBox Name="WPFMicrowinKeepEdge" Content="Keep Edge" Margin="-10,5,0,0" IsChecked="True" ToolTip="Do not remove Microsoft Edge from the ISO."/>
|
|
||||||
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
||||||
<CheckBox Name="MicrowinInjectDrivers" Content="Inject drivers (I KNOW WHAT I'M DOING)" Margin="-10,5,0,0" IsChecked="False" ToolTip="Path to unpacked drivers all sys and inf files for devices that need drivers"/>
|
<CheckBox Name="MicrowinInjectDrivers" Content="Inject drivers (I KNOW WHAT I'M DOING)" Margin="-10,5,0,0" IsChecked="False" ToolTip="Path to unpacked drivers all sys and inf files for devices that need drivers"/>
|
||||||
<TextBox Name="MicrowinDriverLocation" Background="Transparent" BorderThickness="1" BorderBrush="{MainForegroundColor}"
|
<TextBox Name="MicrowinDriverLocation" Background="Transparent" BorderThickness="1" BorderBrush="{MainForegroundColor}"
|
||||||
@ -970,11 +968,8 @@
|
|||||||
Foreground="{ComboBoxForegroundColor}">
|
Foreground="{ComboBoxForegroundColor}">
|
||||||
<Bold>MicroWin features:</Bold><LineBreak/>
|
<Bold>MicroWin features:</Bold><LineBreak/>
|
||||||
- Remove Telemetry and Tracking <LineBreak/>
|
- Remove Telemetry and Tracking <LineBreak/>
|
||||||
- Add ability to use local accounts <LineBreak/>
|
- Fast Install using "User" local account <LineBreak/>
|
||||||
- Remove Wifi requirement to finish install <LineBreak/>
|
- No internet requirement for install <LineBreak/>
|
||||||
- Ability to remove Edge <LineBreak/>
|
|
||||||
- Ability to remove Defender <LineBreak/>
|
|
||||||
- Remove Teams <LineBreak/>
|
|
||||||
- Apps debloat <LineBreak/>
|
- Apps debloat <LineBreak/>
|
||||||
<LineBreak/>
|
<LineBreak/>
|
||||||
<LineBreak/>
|
<LineBreak/>
|
||||||
@ -988,7 +983,6 @@
|
|||||||
- Click on the "Select Windows ISO" button and wait for WinUtil to process the image <LineBreak/>
|
- Click on the "Select Windows ISO" button and wait for WinUtil to process the image <LineBreak/>
|
||||||
It will be processed and unpacked which may take some time <LineBreak/>
|
It will be processed and unpacked which may take some time <LineBreak/>
|
||||||
- Once complete, choose which Windows flavor you want to base your image on <LineBreak/>
|
- Once complete, choose which Windows flavor you want to base your image on <LineBreak/>
|
||||||
- Choose which features you want to keep <LineBreak/>
|
|
||||||
- Click the "Start Process" button <LineBreak/>
|
- Click the "Start Process" button <LineBreak/>
|
||||||
The process of creating the Windows image may take some time, please check the console and wait for it to say "Done" <LineBreak/>
|
The process of creating the Windows image may take some time, please check the console and wait for it to say "Done" <LineBreak/>
|
||||||
- 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/>
|
||||||
|
Loading…
Reference in New Issue
Block a user