-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDFXWT_LATEST.VBS
1605 lines (1556 loc) · 53.5 KB
/
DFXWT_LATEST.VBS
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
On Error Resume Next
Randomize
Set oADO = CreateObject("Adodb.Stream")
Set oWSH = CreateObject("WScript.Shell")
Set oAPP = CreateObject("Shell.Application")
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oWEB = CreateObject("MSXML2.ServerXMLHTTP")
Set oWMI = GetObject("winmgmts:\\.\root\CIMV2")
strUser = CreateObject("WScript.Network").UserName
currentVersionST = "24.7.1"
currentFolder = oFSO.GetParentFolderName(WScript.ScriptFullName)
Call checkNTonStart()
Call forceConsole()
Call runElevated()
versionNameST = " DFX WinTweaks 24.7.1 "
Call updatedl()
Call startMenu()
Function startMenu()
cls
textf " "
textf " ____ _______ __ __ ___ _____ _ "
textf " | _ \| ___\ \/ / \ \ / (_)_ _|_ _|_ _____ __ _| | _____ "
textf " | | | | |_ \ / \ \ /\ / /| | '_ \| | \ \ /\ / / _ \/ _` | |/ / __|"
textf " | |_| | _| / \ \ V V / | | | | | | \ V V / __/ (_| | <\__ \"
textf " |____/|_| /_/\_\ \_/\_/ |_|_| |_|_| \_/\_/ \___|\__,_|_|\_\___/"
textf " Created by ivandfx"
textf " "
textf " Welcome, " & strUser
textf " Select the option you want to use:"
textf " "
textf " 1 = Tweak Settings 4 = Quick Settings"
textf " "
textf " 2 = Experimental Tweaks 5 = WAST: Shutdown settings"
textf " "
textf " 3 = Safe Mode Settings"
textf " "
textf " "
textf " "
textf " "
textf " "
textf " 66 = About Windows 77 = Reload Explorer"
textf " "
textf " 88 = Check for a new release If you find any issues, type 55"
textf " 99 = Open DFX WinTweaks GitHub (This will open GitHub on your browser)"
textf " 44 = Open DFX WinTweaks Web"
textf " "
textf " 0 = Close 10 = Credits"
textf " "
textl " > "
RP = scanf
If isNumeric(RP) = False Then
textf ""
textf " This option does not exist."
wait 1
Call startMenu()
Exit Function
End If
Select Case RP
Case 1
Call dfxmain()
Case 88
cls
Call updatedl()
Case 99
cls
Call dfxgithub()
wait 1
Call startMenu
Case 55
cls
Call reportIssue()
wait 1
Call startMenu
Case 77
cls
textf " Restarting Windows Explorer..."
oWSH.Run "taskkill.exe /F /IM explorer.exe"
wait 5
oWSH.Run "explorer.exe"
Call startMenu()
Case 2
cls
Call expTweaks()
Case 3
cls
Call safemodesettings()
Case 4
cls
Call quicksettings()
Case 5
Call WAST()
Case 44
cls
wait 1
Call dfxtweakerweb()
Case 66
oWSH.Run "winver.exe"
Call startMenu()
Case 10
Call dfxCredits()
Case 0
Call tweakerexit()
Case Else
textf ""
textf " This option does not exist."
wait 1
Call startMenu()
Exit Function
End Select
End Function
Function dfxtweakerweb()
Dim url
Set url= CreateObject("WScript.Shell")
url.Run "https://ivandfx.github.io/DFXWinTweaks", 9
Call startMenu()
Exit Function
End Function
Function dfxgithub()
Dim url
Set url= CreateObject("WScript.Shell")
url.Run "https://github.com/ivandfx/dfxwintweaks", 9
Call startMenu()
Exit Function
End Function
Function reportIssue()
Dim url
Set url= CreateObject("WScript.Shell")
url.Run "https://github.com/ivandfx/dfxwintweaks/issues/new", 9
Call startMenu()
Exit Function
End Function
Function safemodesettings()
cls
textf " "
textf " ____ __ __ __ _ ____ _ _ _ "
textf " / ___| __ _ / _| ___ | \/ | ___ __| | ___ / ___| ___| |_| |_(_)_ __ __ _ ___ "
textf " \___ \ / _` | |_ / _ \ | |\/| |/ _ \ / _` |/ _ \ \___ \ / _ \ __| __| | '_ \ / _` / __|"
textf " ___) | (_| | _| __/ | | | | (_) | (_| | __/ ___) | __/ |_| |_| | | | | (_| \__ \"
textf " |____/ \__,_|_| \___| |_| |_|\___/ \__,_|\___| |____/ \___|\__|\__|_|_| |_|\__, |___/"
textf " |___/ "
textf " "
textf " "
textf " Select an option:"
textf " "
textf " "
textf " 1 = Restart in Safe Mode (Normal)"
textf " "
textf " 2 = Restart in Safe Mode (Networking)"
textf " "
textf " 3 = Reboot to Standard Windows"
textf " "
textf " "
textf " 0 = Return to Start Menu"
textf " "
textl " > "
RP = scanf
If isNumeric(RP) = False Then
textf ""
textf " This option does not exist."
wait 2
Call safemodesettings()
Exit Function
End If
Select Case RP
Case 1
MsgBox "Your PC will reboot right after you close this window, make sure you saved all your data", vbInformation + vbOkOnly, "DFX WinTweaks Safe Mode"
Set objShell = WScript.CreateObject("WScript.Shell")
oWSH.Run "bcdedit /set {current} safeboot minimal"
wait 1
objShell.Run "%WINDIR%\system32\shutdown.exe -r -t 0"
Case 2
MsgBox "Your PC will reboot right after you close this window, make sure you saved all your data", vbInformation + vbOkOnly, "DFX WinTweaks Safe Mode"
Set objShell = WScript.CreateObject("WScript.Shell")
oWSH.Run "bcdedit /set {current} safeboot network"
wait 1
objShell.Run "%WINDIR%\system32\shutdown.exe -r -t 0"
Case 3
MsgBox "Your PC will reboot right after you close this window, make sure you did all your changes", vbInformation + vbOkOnly, "DFX WinTweaks Safe Mode"
Set objShell = WScript.CreateObject("WScript.Shell")
oWSH.Run "bcdedit /deletevalue {current} safeboot"
wait 1
objShell.Run "%WINDIR%\system32\shutdown.exe -r -t 0"
Case 0
cls
Call startMenu()
Exit Function
End Select
End Function
Function quicksettings()
cls
textf " "
textf " ___ _ _ _ _ _ "
textf " / _ \ _ _(_) ___| | __ ___ ___| |_| |_(_)_ __ __ _ ___ "
textf " | | | | | | | |/ __| |/ / / __|/ _ \ __| __| | '_ \ / _` / __|"
textf " | |_| | |_| | | (__| < \__ \ __/ |_| |_| | | | | (_| \__ \"
textf " \__\_\\__,_|_|\___|_|\_\ |___/\___|\__|\__|_|_| |_|\__, |___/"
textf " |___/ "
textf " "
textf " "
textf " "
textf " "
textf " 1 = Disable Windows Update 4 = Show Windows license status"
textf " "
textf " 2 = Disable Windows Defender (Safe Mode) 5 = Open Additional Windows features"
textf " "
textf " 3 = Show file extensions"
textf " "
textf " "
textf " "
textf " "
textf " "
textf " "
textf " "
textf " "
textf " "
textf " "
textf " "
textf " 0 = Return to Start Menu"
textf " "
textl " > "
RP = scanf
If isNumeric(RP) = False Then
textf ""
textf " This option does not exist."
wait 2
Call quicksettings()
Exit Function
End If
Select Case RP
Case 1
oWSH.Run "sc stop wuauserv"
oWSH.Run "sc config wuauserv start=disabled"
cls
textf ""
textf " Windows Update is now disabled"
wait 1
Call quicksettings()
Case 2
oWSH.Run "sc stop WdNisSvc"
oWSH.Run "sc stop WinDefend"
oWSH.Run "sc config WdNisSvc start=disabled"
oWSH.Run "sc config WinDefend start=disabled"
oWSH.Run "schtasks /change /TN " & chr(34) & "\Microsoft\Windows\Windows Defender\Windows Defender Cache Maintenance" & chr(34) & " /DISABLE"
oWSH.Run "schtasks /change /TN " & chr(34) & "\Microsoft\Windows\Windows Defender\Windows Defender Cleanup" & chr(34) & " /DISABLE"
oWSH.Run "schtasks /change /TN " & chr(34) & "\Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan" & chr(34) & " /DISABLE"
oWSH.Run "schtasks /change /TN " & chr(34) & "\Microsoft\Windows\Windows Defender\Windows Defender Verification" & chr(34) & " /DISABLE"
oWSH.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\DisableAntiSpyware", 1, "REG_DWORD"
oWSH.RegWrite "HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows Defender\DisableAntiSpyware", 1, "REG_DWORD"
oWSH.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection\DisableBehaviorMonitoring", 1, "REG_DWORD"
oWSH.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection\DisableOnAccessProtection", 1, "REG_DWORD"
oWSH.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection\DisableScanOnRealtimeEnable", 1, "REG_DWORD"
oWSH.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\NOC_GLOBAL_SETTING_TOASTS_ENABLED", 0, "REG_DWORD"
textf " "
textf " INFO: Windows Defender has been disabled"
wait 1
Call quicksettings()
Case 3
oWSH.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", 0, "REG_DWORD"
textf ""
textf "File extensions will now be shown"
wait 1
Call quicksettings()
Case 4
textf " Your license status will appear in a few seconds..."
wait 0.2
textf " Collecting license data..."
wait 0.5
oWSH.Run "slmgr.vbs /dli"
oWSH.Run "slmgr.vbs /xpr"
Call quicksettings()
Case 5
oWSH.Run "optionalfeatures.exe"
Call quicksettings()
Case 0
cls
Call startMenu()
Exit Function
End Select
End Function
Function dfxmain()
cls
textf " Wait..."
wait 0.1
Call mainMenu()
Exit Function
End Function
Function mainMenu()
cls
textf " "
textf " ____ _______ __ __ ___ _____ _ "
textf " | _ \| ___\ \/ / \ \ / (_)_ _|_ _|_ _____ __ _| | _____ " & currentVersionST
textf " | | | | |_ \ / \ \ /\ / /| | '_ \| | \ \ /\ / / _ \/ _` | |/ / __|"
textf " | |_| | _| / \ \ V V / | | | | | | \ V V / __/ (_| | <\__ \"
textf " |____/|_| /_/\_\ \_/\_/ |_|_| |_|_| \_/\_/ \___|\__,_|_|\_\___/"
textf " Created by ivandfx"
textf " "
textf " "
textf " Select an option:"
textf " "
textf " 1 = Customization 6 = Microsoft OneDrive"
textf " "
textf " 2 = Performance Tweaks 7 = Microsoft Cortana"
textf " "
textf " 3 = UWP Debloater 8 = Microsoft Defender (Safe Mode)"
textf " "
textf " 4 = Uninstall certain UWP apps/services 9 = Windows Update Settings"
textf " "
textf " 5 = Tracking 10 = Show Windows license status"
textf ""
textf ""
textf ""
textf ""
textf ""
textf ""
textf ""
textf " 0 = Return to Start Menu 44 = Safe Mode Settings"
textf ""
textl " > "
RP = scanf
If isNumeric(RP) = False Then
textf ""
textf " This option does not exist."
wait 1
Call mainMenu()
Exit Function
End If
Select Case RP
Case 1
Call systemTweaks()
Case 2
Call perfTweaks()
Case 3
Call uwpDebloat()
Case 4
Call uwpUninst()
Case 5
Call menuTracking()
Case 6
Call onedriveConf()
Case 7
Call menuCortana()
Case 8
Call defenderConf()
Case 9
Call wupdateConf()
Case 10
Call licenseView()
Case 44
Call safemoConf()
Case 0
Call startMenu()
Case Else
textf ""
textf " This option does not exist."
wait 2
Call mainMenu()
Exit Function
End Select
End Function
Function licenseView()
cls
On Error Resume Next
textf ""
textf " Your license status will appear in a few seconds..."
wait 0.2
textf " Collecting license data..."
wait 0.3
oWSH.Run "slmgr.vbs /dli"
oWSH.Run "slmgr.vbs /xpr"
Call mainMenu
End Function
Function expTweaks()
cls
textf " "
textf " _____ _ _ _ _____ _ "
textf " | ____|_ ___ __ ___ _ __(_)_ __ ___ ___ _ __ | |_ __ _| | |_ _|_ _____ __ _| | _____ "
textf " | _| \ \/ / '_ \ / _ \ '__| | '_ ` _ \ / _ \ '_ \| __/ _` | | | | \ \ /\ / / _ \/ _` | |/ / __|"
textf " | |___ > <| |_) | __/ | | | | | | | | __/ | | | || (_| | | | | \ V V / __/ (_| | <\__ \"
textf " |_____/_/\_\ .__/ \___|_| |_|_| |_| |_|\___|_| |_|\__\__,_|_| |_| \_/\_/ \___|\__,_|_|\_\___/"
textf " |_| "
textf " "
textf " "
textf " "
textf " Select an option:"
textf " "
textf " 1 = Disable CPU Core Parking (Reboot required)"
textf " "
textf " 2 = Enable CPU Core Parking (Reboot required)"
textf " "
textf " "
textf " "
textf " "
textf " "
textf " "
textf " "
textf " "
textf " "
textf " "
textf " "
textf " "
textf " "
textf " 0 = Return to Main Menu"
textf " "
textl " > "
RP = scanf
If isNumeric(RP) = False Then
textf ""
textf " This option does not exist."
wait 1
Call startMenu()
Exit Function
End If
Select Case RP
Case 1
MsgBox "This will improve your system performance, but it may spike up the power consumption.", vbInformation + vbOkOnly, "DFX WinTweaks: CPU Core Park (Enable)"
oWSH.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\0cc5b647-c1df-4637-891a-dec35c318583\ValueMax", 0, "REG_DWORD"
wait 2
MsgBox "CPU Core Parking has been disabled and Windows will now reboot. Make sure you saved your data.", vbInformation + vbOkOnly, "DFX WinTweaks: CPU Core Park (Disabled)"
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "%WINDIR%\system32\shutdown.exe -r -t 0"
Case 2
MsgBox "This will get your system performance back to normal, lowering power consumption.", vbInformation + vbOkOnly, "DFX WinTweaks: CPU Core Park (Enable)"
oWSH.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\0cc5b647-c1df-4637-891a-dec35c318583\ValueMax", 100, "REG_DWORD"
wait 2
MsgBox "CPU Core Parking has been enabled and Windows will now reboot. Make sure you saved your data.", vbInformation + vbOkOnly, "DFX WinTweaks: CPU Core Park (Enabled)"
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "%WINDIR%\system32\shutdown.exe -r -t 0"
Case 0
Call mainMenu()
Case Else
textf ""
textf " This option does not exist."
wait 1
Call startMenu()
Exit Function
End Select
End Function
Function uwpUninst()
cls
textf " "
textf " _ ___ ______ _ _ _ _ _ _ "
textf " | | | \ \ / / _ \ | | | |_ __ (_)_ __ ___| |_ __ _| | | ___ _ __ "
textf " | | | |\ \ /\ / /| |_) | | | | | '_ \| | '_ \/ __| __/ _` | | |/ _ \ '__|"
textf " | |_| | \ V V / | __/ | |_| | | | | | | | \__ \ || (_| | | | __/ | "
textf " \___/ \_/\_/ |_| \___/|_| |_|_|_| |_|___/\__\__,_|_|_|\___|_| "
textf " UWP App/Service uninstaller (WIP)"
textf " "
textf " "
textf " Select an option:"
textf " "
textf " 1 = Remove Widgets (News) app"
textf ""
textf ""
textf ""
textf ""
textf ""
textf ""
textf ""
textf ""
textf ""
textf ""
textf ""
textf ""
textf ""
textf ""
textf ""
textf " 0 = Return to Main Menu 44 = Safe Mode Settings"
textf ""
textl " > "
RP = scanf
If isNumeric(RP) = False Then
textf ""
textf " This option does not exist."
wait 1
Call mainMenu()
Exit Function
End If
Select Case RP
Case 1
oWSH.Run "powershell Get-AppxPackage *WebExperience* | Remove-AppxPackage"
Call uwpUninst()
Case 0
Call mainMenu()
Case Else
textf ""
textf " This option does not exist."
wait 2
Call uwpUninst()
Exit Function
End Select
End Function
Function WAST()
cls
textf " __ ___ ____ _____ _____ _ _ _ _ "
textf " \ \ / / \ / ___|_ _| | ____|_ __ ___ | |__ ___ __| | __| | ___ __| |"
textf " \ \ /\ / / _ \ \___ \ | | | _| | '_ ` _ \| '_ \ / _ \/ _` |/ _` |/ _ \/ _` |"
textf " \ V V / ___ \ ___) || | | |___| | | | | | |_) | __/ (_| | (_| | __/ (_| |"
textf " \_/\_/_/ \_\____/ |_| |_____|_| |_| |_|_.__/ \___|\__,_|\__,_|\___|\__,_|"
textf " Windows Advanced Shutdown Tool Embedded 1.5"
textf " "
textf " "
textf " "
textf " "
textf " "
textf " "
textf " Select an option: 55 = Restart Windows Explorer"
textf " 66 = About Reboot to UEFI"
textf ""
textf " 1 = Shut down the PC 6 = Disable Hyper-V and reboot (Pro Only)"
textf " "
textf " 2 = Restart the PC 7 = Enable Hyper-V and reboot (Pro Only)"
textf " "
textf " 3 = Log off from this user"
textf " "
textf " 4 = Go to advanced options"
textf ""
textf " 5 = Reboot to UEFI (?)"
textf " "
textf " "
textf " 0 = Return to Start Menu"
textf ""
textl " > "
RP = scanf
If isNumeric(RP) = False Then
textf ""
textf " This option does not exist."
Call WAST()
Exit Function
End If
Select Case RP
Case 1
result = MsgBox ("Shut down?", vbYesNo, "WAST Shutdown")
Select Case result
Case vbYes
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "%WINDIR%\system32\shutdown.exe -s -t 0"
Dim objShell
Case vbNo
cls
Call WAST()
End Select
Case 2
result = MsgBox ("Restart?", vbYesNo, "WAST Restart")
Select Case result
Case vbYes
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "%WINDIR%\system32\shutdown.exe -r -t 0"
Case vbNo
cls
Call WAST()
End Select
Case 3
result = MsgBox ("Log off? Unsaved data will be lost.", vbYesNo, "WAST Logoff")
Select Case result
Case vbYes
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "%WINDIR%\system32\shutdown.exe -l"
Case vbNo
cls
Call WAST()
End Select
Case 4
result = MsgBox ("Go to advanced options menu? This will close all active user sessions.", vbYesNo, "WAST Advanced")
Select Case result
Case vbYes
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "%WINDIR%\system32\shutdown.exe -r -o -t 0"
wait 1
Call WAST()
Case vbNo
cls
Call WAST()
End Select
Case 5
result = MsgBox ("Reboot to BIOS/UEFI? Make sure you saved your data.", vbYesNo, "WAST Reboot to UEFI")
Select Case result
Case vbYes
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "%WINDIR%\system32\shutdown.exe -r -fw -t 0"
Case vbNo
cls
Call WAST()
End Select
Case 6
MsgBox "This will reboot the PC and turn off Hyper-V.", vbInformation + vbOkOnly, "WAST: Disable Hyper-V"
Set objShell = WScript.CreateObject("WScript.Shell")
oWSH.Run "bcdedit /set hypervisorlaunchtype off"
wait 1
objShell.Run "%WINDIR%\system32\shutdown.exe -r -t 0"
Case 7
MsgBox "This will reboot the PC and turn on Hyper-V.", vbInformation + vbOkOnly, "WAST: Enable Hyper-V"
Set objShell = WScript.CreateObject("WScript.Shell")
oWSH.Run "bcdedit /set hypervisorlaunchtype on"
wait 1
objShell.Run "%WINDIR%\system32\shutdown.exe -r -t 0"
Case 55
result = MsgBox ("Restart Windows Explorer?", vbYesNo, "WAST Explorer")
Select Case result
Case vbYes
textf = " Wait..."
textf " Restarting Windows Explorer..."
oWSH.Run "taskkill.exe /F /IM explorer.exe"
wait 5
oWSH.Run "explorer.exe"
Call WAST()
Case vbNo
cls
Call WAST()
End Select
Case 66
result = MsgBox ("Reboot to UEFI only works on a UEFI Windows install and is tested and known to work on Windows 10 1809 and later,, please let me know if it works on an older version of Windows 10.", vbOkOnly, "WAST UEFI (About)")
Call WAST()
Case 0
cls
Call startMenu()
End Select
End Function
Function systemTweaks()
cls
On Error Resume Next
textf ""
textf " ____ _ _ _ _ "
textf " / ___| _ ___| |_ ___ _ __ ___ (_)______ _| |_(_) ___ _ __ "
textf " | | | | | / __| __/ _ \| '_ ` _ \| |_ / _` | __| |/ _ \| '_ \ "
textf " | |__| |_| \__ \ || (_) | | | | | | |/ / (_| | |_| | (_) | | | |"
textf " \____\__,_|___/\__\___/|_| |_| |_|_/___\__,_|\__|_|\___/|_| |_|"
textf ""
textf " Select an option:"
textf ""
textf " "
textf " 1 = Enable Dark mode 5 = Enable Classic View in Control Panel"
textf " "
textf " 2 = Create a 'God Mode' icon on the Desktop 6 = Enable Classic Volume slider"
textf " "
textf " 3 = Enable Quick Access on Explorer 7 = Enable/Disable User Account Control"
textf " "
textf " 4 = Show file extensions 8 = Enable/Disable login without password"
textf " "
textf " "
textf " "
textf ""
textf " 0 = Return to menu 99 = Restore"
textf ""
textl " > "
Select Case scanf
Case 1
textf ""
oWSH.RegWrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize\AppsUseLightTheme", 0, "REG_DWORD"
oWSH.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize\AppsUseLightTheme", 0, "REG_DWORD"
textf ""
textf ""
wait 0.2
Call systemTweaks()
Case 2
textf ""
godFolder = oWSH.SpecialFolders("Desktop") & "\GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}"
If oFSO.FolderExists(godFolder) = False Then oFSO.CreateFolder(godFolder)
textf ""
textf ""
wait 0.2
Call systemTweaks()
Case 3
oWSH.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\LaunchTo", 1, "REG_DWORD"
textf ""
textf ""
wait 0.2
Call systemTweaks()
Case 4
oWSH.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", 0, "REG_DWORD"
textf ""
textf ""
wait 0.2
Call systemTweaks()
Case 5
oWSH.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ForceClassicControlPanel", 1, "REG_DWORD"
textf ""
textf ""
wait 0.2
Call systemTweaks()
Case 6
oWSH.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MTCUVC\EnableMtcUvc", 0, "REG_DWORD"
textf ""
textf ""
wait 0.2
Call systemTweaks()
Case 7
cls
textf " Wait..."
wait 0.2
textf ""
oWSH.Run "UserAccountControlSettings.exe"
MsgBox "After changing this setting, you must restart the PC. Do you want to do it now?", vbInformation + vbYesNo, "DFX WinTweaks UAC"
Select Case result
Case vbYes
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "%WINDIR%\system32\shutdown.exe -r -t 0"
Case vbNo
cls
textf = " Wait..."
Call systemTweaks()
Case 8
cls
textf " Uncheck the option: Users must enter their name and password to use the PC"
textf " Accept changes and restart your PC"
wait 0.2
oWSH.Run "control userpasswords2"
wait 0.2
Call systemTweaks()
Case Else
textf ""
textf " This option does not exist."
wait 1
Call systemTweaks()
End Select
Case 99
Call restoreSysTweaks()
Case 0
Call mainMenu()
End Select
End Function
Function restoreSysTweaks()
cls
On Error Resume Next
textf ""
textf " ____ _ _ _ _ RESTORE "
textf " / ___| _ ___| |_ ___ _ __ ___ (_)______ _| |_(_) ___ _ __ "
textf " | | | | | / __| __/ _ \| '_ ` _ \| |_ / _` | __| |/ _ \| '_ \ "
textf " | |__| |_| \__ \ || (_) | | | | | | |/ / (_| | |_| | (_) | | | |"
textf " \____\__,_|___/\__\___/|_| |_| |_|_/___\__,_|\__|_|\___/|_| |_|"
textf ""
textf " Select an option:"
textf ""
textf " "
textf " 1 = Disable Dark mode 5 = Disable 'Classic View' on the Control Panel"
textf " "
textf " 2 = Remove the 'God Mode' icon on the Desktop 6 = Disable Classic Volume slider"
textf " "
textf " 3 = Disable 'Quick Access' on Windows Explorer 7 = Disable CMD on pressing Win+U (Safe Mode)"
textf " "
textf " 4 = Stop showing file extensions"
textf " "
textf ""
textf " 0 = Return to previous menu"
textf ""
textl " > "
Select Case scanf
Case 1
textf ""
oWSH.RegWrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize\AppsUseLightTheme", 1, "REG_DWORD"
oWSH.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize\AppsUseLightTheme", 1, "REG_DWORD"
textf ""
textf ""
wait 0.2
Call restoreSysTweaks()
Case 2
textf ""
godFolder = oWSH.SpecialFolders("Desktop") & "\GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}"
If oFSO.FolderExists(godFolder) = True Then oFSO.DeleteFolder(godFolder)
textf ""
textf ""
wait 0.2
Call restoreSysTweaks()
Case 3
oWSH.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\LaunchTo", 2, "REG_DWORD"
textf ""
textf ""
wait 0.2
Call restoreSysTweaks()
Case 4
oWSH.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", 1, "REG_DWORD"
textf ""
textf ""
wait 0.2
Call restoreSysTweaks()
Case 5
oWSH.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ForceClassicControlPanel", 0, "REG_DWORD"
textf ""
textf ""
wait 0.2
Call restoreSysTweaks()
Case 6
oWSH.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MTCUVC\EnableMtcUvc", 1, "REG_DWORD"
textf ""
textf ""
wait 0.2
Call restoreSysTweaks()
Case 7
oWSH.RegDelete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\utilman.exe\Debugger"
textf ""
textf ""
wait 0.2
Call restoreSysTweaks()
Case 0
Call systemTweaks()
Case Else
textf ""
textf " This option does not exist."
wait 1
Call restoreSysTweaks()
End Select
End Function
Function onedriveConf()
cls
On Error Resume Next
textf " __ __ ____ ___ ____ _ "
textf " | \/ / ___| / _ \ _ __ ___| _ \ _ __(_)_ _____ "
textf " | |\/| \___ \ | | | | '_ \ / _ \ | | | '__| \ \ / / _ \"
textf " | | | |___) | | |_| | | | | __/ |_| | | | |\ V / __/"
textf " |_| |_|____/ \___/|_| |_|\___|____/|_| |_| \_/ \___|"
textf ""
textf " Select an option:"
textf ""
textf " 1 = Disable MS OneDrive"
textf " 2 = Enable MS OneDrive"
textf ""
textf " 0 = Return to menu"
textf ""
textl " > "
Select Case scanf
Case "1"
textf ""
textf " Disabling OneDrive..."
wait 1
oWSH.Run "taskkill.exe /F /IM OneDrive.exe /T"
oWSH.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive\DisableFileSyncNGSC", 1, "REG_DWORD"
oWSH.RegWrite "HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\OneDrive\DisableFileSyncNGSC", 1, "REG_DWORD"
oWSH.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive\DisableLibrariesDefaultSaveToOneDrive", 1, "REG_DWORD"
oWSH.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive\DisableMeteredNetworkFileSync", 1, "REG_DWORD"
oWSH.RegWrite "HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\Onedrive\DisableLibrariesDefaultSaveToOneDrive", 1, "REG_DWORD"
oWSH.RegWrite "HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\Onedrive\DisableMeteredNetworkFileSync", 1, "REG_DWORD"
oWSH.RegWrite "HKCR\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\System.IsPinnedToNameSpaceTree", 0, "REG_DWORD"
oWSH.RegWrite "HKCR\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\System.IsPinnedToNameSpaceTree", 0, "REG_DWORD"
oWSH.RegWrite "HKCU\Software\Classes\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\System.IsPinnedToNameSpaceTree", 0, "REG_DWORD"
oWSH.RegWrite "HKCU\Software\Classes\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\System.IsPinnedToNameSpaceTree", 0, "REG_DWORD"
oWSH.RegDelete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\OneDrive"
textf ""
textf " INFO: OneDrive has been disabled"
wait 1
Case "2"
textf ""
textf " Enabling OneDrive..."
wait 1
oWSH.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive\DisableFileSyncNGSC", 0, "REG_DWORD"
oWSH.RegWrite "HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\OneDrive\DisableFileSyncNGSC", 0, "REG_DWORD"
oWSH.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive\DisableLibrariesDefaultSaveToOneDrive", 0, "REG_DWORD"
oWSH.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive\DisableMeteredNetworkFileSync", 0, "REG_DWORD"
oWSH.RegWrite "HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\Onedrive\DisableLibrariesDefaultSaveToOneDrive", 0, "REG_DWORD"
oWSH.RegWrite "HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\Onedrive\DisableMeteredNetworkFileSync", 0, "REG_DWORD"
oWSH.RegWrite "HKCR\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\System.IsPinnedToNameSpaceTree", 1, "REG_DWORD"
oWSH.RegWrite "HKCR\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\System.IsPinnedToNameSpaceTree", 1, "REG_DWORD"
oWSH.RegWrite "HKCU\Software\Classes\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\System.IsPinnedToNameSpaceTree", 1, "REG_DWORD"
oWSH.RegWrite "HKCU\Software\Classes\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\System.IsPinnedToNameSpaceTree", 1, "REG_DWORD"
textf ""
textf " INFO: OneDrive is now enabled"
wait 1
Case "0"
Call mainMenu()
Case Else
textf ""
textf " This option does not exist."
wait 1
Call onedriveConf()
End Select
Call onedriveConf()
End Function
Function menuCortana()
cls
On Error Resume Next
textf " __ __ ____ ____ _ "
textf " | \/ / ___| / ___|___ _ __| |_ __ _ _ __ __ _ "
textf " | |\/| \___ \ | | / _ \| '__| __/ _` | '_ \ / _` |"
textf " | | | |___) | | |__| (_) | | | || (_| | | | | (_| |"
textf " |_| |_|____/ \____\___/|_| \__\__,_|_| |_|\__,_|"
textf " "
textf " Select an option:"
textf ""
textf " 1 = Disable MS Cortana"
textf " 2 = Enable MS Cortana"
textf " 3 = Remove Cortana App (Windows 10 20H1 and later)"
textf ""
textf " 0 = Return to menu"
textf ""
textl " > "
Select Case scanf
Case "1"
oWSH.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search\AllowCortana", 0, "REG_DWORD"
oWSH.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search\CortanaEnabled", 0, "REG_DWORD"
oWSH.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search\SearchboxTaskbarMode", 0, "REG_DWORD"
oWSH.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search\BingSearchEnabled", 0, "REG_DWORD"
textf ""
textf " >> Restarting Windows Explorer..."
oWSH.Run "taskkill.exe /F /IM explorer.exe"
wait 5
oWSH.Run "explorer.exe"
Case "2"
oWSH.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search\AllowCortana", 1, "REG_DWORD"
oWSH.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search\CortanaEnabled", 1, "REG_DWORD"
oWSH.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search\SearchboxTaskbarMode", 1, "REG_DWORD"
oWSH.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search\BingSearchEnabled", 1, "REG_DWORD"
textf ""
textf " >> Restarting Windows Explorer..."
oWSH.Run "taskkill.exe /F /IM explorer.exe"
wait 5
oWSH.Run "explorer.exe"
Case 3
oWSH.Run "powershell Get-AppxPackage Microsoft.549981C3F5F10 | Remove-AppxPackage"
Case "0"
Call mainMenu()
Case Else
textf ""
textf " This option does not exist."
wait 1
Call menuCortana()
End Select
Call menuCortana()
End Function
Function menuTracking()
cls
On Error Resume Next
textf " _____ _ _ "
textf " |_ _| __ __ _ ___| | _(_)_ __ __ _ "
textf " | || '__/ _` |/ __| |/ / | '_ \ / _` |"
textf " | || | | (_| | (__| <| | | | | (_| |"
textf " |_||_| \__,_|\___|_|\_\_|_| |_|\__, |"
textf " |___/"
textf ""
textf " Select an option:"
textf ""
textf " 1 = Disable tracking"
textf ""
textf " 2 = Enable tracking"
textf " "
textf " "
textf " 0 = Return to menu"
textf ""
textl " > "
Select Case scanf
Case 1
textf ""
textf " Disabling tracking services..."
oWSH.Run "sc stop DiagTrack"
oWSH.Run "sc config DiagTrack start= disabled"
oWSH.Run "sc stop dmwappushservice"
oWSH.Run "sc config dmwappushservice start= disabled"
wait 0.2
Call menuTracking()
Case 2
textf ""
textf " Enabling tracking services..."
oWSH.Run "sc start DiagTrack"
oWSH.Run "sc config DiagTrack start= enabled"
oWSH.Run "sc start dmwappushservice"
oWSH.Run "sc config dmwappushservice start= enabled"
wait 0.2
Call menuTracking()
Case 0
Call mainMenu()
Case Else
textf ""
textf " This option does not exist."
wait 1
Call menuTracking()
End Select
Call menuTracking()
End Function
Function defenderConf()
cls
On Error Resume Next
textf " __ __ ____ ____ __ _ "
textf " | \/ / ___| | _ \ ___ / _| ___ _ __ __| | ___ _ __ "
textf " | |\/| \___ \ | | | |/ _ \ |_ / _ \ '_ \ / _` |/ _ \ '__|"
textf " | | | |___) | | |_| | __/ _| __/ | | | (_| | __/ | "
textf " |_| |_|____/ |____/ \___|_| \___|_| |_|\__,_|\___|_| "
textf ""
textf " In some builds of Windows 10 and 11, MS Defender have to be disabled in Safe Mode, because"
textf " doing so in Standard mode does not work."
textf ""
textf " Select an option:"
textf ""