-
-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathwputility.bat
More file actions
2987 lines (2535 loc) · 135 KB
/
wputility.bat
File metadata and controls
2987 lines (2535 loc) · 135 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
@echo off
title WPU (Windows Personalization Utility)
goto comment_end
This script automatically modifies the registry to disable or enable Windows updates.
It will also check the standard windows folder where updates are stored, and deletes any
files or folders within the folder to clean up disk-space. Updates are normally found in:
c:\windows\softwaredistribution
Menu List
menuAdvanced
menuAppsManage
menuServicesDebloat
menuDeleteUser
menuServicesUpdates
menuUpdatesCleanFiles
menuUsersManage
Task List
taskAppsInstall
taskAppsUninstall
taskCortanaToggle
taskCrapwareUninstall
taskDebloatServices
taskRegistryBackup
taskTelemetryDisable
taskUpdatesCleanFiles
taskUpdatesDisable
taskUpdatesEnable
taskUserEnableDisable
taskUserGetStatus
Prompt List
promptAppsInstall
promptAppsUninstall
Session List
sessAdvanced
sessError
sessFinish
sessQuit
Internal List
forceQuit
helperUnquote
actionProgUpdate
Windows Packages / Apps
Powershell:
@ref https://hahndorf.eu/blog/windowsfeatureviacmd
Install Calculator: Get-AppxPackage -AllUsers *windowscalculator* | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”}
Remove Calculator: Get-AppxPackage *calculator* | Remove-AppxPackage -AllUsers
Install Alternative: Get-AppxProvisionedPackage -Online | Where-Object {$_.PackageName -like "*3dbuilder*"} | Remove-AppxProvisionedPackage -Online
Uninstall All But MSStore Get-AppxPackage -AllUsers | Where-Object {$_.name –notlike "*store*"} | Remove-AppxPackage -AllUsers
List Packages: Get-AppxPackage -AllUsers | Select-Object Name, PackageFullName
Get-AppXPackage -AllUsers | Where-Object {$_.InstallLocation -like "*SystemApps*"} | Select-Object Name, PackageFullName
Get-AppXPackage -AllUsers | Where-Object {$_.NonRemovable -eq $False} | Select-Object Name, PackageFullName
Get-AppXPackage -AllUsers | Where-Object {$_.NonRemovable -eq $False} | Select-Object Name, PackageFullName | out-file 'cache.pkg' -encoding utf8
Search for Package: Get-AppXPackage -AllUsers | Where-Object {$_.NonRemovable -eq $False} | Select-Object Name, PackageFullName | findstr /I 549981C3F5F10
Get-AppxPackage -Name *Copilot* | Select-Object Name, InstallLocation, Status | Format-List
Get Users With App: (Get-AppxPackage -AllUsers Microsoft.549981C3F5F10).PackageUserInformation | Where-Object {$_.InstallState -eq "Installed"}
Get Windows Features: Get-WindowsOptionalFeature -Online
Get Windows Packages: Get-WindowsPackage -Online
Winget:
Search Installable Packages: winget search --name copilot
winget search -q 9NHT9RB2F4HD (Copilot)
Search Installed Packages: winget list -q "Microsoft.PowerShell" (Powershell 7.x)
Install Package: winget install --id 9NHT9RB2F4HD (Copilot)
winget install --id MartiCliment.UniGetUI --silent (UniGetUI)
winget install --id MartiCliment.UniGetUI --exact --source winget (UniGetUI)
Uninstall Package: winget uninstall --id 9PJVPMSB6GVH (Interviewer Copilot)
winget uninstall --id MartiCliment.UniGetUI (UniGetUI)
DISM ()
Get Packages: dism /online /get-packages /format:table
Get Features: dism /online /get-features /format:table
Get Package Info: dism /online /get-featureinfo /featurename:Recall
Add Package: dism /online /add-package /PackagePath:C:\Cortana
Disable Package: dism /online /disable-feature /featurename:Recall
Enable Package: dism /online /enable-Feature /featurename:Recall
:comment_end
:: #
:: @desc To perform registry edits, we need admin permissions.
:: Re-launch powershell with admin, and close existing command prompt window
:: #
if not "%1"=="admin" (powershell start -verb runas '%0' admin & exit /b)
net session > nul 2>&1
if %errorlevel% neq 0 (
echo %red% Error %u% This script requires elevated privileges to run.
goto :sessError
)
:: #
:: @desc resize the batch window and adjust the buffer so that text does not get cut off.
:: #
set cols=125
set lines=40
set colsbuff=125
set linesbuff=500
mode con: cols=%cols% lines=%lines%
powershell -command "&{$H=get-host;$W=$H.ui.rawui;$B=$W.buffersize;$B.width=%colsbuff%;$B.height=%linesbuff%;$W.buffersize=$B;}"
:: #
:: @desc define vars
:: #
:variables
set "dir_home=%~dp0"
set "dir_reg=%dir_home%registryBackup"
set "dir_cache=%dir_home%cache"
set "repo_url=https://github.com/Aetherinox/pause-windows-updates"
set "repo_author=Aetherinox"
set "repo_version=1.6.0"
set "folder_distrb=c:\windows\softwaredistribution"
set "folder_uhssvc=c:\Program Files\Microsoft Update Health Tools"
set "cnt_files=0"
set "cnt_dirs=0"
:: throws extra prints and information
set "appsInitialized=true"
set "noUpdatesState=0x0"
set "AutoUpdate=false"
set "AutoUpdateBool=disabled"
set "AutoUpdateStr=disable"
set "userGuest=Guest"
set "userDefault0=defaultuser0"
set "userGuestState=Enabled"
set "userGuestStateOpp=Disable"
set "osBuild="
set "osCodename="
set "osMajor="
set "osMinor="
set "debugMode=true"
:: colors
set "u=[0m"
set "bold=[1m"
set "under=[4m"
set "inverse=[7m"
set "blink=[5m"
set "cyanl=[96m"
set "cyand=[36m"
set "magental=[95m"
set "magentad=[35m"
set "white=[97m"
:: 256 colors
set "lime=[38;5;154m"
set "brown=[38;5;94m"
set "greenl=[38;5;46m"
set "green=[38;5;40m"
set "greenm=[38;5;42m"
set "greend=[38;5;35m"
set "yellowl=[38;5;226m"
set "yellow=[38;5;220m"
set "bluel=[38;5;45m"
set "blue=[38;5;39m"
set "blued=[38;5;33m"
set "blueb=[38;5;75m"
set "purplel=[38;5;105m"
set "purple=[38;5;99m"
set "fuchsia1=[38;5;1m"
set "fuchsia2=[38;5;162m"
set "peach=[38;5;174m"
set "debug=[38;5;91m"
set "pinkl=[38;5;13m"
set "pink=[38;5;206m"
set "pinkd=[38;5;200m"
set "yellowl=[38;5;228m"
set "yellowm=[38;5;226m"
set "yellowd=[38;5;190m"
set "orangel=[38;5;215m"
set "orange=[38;5;208m"
set "oranged=[38;5;202m"
set "goldl=[38;5;220m"
set "goldm=[38;5;178m"
set "goldd=[38;5;214m"
set "grayb=[38;5;250m"
set "greyl=[38;5;247m"
set "graym=[38;5;244m"
set "grayd=[38;5;238m"
set "grayz=[38;5;237m"
set "redl=[91m"
set "red=[38;5;160m"
set "redd=[38;5;124m"
set "redz=[38;5;88m"
:: add spaces so that service names are in columns
set "spaces= "
:: #
:: define services
:: uhssvc Microsoft Update Health Service
:: Maintains Update Health
:: "C:\Program Files\Microsoft Update Health Tools\uhssvc.exe"
::
:: UsoSvc Update Orchestrator Service
:: Manages Windows Updates. If stopped, your devices will not be able to download and install the latest updates.
:: "C:\Windows\system32\svchost.exe -k netsvcs -p"
::
:: WaaSMedicSvc Windows Update Medic Service
:: "C:\Windows\system32\svchost.exe -k wusvcs -p"
::
:: wuauserv Windows Update Service
:: Enables the detection, download, and installation of updates for Windows and other programs. If this service is disabled, users of this computer will not be able to use Windows Update or its automatic updating feature, and programs will not be able to use the Windows Update Agent (WUA) API.
:: "C:\Windows\system32\svchost.exe -k netsvcs -p"
::
:: DiagTrack Connected User Experiences and Telemetry
:: dmwappushservice Device Management Wireless Application Protocol (WAP) Push message Routing Service
:: diagsvc Diagnostic Execution Service
:: diagnosticshub.standardcollector.service Microsoft (R) Diagnostics Hub Standard Collector Service
:: #
:: Windows Update Services
set "servicesUpdates[uhssvc]=Microsoft Update Health Service|uhssvc"
set "servicesUpdates[UsoSvc]=Update Orchestrator Service|UsoSvc"
set "servicesUpdates[WaaSMedicSvc]=Windows Update Medic Service|WaaSMedicSvc"
set "servicesUpdates[wuauserv]=Windows Update Service|wuauserv"
:: Windows Telemetry Services
set "servicesTelemetry[DiagTrack]=Connected User Experiences and Telemetry|DiagTrack"
set "servicesTelemetry[dmwappushservice]=Device Management Wireless Application|dmwappushservice"
set "servicesTelemetry[diagsvc]=Diagnostic Execution Service|diagsvc"
set "servicesTelemetry[diagnosticshub.standardcollector.service]=Microsoft (R) Diagnostics Hub|diagnosticshub.standardcollector.service"
:: Windows Services > Debloat
set "servicesUseless[01]=Microsoft Diagnostics Hub Collector|diagnosticshub.standardcollector.service"
set "servicesUseless[02]=Connected User Experiences & Telemetry|DiagTrack"
set "servicesUseless[03]=Device Management WAP Push Message|dmwappushservice"
set "servicesUseless[04]=Geolocation|lfsvc"
set "servicesUseless[05]=Downloaded Maps Manager|MapsBroker"
set "servicesUseless[06]=Net.Tcp Port Sharing|NetTcpPortSharing"
set "servicesUseless[07]=Routing & Remote Access|RemoteAccess"
set "servicesUseless[08]=Remote Registry|RemoteRegistry"
set "servicesUseless[09]=Internet Connection Sharing|SharedAccess"
set "servicesUseless[10]=Distributed Link Tracking Client|TrkWks"
set "servicesUseless[11]=Windows Biometric|WbioSrvc"
set "servicesUseless[12]=Windows Media Player Network Sharing|WMPNetworkSvc"
set "servicesUseless[13]=Xbox Live Auth Manager|XblAuthManager"
set "servicesUseless[14]=Xbox Live Game Save Save|XblGameSave"
set "servicesUseless[15]=Xbox Live Networking|XboxNetApiSvc"
set "servicesUseless[16]=Windows Network Data Usage Monitoring|ndu"
:: Disable Users
set "usersDisable[2]=Guest|guest"
set "usersDisable[3]=Administrator|Administrator"
set "usersDisable[4]=Default Account|DefaultAccount"
:: Disable tasks
set schtasksDisable[0]=\Microsoft\Windows\Application Experience\AITAgent
set schtasksDisable[1]=\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser
set schtasksDisable[2]=\Microsoft\Windows\Application Experience\ProgramDataUpdater
set schtasksDisable[3]=\Microsoft\Windows\Customer Experience Improvement Program\Consolidator
set schtasksDisable[4]=\Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask
set schtasksDisable[5]=\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip
set schtasksDisable[6]=\Microsoft\Office\OfficeTelemetryAgentFallBack
set schtasksDisable[7]=\Microsoft\Office\OfficeTelemetryAgentLogOn
set schtasksDisable[8]=\Microsoft\Office\OfficeTelemetryAgentFallBack2016
set schtasksDisable[9]=\Microsoft\Office\OfficeTelemetryAgentLogOn2016
set schtasksDisable[10]=\Microsoft\Office\Office 15 Subscription Heartbeat
set schtasksDisable[11]=\Microsoft\Office\Office 16 Subscription Heartbeat
set schtasksDisable[12]=\Microsoft\Windows\Maintenance\WinSAT
set schtasksDisable[13]=\Microsoft\Windows\CloudExperienceHost\CreateObjectTask
set schtasksDisable[14]=\Microsoft\Windows\NetTrace\GatherNetworkInfo
set schtasksDisable[15]=\Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector
set schtasksDisable[16]=\Microsoft\Office\OfficeTelemetryAgentFallBack
set schtasksDisable[17]=\Microsoft\Office\OfficeTelemetryAgentLogOn
:: Crapware
set crapwareIndexMax=40
set crapware[0]=Microsoft.Getstarted
set crapware[1]=Microsoft.XboxGamingOverlay
set crapware[2]=Microsoft.XboxGameOverlay
set crapware[3]=Microsoft.XboxIdentityProvider
set crapware[4]=Microsoft.XboxSpeechToTextOverlay
set crapware[5]=microsoft.windowscommunicationsapps
set crapware[6]=Microsoft.People
set crapware[7]=Microsoft.Messaging
set crapware[8]=Microsoft.GamingApp
set crapware[9]=Microsoft.ZuneMusic
set crapware[10]=Microsoft.ZuneVideo
set crapware[11]=Microsoft.549981C3F5F10
set crapware[12]=Clipchamp.Clipchamp
set crapware[13]=Microsoft.SkypeApp
set crapware[14]=Microsoft.Advertising.Xaml
set crapware[15]=Microsoft.Getstarted
set crapware[16]=Microsoft.Todos
set crapware[17]=Microsoft.GetHelp
set crapware[18]=MicrosoftTeams
set crapware[19]=Microsoft.BingSearch
set crapware[20]=Microsoft.BingHealthAndFitness
set crapware[21]=Microsoft.BingFoodAndDrink
set crapware[22]=Microsoft.WindowsFeedback
set crapware[23]=Microsoft.BingTranslator
set crapware[24]=Microsoft.BingTravel
set crapware[25]=Microsoft.News
set crapware[26]=Microsoft.Office.OneNote
set crapware[27]=MSTeams
set crapware[28]=Microsoft.Copilot
set crapware[29]=Microsoft.Microsoft3DViewer
set crapware[30]=Microsoft.Print3D
set crapware[31]=MicrosoftCorporationII.QuickAssist
set crapware[32]=Microsoft.Edge
set crapware[33]=Microsoft.MicrosoftSolitaireCollection
set crapware[34]=Microsoft.BingWeather
set crapware[35]=Microsoft.BingSports
set crapware[36]=Microsoft.BingNews
set crapware[37]=Microsoft.BingFinance
set crapware[38]=Microsoft.XboxApp
set crapware[39]=Microsoft.Xbox.TCUI
set crapware[39]=Microsoft.3dbuilder
set crapware[40]=Microsoft.WindowsAlarms
set crapware[41]=Microsoft.YourPhone
:: #
:: @desc registry tweaks
:: set "rTweaksGeneral[index]=group_id | name | reg_path | reg_key | reg_type | reg_val_enable | reg_val_disabled | is_secondary"
:: index id .................. %%~a
:: group id .................. %%~b
:: name ...................... %%~c
:: reg path .................. %%~d
:: reg key ................... %%~e
:: reg type .................. %%~f
:: reg val enabled ........... %%~g
:: reg val disabled .......... %%~h
:: is secondary .............. %%~i
::
:: if a single setting requires multiple rules to complete; create all of the rules line by line, but ensure the group id is the same
:: for all of the joined rules. set the first rule's secondary option to false, set all sub rules as true
:: [index]=group_id | name | reg_path | reg_key | reg_type | reg_val_enable | reg_val_disabled | is_secondary
::
:: [01]=0001 | Single Rule | HKLM\ | MyKey | REG_DWORD | 0x0 | 0x1 | false
:: [02]=0002 | Double Rule #1 | HKLM\ | MyKey | REG_DWORD | 0x0 | 0x1 | false
:: [03]=0002 | Double Rule #2 | HKLM\ | MyKey | REG_DWORD | 0x0 | 0x1 | true
::
:: - title of the second rule doesnt matter since they are grouped. only the title from the first rule will show in menu
:: - index number MUST be different for each rule, even if the rules are grouped. Use the group id to group them.
:: - group id number is what will show in menu for user to select a tweak
:: #
set "rTweaksGeneral[01]=01|Automatic Maintenance|HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance|MaintenanceDisabled|REG_DWORD|0x0|0x1|false"
set "rTweaksGeneral[02]=02|Bypass Windows TPM/CPU Requirements|HKLM\System\Setup|AllowUpgradesWithUnsupportedTPMOrCPU|REG_DWORD|0x1|0x0|false"
set "rTweaksGeneral[03]=03|Power Throttling (Battery Save)|HKLM\System\CurrentControlSet\Control\Power\PowerThrottling|PowerThrottlingOff|REG_DWORD|0x0|0x1|false"
set "rTweaksGeneral[04]=04|Remove Recommended Section from Start Menu|HKLM\Software\Policies\Microsoft\Windows\Explorer|HideRecommendedSection|REG_DWORD|0x0|0x1|false"
set "rTweaksGeneral[05]=04|Remove Recommended Section from Start Menu|HKCU\Software\Policies\Microsoft\Windows\Explorer|HideRecommendedSection|REG_SZ|-|-|true"
set "rTweaksGeneral[06]=05|Search: Bing Discover Button|HKLM\Software\Policies\Microsoft\Edge|HubsSidebarEnabled|REG_DWORD|0x1|0x0|false"
set "rTweaksGeneral[07]=06|Search: Bing Suggestions|HKCU\Software\Policies\Microsoft\Windows|DisableSearchBoxSuggestions|REG_DWORD|0x0|0x1|false"
set "rTweaksGeneral[08]=07|Search: Dynamic Highlights|HKCU\Software\Microsoft\Windows\CurrentVersion\SearchSettings|IsDynamicSearchBoxEnabled|REG_DWORD|0x0|0x1|false"
set "rTweaksGeneral[09]=08|Show System Files and Folders|HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced|Hidden|REG_DWORD|0x0|0x1|false"
set "rTweaksGeneral[10]=09|Show File Extensions|HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced|HideFileExt|REG_DWORD|0x0|0x1|false"
set "rTweaksGeneral[11]=10|Show Clock Seconds|HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced|ShowSecondsInSystemClock|REG_DWORD|0x1|0x0|false"
set "rTweaksGeneral[12]=11|Verbose Service Messages|HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System|VerboseStatus|REG_DWORD|0x0|0x1|false"
set "rTweaksGeneral[13]=12|Windows Error Reporting|HKCU\Software\Microsoft\Windows\Windows Error Reporting|Disabled|REG_DWORD|0x0|0x1|false"
set "rTweaksGeneral[14]=13|Windows App Tracking (MFU)|HKCU\Software\Policies\Microsoft\Windows\EdgeUI|DisableMFUTracking|REG_DWORD|0x0|0x1|false"
set "rTweaksGeneral[15]=14|Weather/News icon in Taskbar|HKLM\Software\Policies\Microsoft\Dsh|AllowNewsAndInterests|REG_DWORD|0x1|0x0|false"
set "rTweaksGeneral[16]=15|Show Shortcuts Icon|HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons|29|REG_SZ|%%windir%%\System32\shell32.dll,-30|C:\\Windows\\blank.ico|false"
set "rTweaksGeneral[17]=16|Disable Automatic Bitlocker Encryption|HKLM\SYSTEM\CurrentControlSet\Control\BitLocker|PreventDeviceEncryption|REG_DWORD|0x1|0x0|false"
:: #
:: @desc registry
:: list of registry classes for backing up the registry
:: index ..................... %%~v .......... 1
:: abbrev .................... %%~w .......... HKLM
:: reg file .................. %%~x .......... hklm.reg
:: #
set "registry[1]=HKLM|hklm.reg"
set "registry[2]=HKCU|hkcu.reg"
set "registry[3]=HKCR|hkcr.reg"
set "registry[4]=HKU|hku.reg"
set "registry[5]=HKCC|hkcc.reg"
:: #
:: @desc manageable packages
:: list of packages which can be added/removed
:: pkg index ................. %%~v .......... 37
:: pkg name .................. %%~w .......... Tor Browser
:: pkg name .................. %%~x .......... TorProject.TorBrowser
:: pkg manager ............... %%~y .......... winget
:: #
set "apps[01]=7zip|7zip.7zip|winget"
set "apps[02]=Bitwarden|Bitwarden.Bitwarden|winget"
set "apps[03]=Cyberduck|Iterate.Cyberduck|winget"
set "apps[04]=DuckDuckGo Browser|DuckDuckGo.DesktopBrowser|winget"
set "apps[05]=GNU Privacy Guard (GPG)|GnuPG.GnuPG|winget"
set "apps[06]=Google Chrome|Google.Chrome.EXE|winget"
set "apps[07]=jq|jqlang.jq|winget"
set "apps[08]=Microsoft .NET SDK 6.0.427 (x64)|Microsoft.DotNet.SDK.6|winget"
set "apps[09]=Microsoft AppInstaller|Microsoft.AppInstaller|winget"
set "apps[10]=Microsoft DevHome|Microsoft.DevHome|winget"
set "apps[11]=Microsoft Edge|Microsoft.Edge|winget"
set "apps[12]=Microsoft IronPython|Microsoft.IronPython.3|winget"
set "apps[13]=Microsoft OneDrive|Microsoft.OneDrive|winget"
set "apps[14]=Microsoft OpenSSH|Microsoft.OpenSSH.Preview|winget"
set "apps[15]=Microsoft Powershell|Microsoft.PowerShell|winget"
set "apps[16]=Microsoft Powertoys|Microsoft.PowerToys|winget"
set "apps[17]=Microsoft Visual C++ 2005 Redistributable (x32)|Microsoft.VCRedist.2005.x86|winget"
set "apps[18]=Microsoft Visual C++ 2005 Redistributable (x64)|Microsoft.VCRedist.2005.x64|winget"
set "apps[19]=Microsoft Visual C++ 2008 Redistributable (x32)|Microsoft.VCRedist.2008.x86|winget"
set "apps[20]=Microsoft Visual C++ 2008 Redistributable (x64)|Microsoft.VCRedist.2008.x64|winget"
set "apps[21]=Microsoft Visual C++ 2010 Redistributable (x32)|Microsoft.VCRedist.2010.x86|winget"
set "apps[22]=Microsoft Visual C++ 2010 Redistributable (x64)|Microsoft.VCRedist.2010.x64|winget"
set "apps[23]=Microsoft Visual C++ 2012 Redistributable (x32)|Microsoft.VCRedist.2012.x86|winget"
set "apps[24]=Microsoft Visual C++ 2012 Redistributable (x64)|Microsoft.VCRedist.2012.x64|winget"
set "apps[25]=Microsoft Visual C++ 2013 Redistributable (x32)|Microsoft.VCRedist.2013.x86|winget"
set "apps[26]=Microsoft Visual C++ 2013 Redistributable (x64)|Microsoft.VCRedist.2013.x64|winget"
set "apps[27]=Microsoft Visual C++ 2015 UWP Desktop Runtime|Microsoft.VCLibs.Desktop.14|winget"
set "apps[28]=Microsoft Visual C++ 2015-2022 Redistributable (x32)|Microsoft.VCRedist.2015+.x32|winget"
set "apps[29]=Microsoft Visual C++ 2015-2022 Redistributable (x64)|Microsoft.VCRedist.2015+.x64|winget"
set "apps[30]=Microsoft Visual Studio Code|Microsoft.VisualStudioCode|winget"
set "apps[31]=Microsoft Visual Studio Code Insiders|Microsoft.VisualStudioCode.Insiders|winget"
set "apps[32]=Mozilla Firefox|Mozilla.Firefox|winget"
set "apps[33]=NMap|Insecure.Nmap|winget"
set "apps[34]=Opera Browser (Stable)|Opera.Opera|winget"
set "apps[35]=Opera GX Browser (Stable)|Opera.OperaGX|winget"
set "apps[36]=PeaZip|Giorgiotani.Peazip|winget"
set "apps[37]=Tor Browser|TorProject.TorBrowser|winget"
set "apps[38]=Windows Calculator|windowscalculator|powershell"
set "apps[39]=Windows Terminal|Microsoft.WindowsTerminal|winget"
set "apps[40]=WinRAR|RARLab.WinRAR|winget"
set "apps[41]=UnigetUI (WinGetUI)|MartiCliment.UniGetUI|winget"
:: #
:: @desc define os ver and name
:: get information about the device operating system
:: #
for /f "usebackq tokens=1,2 delims==|" %%I in (`wmic os get osarchitecture^,name^,version /format:list`) do 2> nul set "%%I=%%J"
for /f "UseBackQ Tokens=1-4" %%A In ( `powershell "$OS=GWmi Win32_OperatingSystem;$UP=(Get-Date)-"^
"($OS.ConvertToDateTime($OS.LastBootUpTime));$DO='d='+$UP.Days+"^
"' h='+$UP.Hours+' n='+$UP.Minutes+' s='+$UP.Seconds;Echo $DO"`) do (
set "%%A"&set "%%B"&set "%%C"&set "%%D"
)
:: #
:: @desc get version display name (codename)
:: @output osCodename 24H2
:: #
set "osCodename="
FOR /F "tokens=2* skip=2" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "DisplayVersion"') do (
set "osCodename=%%b"
)
:: #
:: @desc get build number from ver command
:: @output osMajor 10
:: osMinor 0
:: osBuild 22631
:: #
for /f "tokens=4-6 delims=. " %%a in ('ver') do (
set "osMajor=%%a"
set "osMinor=%%b"
set "osBuild=%%c"
)
:: #
:: @desc get build number from registry as an alternative source
:: @output osBuildBackup 26100
:: #
set "osBuildBackup="
FOR /F "tokens=2* skip=2" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "CurrentBuildNumber"') do (
set "osBuildBackup=%%b"
)
:: #
:: @desc in the off chance that we get a nul os build value, assign the backup
:: @output osBuild 26100
:: #
IF "%osBuild%" == "" (
echo %blue% Status %u% Assigning backup value to os build%u%
set "osBuild=%osBuildBackup%"
)
:: #
:: @desc build numbers dont match, use the most probable
:: #
if "%osBuild%" neq "%osBuildBackup%" (
echo:
echo:
echo %red% Error %u% There are inconsistencies in your operating system build number. Because some features heavily
echo %red% %u% rely on this build number, we will use the most probable value.
echo:
echo %red% %u% This is usually caused by manipulation of the registry windows updates which failed
echo %red% %u% to install properly.
echo:
echo %red% %u% %goldm%Press any key to continue ...%u%
echo:
pause > nul
) else (
echo %blue% Status %u% Identified os build %goldm%%osBuild%%u%
)
:: #
:: @desc os is older than windows 10; abort
:: #
if %osMajor% lss 10 (
echo:
echo:
echo %red% Error %u% This utility is only for Windows 10 and 11 users. You are using a version older than the
echo %red% %u% requirement allows. Utility will now abort.
echo:
pause > nul
goto :EOF
)
:: #
:: @desc since its important to get the version and build display name right; add some redundancy.
:: we dont need to go any further back than Windows 10 since all others are discontinued
:: #
set "osCodenameBackup="
if %osBuild% geq 26100 (
set "osCodenameBackup=24H2"
set "osName=11"
) else if %osBuild% geq 22631 (
set "osCodenameBackup=23H2"
set "osName=11"
) else if %osBuild% geq 22621 (
set "osCodenameBackup=22H2"
set "osName=11"
) else if %osBuild% geq 22000 (
set "osCodenameBackup=21H2"
set "osName=11"
) else if %osBuild% geq 19044 (
set "osCodenameBackup=21H2"
set "osName=10"
) else if %osBuild% geq 19043 (
set "osCodenameBackup=21H1"
set "osName=10"
) else if %osBuild% geq 19042 (
set "osCodenameBackup=20H2"
set "osName=10"
) else if %osBuild% geq 19041 (
set "osCodenameBackup=2004"
set "osName=10"
) else if %osBuild% geq 18363 (
set "osCodenameBackup=1909"
set "osName=10"
) else if %osBuild% geq 18362 (
set "osCodenameBackup=1903"
set "osName=10"
) else if %osBuild% geq 17763 (
set "osCodenameBackup=1809"
set "osName=10"
) else if %osBuild% geq 17134 (
set "osCodenameBackup=1803"
set "osName=10"
) else if %osBuild% geq 16299 (
set "osCodenameBackup=1709"
set "osName=10"
) else if %osBuild% geq 15063 (
set "osCodenameBackup=1703"
set "osName=10"
) else if %osBuild% geq 14393 (
set "osCodenameBackup=1607"
set "osName=10"
) else if %osBuild% geq 10586 (
set "osCodenameBackup=1511"
set "osName=10"
) else if %osBuild% geq 10240 (
set "osCodenameBackup=FE"
set "osName=10"
) else (
set "osCodenameBackup=NA"
set "osName=NA"
)
IF "%osCodename%" == "" (
echo %blue% Status %u% Assigning backup codename %goldm%%osCodenameBackup%%u%
set "osCodename=%osCodenameBackup%"
)
echo %blue% Status %u% Identified os codename %goldm%%osCodename%%u%%u%
:: #
:: @desc Main
:: Main initial inteface
:: #
:main
setlocal enabledelayedexpansion
title WPU (Windows Personalization Utility)
:: #
:: @desc Check user registry to see if automatic updates are currently enabled or disabled
:: registry will return the following for auto update status
:: 0x0 updates are enabled
: 0x1 updates are disabled
:: #
for /F "usebackq tokens=3*" %%A in (`REG QUERY "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoUpdate`) do (
set "noUpdatesState=%%A"
)
if /i "%noUpdatesState%" == "0x0" (
set "AutoUpdate=true"
set "AutoUpdateBool=%greenm%enabled%u%"
set "AutoUpdateStr=%greenm%!AutoUpdateBool:~0,-1!%u%"
) else (
set "AutoUpdate=false"
set "AutoUpdateBool=%orange%disabled%u%"
set "AutoUpdateStr=%orange%!AutoUpdateBool:~0,-1!%u%"
)
set q_mnu_main=
set q_mnu_adv=
chcp 65001 > nul
cls
echo:
echo:
echo %goldm%v%repo_version%%u% %grayd%Windows Personalization Utility%u%
echo:
echo %fuchsia2% ██╗ ██╗██████╗ ██╗ ██╗████████╗██╗██╗ ██╗████████╗██╗ ██╗
echo ██║ ██║██╔══██╗██║ ██║╚══██╔══╝██║██║ ██║╚══██╔══╝╚██╗ ██╔╝
echo ██║ █╗ ██║██████╔╝██║ ██║ ██║ ██║██║ ██║ ██║ ╚████╔╝
echo ██║███╗██║██╔═══╝ ██║ ██║ ██║ ██║██║ ██║ ██║ ╚██╔╝
echo ╚███╔███╔╝██║ ╚██████╔╝ ██║ ██║███████╗██║ ██║ ██║
echo ╚══╝╚══╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝
echo:
echo:
echo %grayd% ────────────────────────────────────────────────────────────────────────────────────────────────────────── %u%
echo %cyand% Author %grayb% %repo_author%%u%
echo %cyand% Repo %grayb% %repo_url%
echo %cyand% OS %grayb% %osCodename% (%version%) %graym%%name% %osarchitecture%%u%
echo %cyand% Uptime %grayb% %d% %graym%days%u% %h% %graym%hours%u% %n% %graym%minutes%u% %s% %graym%seconds
echo %cyand% Status %grayb% Windows Updates %AutoUpdateBool%%u%
echo %grayd% ────────────────────────────────────────────────────────────────────────────────────────────────────────── %u%
echo:
if /I "%AutoUpdate%" equ "true" (
echo %goldm%^(1^)%u% Disable Updates
echo %grayd%^(2^)%grayd% Enable Updates
) else (
echo %grayd%^(1^)%grayd% Disable Updates
echo %goldm%^(2^)%u% Enable Updates
)
echo:
echo %goldm%^(3^)%u% Backup Registry
echo %goldm%^(4^)%u% Remove Update Files
echo %goldm%^(5^)%u% Manage Update Services
echo %goldm%^(6^)%u% Scan and Repair
echo:
echo %goldm%^(C^)%u% Customize ^(Tweaks^)
echo %goldm%^(D^)%u% Debloat ^(Advanced^)
echo:
echo %greenm%^(H^)%greenm% Help
echo %blueb%^(S^)%blueb% Supporters
echo %redl%^(Q^)%redl% Quit
echo:
echo:
set /p q_mnu_main="%goldm% Pick Option » %u%"
echo:
:: #
:: @desc Menu > Help
:: Shows help menu
:: #
if /I "!q_mnu_main!" equ "H" (
cls
echo:
echo:
echo %u% This utility allows you to do the following tasks:
echo:
if /I "%AutoUpdate%" equ "true" (
echo %goldm%^(1^)%greenm% Disable Updates%u%
) else (
echo %grayd%^(1^)%greend% Disable Updates%u% %goldd%[Already disabled]%u%
)
echo %grayd%Disable Windows automatic updates. Updates will be halted until re-enabled.
echo %grayd%All pending update files on your device will be deleted to clean up disk-space.
echo %grayd%Files will be re-downloaded if you enable Windows updates at a later time.
echo:
if /I "%AutoUpdate%" equ "true" (
echo %grayd%^(2^)%greend% Enable Updates%u% %goldd%[Already enabled]%u%
) else (
echo %goldm%^(2^)%greenm% Enable Updates%u%
)
echo %grayd%Enable windows updates on your system.
echo:
echo %goldm%^(3^)%greenm% Backup Registry%u%
echo %grayd%Create a backup of your registry
echo:
echo %goldm%^(4^)%greenm% Remove Update Files%u%
echo %grayd%Pending update files on your device will be deleted to clean up disk-space.
echo %grayd%This task is automatically performed if you select option 1%u%
echo:
echo %goldm%^(5^)%greenm% Manage Update Services%u%
echo %grayd%This option allows you to view Windows Update's current status, as well as
echo %grayd%enable or disable Windows Update system services.
echo %grayd%This task is automatically performed if you select option 1%u%
echo:
echo %goldm%^(6^)%greenm% Scan and Repair%u%
echo %grayd%Run system-wide scans which can detect errors related to your operating
echo %grayd%system. Any detected errors may be fixed on the spot with little interaction
echo %grayd%on the users end%u%
echo:
echo %goldm%^(C^)%greenm% Customize ^(Tweaks^)%u%
echo %grayd%Change the way Windows behaves on-the-fly.
echo:
echo %goldm%^(D^)%greenm% Debloat ^(Advanced^)%u%
echo %grayd%Uninstall unwanted apps/bloat such as Copilot, Cortana, and Recall.
echo %grayd%Manage system users. Manage and shut down bloat Windows services.
echo:
echo %goldm%^(S^)%greenm% Supporters%u%
echo %grayd%A list of people who have donated to this project.
echo:
echo %redl%^(R^)%redl% Return
echo:
echo:
set /p q_mnu_main="%goldm% Pick Option » %u%"
echo:
)
:: #
:: @desc Menu > Sponsors
:: Shows a list of sponsors
:: #
if /I "!q_mnu_main!" equ "S" (
cls
echo:
echo:
echo %u% If you wish to support this project, you may drop a donation at %goldd%https://buymeacoffee.com/aetherinox.
echo %u% To have your name added, donate and leave a comment which gives us your Github username.
echo:
echo %u% A special thanks to the following for donating:
echo:
echo %grayd% ────────────────────────────────────────────────────────────────────────────────────────────────────────── %u%
echo:
echo %greenm% Chad May%u%
echo:
echo %grayd% ────────────────────────────────────────────────────────────────────────────────────────────────────────── %u%
echo:
echo %cyand% Notice %u% Press any key to return
pause > nul
)
if /I "!q_mnu_main!" equ "R" (
cls
goto :main
)
:: option > (1) Disable Updates
if /I "%q_mnu_main%" equ "1" (
goto :taskUpdatesDisable
)
:: option > (2) Enable Updates
if /I "%q_mnu_main%" equ "2" (
goto :taskUpdatesEnable
)
:: option > (3) Backup Registry
if /I "%q_mnu_main%" equ "3" (
goto :taskRegistryBackup
)
:: option > (4) Clean windows update dist folder
if /I "%q_mnu_main%" equ "4" (
goto :menuUpdatesCleanFiles
)
:: option > (5) Manage Update Services
if /I "%q_mnu_main%" equ "5" (
goto :menuServicesUpdates
)
:: option > (6) Scan and Fix Errors
if /I "%q_mnu_main%" equ "6" (
goto :menuScanFix
)
:: option > (C) Customize / Tweaks / Mods
if /I "!q_mnu_main!" equ "C" (
goto :menuCustomize
)
:: option > (D) Debloat / Advanced
if /I "!q_mnu_main!" equ "D" (
goto :menuAdvanced
)
:: option > (Q) Quit
if /I "%q_mnu_main%" equ "Q" (
goto :sessQuit
) else (
echo %red% Error %u% Unrecognized Option %yellowl%%q_mnu_main%%u%
pause > nul
goto :main
)
endlocal
goto :EOF
:: #
:: @desc Menu > Install Apps
:: allows us to install / uninstall applications; list of apps dynamically generated
::
:: set "apps[index]=name|package"
:: Index ............. %%~v
:: Name .............. %%~w
:: Package ........... %%~x
:: #
:menuAppsManage
setlocal enabledelayedexpansion
cls
set q_mnu_install=
set appStatus=Install
echo:
if "!appsInitialized!" == "true" (
echo %blue% Status %u% Please wait while we determine what apps are installed.
if not exist "%dir_cache%" (
md "%dir_cache%"
)
winget list > "%dir_cache%\%~n0.out" 2>&1
)
if exist "%dir_cache%\%~n0.out" (
echo %blue% Status %u% Found cache %orange%%dir_cache%\%~n0.out %u%
) else (
echo %red% Error %u% Could not open app cache %orange%%dir_cache%\%~n0.out%u%, press return and try again.
pause > nul
set "appsInitialized=true"
goto :menuAppsManage
)
echo:
for /f "tokens=2-4* delims=[]|=" %%v in ('set apps[ 2^>nul') do (
findstr /I "%%~x" "%dir_cache%\%~n0.out" >nul
if errorlevel 1 (
set appStatus=%greenl%Install%u%
) else (
set appStatus=%redl%Uninstall%u%
)
echo %yellowd%^(%%~v^)%u% !appStatus! %%~w
)
echo:
echo %redl%^(R^)%redl% Return
echo:
echo:
set /p q_mnu_install="%goldm% Pick Option » %u%"
echo:
:: #
:: Apps > generate list of selectable options
:: #
for /f "tokens=2-4* delims=[]|=" %%v in ('set apps[ 2^>nul') do (
if /I "%q_mnu_install%" equ "%%~v" (
set "pkgManager=%%~y"
set appStatus=Install
findstr /I "%%~x" "%dir_cache%\%~n0.out" >nul
if errorlevel 1 (
set appStatus=Install
) else (
set appStatus=Uninstall
)
echo:
echo %purplel% Status %u% Starting !appStatus! - %green%%%~w %grayd%^(%%~x^)%u% using !pkgManager!%u%
if /I "!appStatus!"=="Install" call :promptAppsInstall "!pkgManager!" "%%~x"
if /I "!appStatus!"=="Uninstall" call :promptAppsUninstall "!pkgManager!" "%%~x"
set "appsInitialized=true"
goto :menuAppsManage
)
)
:: option > (R) Return
if /I "%q_mnu_install%" equ "R" (
del "%dir_cache%\%~n0.out" /f > nul 2>&1
set "appsInitialized=true"
goto :menuAdvanced
) else (
echo %red% Error %u% Unrecognized Option %yellowl%%q_mnu_install%%u%, press any key and try again.
pause > nul
set "appsInitialized=false"
goto :menuAppsManage
)
endlocal
goto :EOF
:: #
:: @desc Menu > Debloat > Services
::
:: set "apps[index]=name|package"
:: Index ............. %%~v
:: Name .............. %%~w
:: Package ........... %%~x
:: #
:menuServicesDebloat
setlocal enabledelayedexpansion
cls
set q_mnu_serv=
echo:
echo %greyl% The services controlled from this menu are extra services on Microsoft Windows which most users
echo %greyl% deem as unnecessary. These services are not required for normal everyday operation.
echo:
echo %greyl% You can disable all services grouped in this category at once, or re-enable them.
echo:
echo %greyl% Some services require a system reboot after being disabled. Some services may automatically stop
echo %greyl% once started; this happens with on-demand services that do not need to run all of the time.
echo:
echo %yellowd%^(1^)%u% View Service Status
echo %yellowd%^(2^)%u% Enable All Bloat Services
echo %yellowd%^(3^)%u% Disable All Bloat Services
echo:
echo:
for /f "tokens=2-3* delims=[]|=" %%v in ('set servicesUseless[ 2^>nul') do (
for /F "tokens=3 delims=: " %%H in ('sc query "%%~x" ^| findstr " STATE"') do (
set "service=%u%%%~w %pink%[%%~x] !spaces!%u%"
set "service=!service:~0,60!"
if /I "%%H" neq "RUNNING" (
set appStatus=%greenl%Enable%u%
) else (
set appStatus=%redl%Disable%u%
)
)
echo %yellowd%^(%%~v^)%u% !appStatus! %%~w %pink%[%%~x]%u%
)
echo:
echo %redl%^(R^)%redl% Return
echo:
echo:
set /p q_mnu_serv="%goldm% Pick Option » %u%"
echo:
echo:
:: option > (1) View Debloat Service Status
if /I "%q_mnu_serv%" equ "1" (
echo %cyand% Notice %u% Getting Service Status%u%
:: loop services and check status
for /f "tokens=2-3* delims=[]|=" %%v in ('set servicesUseless[ 2^>nul') do (
for /F "tokens=3 delims=: " %%H in ('sc query "%%~x" ^| findstr " STATE"') do (
set "service=%u%%%~w %pink%[%%~x] !spaces!%u%"
set "service=!service:~0,60!"
if /I "%%H" neq "RUNNING" (
echo %cyand% %grayd% !service! %redl%Not Running%u%
) else (
echo %cyand% %grayd% !service! %greenl%Running%u%
)
)
)
echo %cyand% Notice %u% Operation complete. Press any key
pause > nul
goto :menuServicesDebloat
)
:: option > (2) Enable Debloated Services
if /I "%q_mnu_serv%" equ "2" (
echo %cyand% Notice %u% Re-enabling Debloat Windows Services ...
for /f "tokens=2-3* delims=[]|=" %%v in ('set servicesUseless[ 2^>nul') do (
set "service=%u%%%~w %pink%[%%~x] !spaces!%u%"
set "service=!service:~0,60!"
echo %cyand% %grayd% !service! %greenl%enabled%u%
sc config %%~x start= auto > nul 2>&1