├── DNXDOScript.7z ├── DNXDOScript2.0.cmd ├── Extras ├── DNXDOScript.ico └── Wallpaper.jpg ├── README.md └── Scripts ├── Disabled └── Z91_Install Microsoft Store.cmd └── Enabled ├── 001_Block Telemetry.ps1 ├── 002_Disable Services.ps1 ├── 003_Disable Windows Defender.ps1 ├── 004_Experimental Unfuckery.ps1 ├── 005_Fix Privacy Settings.ps1 ├── 006_Optimize User Interface.ps1 ├── 007_Optimize Windows Update.ps1 ├── 008_Remove Default Apps.ps1 ├── 009_Remove Onedrive.ps1 ├── Disable Background Applications.cmd ├── Disable Fax Services.cmd ├── Disable Internet Printing Services.cmd ├── Disable Microsoft Internet Explorer 11.cmd ├── Disable Powershell v2.cmd ├── Disable Print to PDF Services.cmd ├── Disable Print to XPS Services.cmd ├── Disable Printing Foundation.cmd ├── Disable Remote Differential Compression.Safe.cmd ├── Disable Remote Differential Compression.cmd ├── Disable Timeline.cmd ├── Disable VBS [Virtualization Based Security] CPU.cmd ├── Disable Windows Media Player.cmd ├── Disable Windows Security Center.cmd ├── Disable Work Folders.cmd ├── Enable Hibernation.Safe.cmd ├── Fix Pagefile On Windows.cmd ├── Fix for Search Menu.cmd ├── Fix for Unreal Engine.cmd ├── Remove Taskview button from Windows Bar.Safe.cmd ├── Set Coalescing State [RSC].Safe.cmd ├── Set Gaming Priority.Safe.cmd ├── Set IncreaseUserVa value to Half of RAM.cmd ├── Set Internal Cache Leves of NTFS.cmd ├── Set Multimedia Class Sheduler.Safe.cmd ├── Set Power Plan to Balanced.Safe.cmd ├── Set SystemResponsiveness for Gaming.Safe.cmd ├── Set Visual Effect Windows for Performance.Safe.cmd ├── Setup Core Affinity to Foreground Process.Safe.cmd ├── Show Drive Letters Before Drive Label.Safe.cmd ├── Z90_Install Chocolatey Repository.cmd └── Z92_Install Microsoft Store.cmd /DNXDOScript.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Deen0X/DNXDOScript/b1ef1ebcbc2a807a691e1ae7f224c91c84f9e853/DNXDOScript.7z -------------------------------------------------------------------------------- /DNXDOScript2.0.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enableextensions enabledelayedexpansion 3 | cd /d "%~dp0" 4 | pushd "%~dp0" 5 | cls 6 | set iXCMD=%1 7 | if "_%iXCMD%"=="_" set iXCMD=0 8 | if %iXCMD%==0 ( 9 | echo Re-Launching script with necessary environment setup [Admin and Unrestricted Execution Policy] 10 | set "myF=%~dpnx0" 11 | call :stringPS "!myF!" xRun 12 | rem echo xRun=!xRun! 13 | set "PSRun=powershell -ExecutionPolicy Unrestricted Start-Process powershell -Verb "runAs '!xRun! 1'"" 14 | rem echo PSRun=!PSRun! 15 | !PSRun! 16 | goto :ToEnd2 17 | ) 18 | rem call :write "ExecutionPolicy: " 19 | rem powershell get-ExecutionPolicy 20 | 21 | set bDebug=0 22 | :: Not necessary to check admin. 23 | :: goto :isAdmin2 24 | :: :IsAdminBack 25 | 26 | call :InitScript "%0" 27 | Goto :ToStartScript 28 | 29 | :: your code must start on ToStartScript label. 30 | 31 | 32 | :: ================================================================================================ 33 | :: ================================================================================================ 34 | :: ================================================================================================ 35 | 36 | :: __________________________________________________________________ Sub isAdmin 37 | :: Check if the current run environment is admin. Need to create ":IsAdminBack" label to return 38 | :isAdmin :{ 39 | setlocal disableDelayedExpansion 40 | set myP0=%~1 41 | set myRC=0 42 | net session >nul 2>&1 43 | if %errorLevel% == 0 ( 44 | rem echo Success: Administrative permissions confirmed. 45 | set myRC=1 46 | ) else ( 47 | rem echo Failure: Current permissions inadequate. 48 | set myRC=0 49 | echo "%~0" "%~1" "%~2">%temp%\DNXMainTemp.cmd 50 | set "myPS=powershell Start-Process powershell -Verb "runAs %temp%\DNXMainTemp.cmd"" 51 | call %%myPS%% 52 | goto :eof 53 | ) 54 | ( 55 | endlocal 56 | goto :IsAdminBack 57 | ) 58 | :} 59 | 60 | :: __________________________________________________________________ sub InitScript 61 | :: Main Initialization routine 62 | :InitScript param0 :{ 63 | set mySFN=%~1 64 | call :InitColors 65 | call :writeInitialize 66 | ( 67 | exit /b) 68 | :} 69 | 70 | :: __________________________________________________________________ sub InitColors 71 | :: Initialize color variables 72 | :InitColors :{ 73 | set cReset= 74 | set cBold= 75 | set cUnder= 76 | set cInv= 77 | 78 | set caBLACK=0 79 | set caRED=1 80 | set caGREEN=2 81 | set caYELLOW=3 82 | set caBLUE=4 83 | set caMAGENTA=5 84 | set caCYAN=6 85 | set caWHITE=7 86 | set caTEST=88 87 | 88 | set coFORE=3 89 | set coNORMAL=3 90 | set coFORENORMAL=3 91 | set coBACK=4 92 | set coBACKNORMAL=4 93 | set coFORESTRONG=9 94 | set coBACKSTRONG=10 95 | 96 | set cTAFore=Yellow 97 | set cTAForeType=STRONG 98 | set cTABack=Red 99 | set cTABackType=NORMAL 100 | 101 | :: standard colors for powershell window 102 | set cDeFore=white 103 | set cDeType=normal 104 | set cDeBack=blue 105 | set cdeBackType=normal 106 | ( 107 | exit /b) 108 | :} 109 | 110 | :: __________________________________________________________________ sub InitColors 111 | :: Set string to be printed in colors 112 | :cText varText {outVar} [foreColor] [forType] [backColor] [backType] :{ 113 | setlocal disableDelayedExpansion 114 | set myV1=%3 115 | set myVS1=%4 116 | set myV2=%5 117 | set myVS2=%6 118 | 119 | rem if "_%myV1%"=="_" set myV1=%cDeFore% 120 | rem if "_%myVS1%"=="_" set myVS1=%cDeType% 121 | rem if "_%myV2%"=="_" set myV2=%cDeBack% 122 | rem if "_%myVS2%"=="_" set myVS2=%cDeBackType% 123 | if defined ca%myV1% ( 124 | if /I "_%myVS1%" EQU "_strong" ( 125 | call set xFCol=9%%ca%myV1%%% 126 | ) else ( 127 | call set xFCol=3%%ca%myV1%%% 128 | ) 129 | ) else ( 130 | rem set xFCol=3%caWHITE% 131 | ) 132 | 133 | if defined ca%myV2% ( 134 | if /I "_%myVS2%" EQU "_strong" ( 135 | call set xBCol=10%%ca%myV2%%% 136 | ) else ( 137 | call set xBCol=4%%ca%myV2%%% 138 | ) 139 | ) else ( 140 | rem set xFCol=3%caWHITE% 141 | ) 142 | 143 | rem set myXCol=%xBCol%;%xFCol% 144 | set iCC=0 145 | if "_%xFCol%" NEQ "_" set /a iCC+=1 146 | if "_%xBCol%" NEQ "_" set /a iCC+=1 147 | if %iCC% == 2 ( 148 | set myXCol=%xBCol%;%xFCol% 149 | ) else ( 150 | set myXCol=%xBCol%%xFCol% 151 | ) 152 | set rcVar=[%myXCol%m%~1 153 | if %bDebug%==1 ( 154 | echo ====== sub cText [%1] [%2] [%3] [%4] [%5] [%6] 155 | echo * xBCol =%xBCol% 156 | echo * xFCol =%xFCol% 157 | echo * myXCol =%myXCol% 158 | echo * rcVar =%rcVar% 159 | ) 160 | ( 161 | endlocal 162 | set %2=%rcVar% 163 | exit /b) 164 | :} 165 | 166 | :: __________________________________________________________________ sub cTextAlert 167 | :: Quick set alert color for string text 168 | :cTextAlert varText {outVar} [forecolor] [fortype] [backcolor] [backtype] :{ 169 | set myT=%~1 170 | set myV1=%3 171 | set mySV1=%4 172 | set myV2=%5 173 | set mySV5=%6 174 | 175 | if "_%myV1%" NEQ "_" ( 176 | set cTAFore=%myV1% 177 | ) 178 | if "_%mySV1%" NEQ "_" ( 179 | set cTAForeType=%mySV1% 180 | ) 181 | if "_%myV2%" NEQ "_" ( 182 | set cTABack=%myV2% 183 | ) 184 | if "_%mySV2%" NEQ "_" ( 185 | set cTABackType=%mySV2% 186 | ) 187 | call :cText "%myT%" %cTAFore% %cTAForeType% %cTABack% %cTABackType% rcVar 188 | ( 189 | endlocal 190 | set %2=%rcVar% 191 | exit /b) 192 | :} 193 | 194 | :: __________________________________________________________________ sub swriteXY 195 | :: print text on X,Y position 196 | :writeXY X Y text :{ 197 | setlocal disableDelayedExpansion 198 | 199 | FOR /F %%A in ('ECHO prompt $E^| cmd') DO SET "ESC=%%A" 200 | rem %SCRIPT% 476 | echo sLinkFile = "%sPath%%sTitle%.lnk" >> %SCRIPT% 477 | echo Set oLink = oWS.CreateShortcut(sLinkFile) >> %SCRIPT% 478 | echo oLink.TargetPath = "%sDest%" >> %SCRIPT% 479 | echo oLink.Arguments = "%sArgs%" >> %SCRIPT% 480 | echo oLink.WorkingDirectory = "%sWork%" >> %SCRIPT% 481 | echo oLink.IconLocation = "%sIcon%" >> %SCRIPT% 482 | echo oLink.Save >> %SCRIPT% 483 | cscript /nologo %SCRIPT% 484 | del %SCRIPT% 485 | ( 486 | endlocal 487 | exit /b 488 | ) 489 | :} 490 | 491 | :: __________________________________________________________________ sub inStr 492 | :: search string into another string 493 | :inStr strVar strF stAt {outVar} :{ 494 | rem example: 495 | rem call :inStr %RootPath%New New 0 Var3 496 | setlocal enabledelayedexpansion 497 | if %bDebug%==6 echo inStr [%1] [%2] [%3] [%4] [%5] 498 | rem @echo on 499 | set str1=%~1 500 | set sstr=%~2 501 | set stAt=%3 502 | 503 | rem set /a stAt=%stAt%-1 504 | call :strlen "%str1%" len1 505 | call :strlen "%sstr%" len2 506 | set /a stop=len1-len2 507 | set fpos=0 508 | 509 | if %bDebug%==6 ( 510 | echo ==== Debug inStr 511 | echo * str1 =%str1% 512 | echo * sstr =%sstr% 513 | echo * stAt =%stAt% 514 | echo * len1 =%len1% 515 | echo * len2 =%len2% 516 | echo * stop =%stop% 517 | ) 518 | 519 | if %stop% gtr 0 for /l %%i in (%stAt%,1,%stop%) do ( 520 | if "!str1:~%%i,%len2%!"=="%sstr%" ( 521 | set /a position=%%i+1 522 | goto ExitinStr1 523 | ) 524 | ) 525 | :ExitinStr1 526 | if defined position ( 527 | set fpos=%position% 528 | ) else ( 529 | set fpos=0 530 | ) 531 | ( 532 | endlocal 533 | set %4=%fpos% 534 | exit /b 535 | ) 536 | :} 537 | 538 | :: __________________________________________________________________ checkDIRF 539 | :: check if the argument (must be an directory) ends with "\" 540 | :checkDIRF strVar {outVar} :{ 541 | setlocal enableextensions enabledelayedexpansion 542 | set mySV=%~1 543 | call :strLen "%mySV%" mySVLen 544 | rem start counting from zero 545 | set /a mySVLen=%mySVLen%-1 546 | set mySVLen=%mySVLen% 547 | call set myLL=%%mySV:~%mySVLen%,1%%% 548 | if "_%myLL%" NEQ "_\" ( 549 | set sRC=%mySV%\ 550 | ) else ( 551 | set sRC=%mySV% 552 | ) 553 | ( 554 | endlocal 555 | set %2=%sRC% 556 | exit /b 557 | ) 558 | :} 559 | 560 | :: __________________________________________________________________ Sub IsFile 561 | :: Check if the argument is a file or directory (must exist) 562 | :IsFile strVar {outVar} :{ 563 | SETLOCAL ENABLEEXTENSIONS 564 | set ATTR=%~a1 565 | set DIRATTR=%ATTR:~0,1% 566 | 567 | if /I "%DIRATTR%"=="d" ( 568 | set sRC=DIR 569 | ) else ( 570 | set sRC=FILE 571 | ) 572 | ( 573 | endlocal 574 | set %2=%sRC% 575 | exit /b 576 | ) 577 | :} 578 | 579 | :: __________________________________________________________________ Sub strLen 580 | :: Get the lenght of a string 581 | :strLen strVar {outVar} :{ 582 | ( 583 | setlocal EnableDelayedExpansion 584 | rem (set^ xtmp="!%~1!") 585 | set "xtmp=%~1" 586 | rem echo var1=%1 587 | rem echo var1b=%~1 588 | rem echo xtmp=!xtmp! 589 | rem pause 590 | if defined xtmp ( 591 | set "len=1" 592 | for %%P in (4096 2048 1024 512 256 128 64 32 16 8 4 2 1) do ( 593 | if "!xtmp:~%%P,1!" NEQ "" ( 594 | set /a "len+=%%P" 595 | set "xtmp=!xtmp:~%%P!" 596 | ) 597 | ) 598 | ) ELSE ( 599 | set len=0 600 | ) 601 | ) 602 | ( 603 | endlocal 604 | set "%~2=%len%" 605 | exit /b 606 | ) 607 | :} 608 | 609 | :: __________________________________________________________________ sub Write 610 | :: Write a string without return line, stripping quotes 611 | :write strVar :{ 612 | setlocal disableDelayedExpansion 613 | :: 614 | :: Write the literal string Str to stdout without a terminating 615 | :: carriage return or line feed. Enclosing quotes are stripped. 616 | :: 617 | :: This routine works by calling :writeVar 618 | :: 619 | set "strVar=%~1" 620 | set "strLen=%~2" 621 | call :writeVar strVar strLen 622 | endlocal 623 | ( 624 | exit /b 625 | ) 626 | :} 627 | 628 | :: __________________________________________________________________ sub WriteVar 629 | :: Write a string without return line 630 | :writeVar strVar :{ 631 | if not defined %~1 exit /b 632 | setlocal enableDelayedExpansion 633 | :: 634 | :: Writes the value of variable StrVar to stdout without a terminating 635 | :: carriage return or line feed. 636 | :: 637 | :: The routine relies on variables defined by :writeInitialize. If the 638 | :: variables are not yet defined, then it calls :writeInitialize to 639 | :: temporarily define them. Performance can be improved by explicitly 640 | :: calling :writeInitialize once before the first call to :writeVar 641 | :: 642 | if not defined $write.sub call :writeInitialize 643 | set $write.special=1 644 | if "!%~1:~0,1!" equ "^!" set "$write.special=" 645 | for /f delims^=^ eol^= %%A in ("!%~1:~0,1!") do ( 646 | if "%%A" neq "=" if "!$write.problemChars:%%A=!" equ "!$write.problemChars!" set "$write.special=" 647 | ) 648 | if not defined $write.special ( 649 | "%$write.temp%_1.txt" (echo !str!!$write.sub!) 653 | copy "%$write.temp%_1.txt" /a "%$write.temp%_2.txt" /b >nul 654 | type "%$write.temp%_2.txt" 655 | del "%$write.temp%_1.txt" "%$write.temp%_2.txt" 656 | set "str2=!str:*%$write.sub%=%$write.sub%!" 657 | if "!str2!" neq "!str!" or 0x1A 673 | :: 674 | :: $write.problemChars - list of characters that cause problems for SET /P 675 | :: <0xFF> 676 | :: Note that and also causes problems, but are handled elsewhere 677 | :: 678 | set "$write.temp=%temp%\writeTemp%random%" 679 | copy nul "%$write.temp%.txt" /a >nul 680 | for /f "usebackq" %%A in ("%$write.temp%.txt") do set "$write.sub=%%A" 681 | del "%$write.temp%.txt" 682 | for /f %%A in ('copy /z "%~f0" nul') do for /f %%B in ('cls') do ( 683 | set "$write.problemChars=%%A%%B "" 684 | REM the characters after %%B above should be <0xFF> 685 | ) 686 | ( 687 | exit /b 688 | ) 689 | :} 690 | 691 | :: __________________________________________________________________ sub stringPS 692 | :: Replace spaces on string, adding a ` character, to be used on powershell parameters 693 | :stringPS strVar {outVar} :{ 694 | setlocal enableextensions enabledelayedexpansion 695 | set var1=%~1 696 | set varRC=%var1: =` % 697 | ( 698 | endlocal 699 | set %2=%varRC% 700 | exit /b 701 | ) 702 | :} 703 | 704 | :: __________________________________________________________________ sub LoCase 705 | :: Subroutine to convert a variable VALUE to all lower case. 706 | :LoCase strVar {outVar} :{ 707 | set myV=%~1 708 | FOR %%i IN ("A=a" "B=b" "C=c" "D=d" "E=e" "F=f" "G=g" "H=h" "I=i" "J=j" "K=k" "L=l" "M=m" "N=n" "Ñ=ñ" "O=o" "P=p" "Q=q" "R=r" "S=s" "T=t" "U=u" "V=v" "W=w" "X=x" "Y=y" "Z=z") DO ( 709 | CALL SET "myV=%%myV:%%~i%%" 710 | ) 711 | ( 712 | set %2=%myV% 713 | exit /b 714 | ) 715 | :} 716 | 717 | :: __________________________________________________________________ sub UpCase 718 | :: Subroutine to convert a variable VALUE to all UPPER CASE. 719 | :UpCase strVar {outVar} :{ 720 | set myV=%~1 721 | FOR %%i IN ("a=A" "b=B" "c=C" "d=D" "e=E" "f=F" "g=G" "h=H" "i=I" "j=J" "k=K" "l=L" "m=M" "n=N" "o=O" "p=P" "q=Q" "r=R" "s=S" "t=T" "u=U" "v=V" "w=W" "x=X" "y=Y" "z=Z") DO ( 722 | CALL SET "myV=%%myV:%%~i%%" 723 | ) 724 | ( 725 | set %2=%myV% 726 | exit /b 727 | ) 728 | :} 729 | 730 | :: __________________________________________________________________ sub TCase 731 | :: Subroutine to convert a variable VALUE to Title Case. 732 | :TCase strVar {outVar} :{ 733 | set myV=%~1 734 | call :LoCase "%myV%" myV 735 | set myV= %myV% 736 | FOR %%i IN (" a= A" " b= B" " c= C" " d= D" " e= E" " f= F" " g= G" " h= H" " i= I" " j= J" " k= K" " l= L" " m= M" " n= N" " o= O" " p= P" " q= Q" " r= R" " s= S" " t= T" " u= U" " v= V" " w= W" " x= X" " y= Y" " z= Z") DO ( 737 | CALL SET "myV=%%myV:%%~i%%" 738 | ) 739 | set myV=%myV:~1,1000% 740 | ( 741 | set %2=%myV% 742 | exit /b 743 | ) 744 | :} 745 | 746 | :: __________________________________________________________________ sub EndMessage 747 | :: write a standard exit message from the script 748 | :EndMessage :{ 749 | echo No olvides visitarnos en: 750 | echo Portable Master Race (ESP) https://t.me/gpdwinhispano 751 | echo Deen0X's Blog: https://www.deen0x.com 752 | echo DNX Projects: https://github.com/Deen0x 753 | echo Zalu2^^! 754 | echo Have a nice day! 755 | 756 | ( 757 | exit /b 758 | ) 759 | :} 760 | 761 | :: __________________________________________________________________ sub writeL 762 | :: Write a string without return line, stripping quotes, adding spaces up to len specified 763 | :writeL strVar [strLen] [strText2] :{ 764 | setlocal enableDelayedExpansion 765 | set "sVar=%~1" 766 | set lVar=%2 767 | if "_%2" NEQ "_" ( 768 | set "sFill= ." 769 | :: sFill = 1000 spaces 770 | set sFill=!sFill!!sFill!!sFill!!sFill!!sFill!!sFill!!sFill!!sFill!!sFill!!sFill! 771 | set "sVar=!sVar!!sFill!"_ 772 | call set sVar=!!sVar:~0,%lVar%!! 773 | ) else ( 774 | set sVar=%2 775 | ) 776 | call :write "!sVar!%~3" 777 | ( 778 | endlocal 779 | exit /b 780 | ) 781 | :} 782 | 783 | :: __________________________________________________________________ sub getFreeRAM 784 | :: get available ram 785 | :getFreeRAM {outVar} :{ 786 | for /f "skip=1" %%p in ('wmic os get freephysicalmemory') do ( 787 | set m=%%p 788 | goto :getFreeRAMdone 789 | ) 790 | :getFreeRAMdone 791 | ( 792 | endlocal 793 | set %1=%m% 794 | exit /b 795 | ) 796 | :} 797 | 798 | 799 | :: __________________________________________________________________ sub getTotalRAM 800 | :: Get total ram 801 | :getTotalRAM :{ 802 | setlocal enableDelayedExpansion 803 | if not defined tempFN set tempFN=%temp%\PS-%RANDOM%%RANDOM%%RANDOM%%RANDOM%.out.txt 804 | for /F "TOKENS=2 DELIMS==" %%A in ('WMIC memorychip GET Capacity /VALUE') DO ( 805 | set SLO=%%A 806 | set /a myGB=1024*1024*1024 807 | set "myC=powershell -Command "!SLO:~0,-1!/!myGB!"" 808 | !myC! >"%tempFN%" 809 | set /p xGB=<"%tempFN%" 810 | 811 | ) 812 | ( 813 | endlocal 814 | set %1=%xGB% 815 | exit /b 816 | ):} 817 | 818 | :: __________________________________________________________________ sub SetWallpaper 819 | :: Set the Windows Wallpaper 820 | :SetWallpaper strVar :{ 821 | set myWP=%~1 822 | copy "%myWP%" "C:\Windows\DNXWallPaper.jpg" >nul 823 | reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d "C:\Windows\DNXWallPaper.jpg" /f >nul 824 | RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters 825 | powershell sleep 5 826 | RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters 827 | ( 828 | exit /b 829 | ) 830 | :} 831 | 832 | :: ================================================================================================ 833 | :: ================================================================================================ 834 | :: ================================================================================================ 835 | 836 | 837 | :: __________________________________________________________________ sub InitMyScript 838 | :: Initialization user script 839 | :InitMyScript :{ 840 | set "BaseDirProc=%~dp1" 841 | set "ScriptPath=%~1" 842 | 843 | :: subscripts windows mode when launched. MAX MIN NORMAL FILEOUT 844 | set rSUBPROC=NORMAL 845 | 846 | ::Color for subscript windows 847 | set rSUBPROCCOLOR=8F 848 | 849 | ::filename for temp outfiles 850 | set tempFN=%temp%\PS-%RANDOM%%RANDOM%%RANDOM%%RANDOM%.out.txt 851 | 852 | rem echo BaseDirProc=%BaseDirProc% 853 | 854 | set xmyIcon=%BaseDirProc%Extras\DNXDOScript.ico 855 | set myIconN=0 856 | set myIcon=%xmyIcon% 857 | if NOT exist "%xmyIcon%" ( 858 | echo asignando icono por defecto 859 | set myIcon=%SystemRoot%\System32\SHELL32.dll,130 860 | set myIconN=126 861 | ) 862 | ( 863 | exit /b 864 | ) 865 | :} 866 | 867 | :: __________________________________________________________________ sub ProcessDir 868 | :: Process files in folder 869 | :ProcessDir strFolder strMask strTitle :{ 870 | set strFolder=%~1 871 | set strMask=%~2 872 | set sTitle=%~3 873 | echo. 874 | call :ctext "%sTitle%" sTXT yellow strong 875 | echo %sTXT% 876 | 877 | for /r "%strFolder%" %%i in (%strMask%) do ( 878 | call :sSplit "%%~ni" "_" sVar1 sVar2 sVar3 sVar4 sVar5 sVar6 sVar7 879 | 880 | call :writeL "- !sVar2!" 76 "[" 881 | call :stringPS "%%i" sPS 882 | set "sCMD=start /WAIT /%rSUBPROC% powershell -Command "cmd /C color %rSUBPROCCOLOR%; !sPS!"" 883 | set myXT=%%~xi 884 | set sLet=!myXT:~1,1! 885 | if "%%~xi"==".reg" ( 886 | regedit /s !sCMD! 887 | ) else ( 888 | !sCMD! 889 | rem !sCMD! >!tempFN! 890 | ) 891 | call :write "!sLet!" 892 | %sELOK% 893 | ) 894 | ( 895 | exit /b 896 | ) 897 | :} 898 | 899 | 900 | :: __________________________________________________________________ sub ToStartScript 901 | :: Start User Script 902 | :ToStartScript :{ 903 | call :initMyScript "%~0" "%~1" "%~2" "%~3" "%~4" "%~5" "%~6" "%~7" "%~8" "%~9" 904 | call :ctext "W4RHH4WK" sW4R black normal green normal 905 | call :ctext "## DNX ##" sDNX black normal green normal 906 | call :ctext "OK" sOK yellow normal blue strong 907 | call :ctext "NO" sNO black normal red strong 908 | set sELOK=echo ] %sOK%! 909 | set sELNOK=echo ] %sNO%! 910 | 911 | set RunMode=%1 912 | if "_%RunMode%"=="_/safe" ( 913 | set "RunMode=SAFE" 914 | set "RMFilter=.safe" 915 | ) else ( 916 | set "RMFilter=" 917 | set "RunMode=NORMAL" 918 | ) 919 | :: ___________________ 920 | 921 | 922 | :: goto :ToStartScript2 923 | cls 924 | rem goto :ToStartScript2 925 | call :ctext "Deen0X Debloat and Optimization Script for Windows 10 v2.0: DNXDOScript" sTXT white strong cyan normal 926 | title Deen0X Debloat and Optimization Script [DNXDOScript] 927 | echo %sTXT% 928 | echo ----------------------------------------------------------------------- 929 | echo. 930 | echo The original script was created with focus on GPD gaming devices, for improve their performance 931 | echo (basically GPD-WIN/WIN2) but you can try this on any windows 10 based device. 932 | echo. 933 | echo The original idea is based on the "Debloat Windows 10" project from "%sW4R%" 934 | call :ctext "https://github.com/W4RH4WK/Debloat-Windows-10" sTXT blue strong white normal 935 | echo %sTXT% 936 | echo But i add my own code with stuff i found on internet, researching about how to gain performance 937 | echo on low-powered machines for gaming. 938 | echo. 939 | echo For more information about this script and updates, visit the main page: 940 | call :ctext "https://www.github.com/DNXDOScript" sTXT blue strong white normal 941 | echo %sTXT% 942 | echo. 943 | echo. 944 | echo. 945 | call :cText "ATTENTION" sTXT black normal red strong 946 | echo =============================================================================================== 947 | echo ================================== %sTXT% ================================================== 948 | echo =============================================================================================== 949 | call :cText "WILL MODIFY IN DEEP YOUR CURRENT WINDOWS INSTALLATION" sTXT black normal red strong 950 | echo This procedure %sTXT% and cannot 951 | echo be reverted 952 | echo. 953 | echo There is any kind of warranty about their execution, so i recommend to create a 954 | echo backup/recover point on windows before running this script. 955 | call :ctext "You will use this at your own risk." sTXT red strong white normal 956 | echo %sTXT% 957 | echo. 958 | echo =============================================================================================== 959 | echo =============================================================================================== 960 | Timeout /T 5 961 | echo (10 seconds timer. default answer is No) 962 | call :ctext "Do you want to contine?" sTXT black normal white strong 963 | call :write "%sTXT%" 964 | choice /C YN /N /T 10 /D N /M " [Y]es/[N]o " 965 | if errorlevel 2 goto :ToEnd 966 | echo. 967 | 968 | echo This script can run in two modes: 969 | echo SAFE - Run only scripts considered safe to run on any machine. This 970 | echo mode will not in-deep modify the system, but their effect is 971 | echo limited compared than the NORMAL mode. 972 | echo Use this mode for machines that you will use for working. 973 | echo NORMAL - Run all enabled scripts. In deep modifications on the system. 974 | echo Use this mode for machines that you will use basically for 975 | echo gaming, such GPD-WIN/WIN2, Tablets, etc. 976 | choice /c SN /M "Run in Safe or Normal mode?" 977 | if errorlevel 2 ( 978 | set "RMFilter=" 979 | set "RunMode=NORMAL" 980 | ) 981 | if errorlevel 1 ( 982 | set "RMFilter=.safe" 983 | set "RunMode=SAFE" 984 | ) 985 | echo selected %RunMode% mode 986 | echo. 987 | echo (10 seconds timer. default Minimized) 988 | choice /c NM /D M /T 10 /M "Run SubScripts in Normal or Minimized mode?" 989 | if errorlevel 2 ( 990 | set "rSUBPROC=MIN" 991 | ) 992 | if errorlevel 1 ( 993 | set "rSUBPROC=NORMAL" 994 | ) 995 | echo selected %rSUBPROC% mode 996 | echo (10 seconds timer. default is Yes) 997 | choice /c YN /D Y /T 10 /M "Create restore point?" 998 | if errorlevel 1 ( 999 | powershell Enable-ComputerRestore -Drive 'C:\' 1000 | powershell.exe -ExecutionPolicy Bypass -Command "Checkpoint-Computer -Description "MyRestorePoint" -RestorePointType "MODIFY_SETTINGS"" 1001 | ) 1002 | 1003 | cls 1004 | :ToStartScript2 1005 | call :ctext "%RunMode%" sTXT black normal yellow normal 1006 | echo Runnin in %sTXT% mode 1007 | rem echo RMFilter=%RMFilter% 1008 | echo. 1009 | call :cText "Note:" sTXT green strong blue normal 1010 | echo %sTXT% Some steps may take long time on solve, so it is normal for 1011 | echo the system to appear to be unresponsive. 1012 | echo Take a little pacience. 1013 | echo. 1014 | echo %sTXT% Maybe subscripts show some errors when running. This is normal 1015 | echo and you don´t need to worry about this. 1016 | echo. 1017 | echo ===================================================================== 1018 | call :ctext "%RunMode%" sTXT yellow normal blue normal 1019 | echo Main Run Mode : %sTXT% 1020 | call :ctext "%rSUBPROC%" sTXT yellow normal blue normal 1021 | echo SubScript window mode: %sTXT% 1022 | echo ===================================================================== 1023 | echo. 1024 | call :cText "Step 1" sTXT black normal yellow normal 1025 | echo %sTXT%: Debloat Windows scripts and optimization for gaming station. 1026 | echo. 1027 | echo Setting environment for script execution... 1028 | 1029 | call :writeL "- Unblock PowerShell scripts and modules within this directory" 76 "[" 1030 | powershell -ExecutionPolicy Unrestricted -command "ls -Recurse *.ps*1 | Unblock-File" 1031 | call :write "." 1032 | powershell -Command "ls -Recurse *.psm1 | Unblock-File" 1033 | %sELOK% 1034 | 1035 | 1036 | :: __________________________________________________________________ WSubScripts 1037 | call :ProcessDir "%BaseDirProc%Scripts\Enabled\" "*%RMFilter%.*" "** Running Subscripts **" 1038 | 1039 | call :writeL "- Set Custom Wallpaper" 76 "[" 1040 | call :SetWallpaper "%BaseDirProc%Extras\Wallpaper.jpg" 1041 | call :write "." 1042 | %sELOK% 1043 | 1044 | :: __________________________________________________________________ WUtils 1045 | call :ProcessDir "%BaseDirProc%Utils\Enabled\" "*%RMFilter%.*" "** Running Utils **" 1046 | 1047 | call :writeL "- Adding Windows Start Menu Entry for this Script" 76 "[" 1048 | set sDESTShortCut=%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\DNXScript 1049 | if not exist "%sDESTShortCut%" mkdir "%sDESTShortCut%" 1050 | call :CreateShortCut "%~dpnx1" "%sDESTShortCut%" "DNXDOScript - Debloat and Optimiaztion Script by Deen0X" "" "%myIcon%" "" 1051 | call :writeL "." 1052 | %sELOK% 1053 | echo. 1054 | 1055 | :} 1056 | 1057 | :ToEnd 1058 | call :EndMessage 1059 | pause 1060 | 1061 | :ToEnd2 1062 | -------------------------------------------------------------------------------- /Extras/DNXDOScript.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Deen0X/DNXDOScript/b1ef1ebcbc2a807a691e1ae7f224c91c84f9e853/Extras/DNXDOScript.ico -------------------------------------------------------------------------------- /Extras/Wallpaper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Deen0X/DNXDOScript/b1ef1ebcbc2a807a691e1ae7f224c91c84f9e853/Extras/Wallpaper.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DNXDOScript ![image](https://user-images.githubusercontent.com/3720302/138952395-1b97a5be-0f24-4228-be5e-b8d8b80d37a7.png) 2 | 3 | Debloat and Optimization Script for machines running Windows 10 4 | 5 | Download package 6 | [DNXDOScript.zip](https://github.com/Deen0X/DNXDOScript/releases 7 | 8 | you can check for updates here: 9 | 10 | https://github.com/Deen0X/DNXDOScript 11 | 12 | https://t.me/PCMasterRacePortable/673587 (Spanish spoken Group) 13 | 14 | This Script help to gain performance on your system, in two main ways: 15 | - Original project was based on W4RH4WK work, but starting with 2.1.8 , i write my own code to implement optimizations on the code, improving performance to run the main script. 16 | - The main goal of this script is to create a way to allow users to include their own subscripts, without need to modifying the original script. Simply add your Powersheel Script (ps1), Command Batch file (cmd, bat) or reg files on Scripts\Enabled or Utils\Enabled folders 17 | - This script include many tweaks for improve performance on windows, focused on setup a gaming pc, or trying to get usable old machines such tablets, netbooks, old pcs, etc, that don´t have so much resources but can install windows 10. 18 | - Many scripts from previous versions was merged in a main script (cmd, bat, reg, ps1) for improve performance when running from main script. You can check them and modify if you need. I added comments to each section for allow to easy understand what is doing these files. 19 | 20 | As extra, there are some Utils included with the package that may be interesting for users to run on their system 21 | 22 | # This script will modify your windows 10 installation 23 | 24 | ![image](https://user-images.githubusercontent.com/3720302/138956331-15ae85fe-4dcc-421d-8e2d-dbe241e0f224.png) 25 | 26 | 27 | # How it works? 28 | 29 | You must run as administrator (right click on DNSDOScript.cmd file, run as administrator) 30 | 31 | The main script will scan two main folders, looking for files (subscripts) that will execute. 32 | 33 | These files can be .cmd, .bat, .reg, .ps1, etc, anything that can be launched from the main script (cmd). Take note that these scripts will be executed in alphabetical order, so if you want to specific order on script execution, you must rename scripts in the proper way to ensure their execution. I suggest to add some number before the name, such "000_name of script.cmd" , "001_name of powershell script.ps1", etc. 34 | 35 | There are two main folders: 36 | - Scripts: This contain all scripts that will be launched by the main script 37 | - Utils: This contain extra scripts considered as Util/Tool, because will not impact directly on the performance and most of them are accessory to the installation. You can install your own extra software using some cmd/ps1 script. 38 | 39 | Inside each main folder, there are two subfolders 40 | - Enabled: Scripts that will be executed are included on this folder 41 | - Disabled: If you don´t want to run some script, instead of editing or deleting, move it from Enabled folder to this one. The main script will not execute any of the scripts on this folder. 42 | 43 | # Main Screen Execution 44 | 45 | The main screen of the Script will show the subscripts launched, and a little info about the kind of subscript (the first letter of the extension, to know if a Reg file, Cmd, Bat, Ps1, etc correspond to this script) 46 | 47 | ![image](https://user-images.githubusercontent.com/3720302/138957308-d7f77f5d-b6b5-4ed6-be6d-03c4eda83144.png) 48 | 49 | The "OK" text simply indicate that the script finalized. This will not be consider info about the result of the SubScript itself. 50 | The "." indicate that the subscript is not a file. Is part of the main script. 51 | 52 | # Window for SubScripts 53 | 54 | ![image](https://user-images.githubusercontent.com/3720302/138958783-18310202-6516-4f98-9f8d-04f97e2942de.png) 55 | 56 | Note: On some windows subscripts may appear some errors/red text/etc. Don't worry, this is normal. 57 | 58 | # Note about Microsoft Store SubScript 59 | 60 | This script will install Microsoft Store and related software on the system, and is based on the 61 | script "LTSC-Add-MicrosoftStore" by kkkgo. 62 | https://github.com/kkkgo/LTSC-Add-MicrosoftStore 63 | 64 | My script simply download their package (https://github.com/lixuy/LTSC-Add-MicrosoftStore/archive/2019.zip) from 65 | their repository, unpack and copy on the main_script_folder\Extras, and process it (modify kkkgo script for remove pauses, and run it) 66 | 67 | ![image](https://user-images.githubusercontent.com/3720302/138957688-73f09a62-19f7-4852-8ea4-67346fb3bfbb.png) 68 | 69 | Take note that first time you run this script, most probablyl will need to download the file, so this may take few minutes because the tool for download from command line, maybe not fast as internet browser. 70 | 71 | If the download fails, simply download the file and unpack on the following path: 72 | DNXDOScript_path\Extras\MicrosoftStore\ 73 | 74 | 75 | # Windows Start Menu Entry 76 | 77 | The script adds a new Windows Start Menu entry, for launch again the script when you want. 78 | 79 | ![image](https://user-images.githubusercontent.com/3720302/138959091-751cf1b2-fa9d-4dba-b6b9-1681313820f4.png) 80 | 81 | 82 | # Note about virtual memory 83 | 84 | This script set the virtual memory of the device based on the installed RAM. 85 | Thinking on low powered devices, where usually don´t have so much RAM installed, is not the best to set a big ammount of virtual memory, because the system may get a downgrade in terms of performance (more virtual memory on low storage, then become the system slow and unresponsive), for this reason the script try to set a reasonable ammount of virtual memory depending on the RAM installed. 86 | 87 | There are some software or games that can´t run with low ram resources, such Yuzu, that need near to 4 or 5GB of virtual memory to run. If the case, then set manually the virual memory on the system, to allow these programs to run. 88 | 89 | 90 | # Whats new (starting from 2.1.8) 91 | 92 | - I convert the option "Create restore point" as a script. Starting from 2.1.8 this script is disabled. If you want to create a restore point, you must move from "Disabled" to "Enabled" Folder, and ensure that the name of the script will be at the top of the list (alphabetic ordered). This way, the script will launch before any other in the directory. 93 | 94 | Hope you found useful this script. 95 | 96 | Deen0X 97 | -------------------------------------------------------------------------------- /Scripts/Disabled/Z91_Install Microsoft Store.cmd: -------------------------------------------------------------------------------- 1 | rem @echo off 2 | cd /d "%~dp0" 3 | pushd "%~dp0" 4 | echo INSTALLING Microsoft Store 5 | powershell -ExecutionPolicy Unrestricted Start-Process powershell -Verb "runAs .\..\..\Extras\MicrosoftStore\Add-Store.cmd" 6 | -------------------------------------------------------------------------------- /Scripts/Enabled/001_Block Telemetry.ps1: -------------------------------------------------------------------------------- 1 | # Description: 2 | # This script blocks telemetry related domains via the hosts file and related 3 | # IPs via Windows Firewall. 4 | # 5 | # Please note that adding these domains may break certain software like iTunes 6 | # or Skype. As this issue is location dependent for some domains, they are not 7 | # commented by default. The domains known to cause issues marked accordingly. 8 | # Please see the related issue: 9 | # 10 | 11 | Import-Module -DisableNameChecking $PSScriptRoot\..\lib\New-FolderForced.psm1 12 | 13 | Write-Output "Disabling telemetry via Group Policies" 14 | New-FolderForced -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" 15 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" "AllowTelemetry" 0 16 | 17 | # Entries related to Akamai have been reported to cause issues with Widevine 18 | # DRM. 19 | 20 | Write-Output "Adding telemetry domains to hosts file" 21 | $hosts_file = "$env:systemroot\System32\drivers\etc\hosts" 22 | $domains = @( 23 | "184-86-53-99.deploy.static.akamaitechnologies.com" 24 | "a-0001.a-msedge.net" 25 | "a-0002.a-msedge.net" 26 | "a-0003.a-msedge.net" 27 | "a-0004.a-msedge.net" 28 | "a-0005.a-msedge.net" 29 | "a-0006.a-msedge.net" 30 | "a-0007.a-msedge.net" 31 | "a-0008.a-msedge.net" 32 | "a-0009.a-msedge.net" 33 | "a1621.g.akamai.net" 34 | "a1856.g2.akamai.net" 35 | "a1961.g.akamai.net" 36 | #"a248.e.akamai.net" # makes iTunes download button disappear (#43) 37 | "a978.i6g1.akamai.net" 38 | "a.ads1.msn.com" 39 | "a.ads2.msads.net" 40 | "a.ads2.msn.com" 41 | "ac3.msn.com" 42 | "ad.doubleclick.net" 43 | "adnexus.net" 44 | "adnxs.com" 45 | "ads1.msads.net" 46 | "ads1.msn.com" 47 | "ads.msn.com" 48 | "aidps.atdmt.com" 49 | "aka-cdn-ns.adtech.de" 50 | "a-msedge.net" 51 | "any.edge.bing.com" 52 | "a.rad.msn.com" 53 | "az361816.vo.msecnd.net" 54 | "az512334.vo.msecnd.net" 55 | "b.ads1.msn.com" 56 | "b.ads2.msads.net" 57 | "bingads.microsoft.com" 58 | "b.rad.msn.com" 59 | "bs.serving-sys.com" 60 | "c.atdmt.com" 61 | "cdn.atdmt.com" 62 | "cds26.ams9.msecn.net" 63 | "choice.microsoft.com" 64 | "choice.microsoft.com.nsatc.net" 65 | "compatexchange.cloudapp.net" 66 | "corpext.msitadfs.glbdns2.microsoft.com" 67 | "corp.sts.microsoft.com" 68 | "cs1.wpc.v0cdn.net" 69 | "db3aqu.atdmt.com" 70 | "df.telemetry.microsoft.com" 71 | "diagnostics.support.microsoft.com" 72 | "e2835.dspb.akamaiedge.net" 73 | "e7341.g.akamaiedge.net" 74 | "e7502.ce.akamaiedge.net" 75 | "e8218.ce.akamaiedge.net" 76 | "ec.atdmt.com" 77 | "fe2.update.microsoft.com.akadns.net" 78 | "feedback.microsoft-hohm.com" 79 | "feedback.search.microsoft.com" 80 | "feedback.windows.com" 81 | "flex.msn.com" 82 | "g.msn.com" 83 | "h1.msn.com" 84 | "h2.msn.com" 85 | "hostedocsp.globalsign.com" 86 | "i1.services.social.microsoft.com" 87 | "i1.services.social.microsoft.com.nsatc.net" 88 | #"ipv6.msftncsi.com" # Issues may arise where Windows 10 thinks it doesn't have internet 89 | #"ipv6.msftncsi.com.edgesuite.net" # Issues may arise where Windows 10 thinks it doesn't have internet 90 | "lb1.www.ms.akadns.net" 91 | "live.rads.msn.com" 92 | "m.adnxs.com" 93 | "msedge.net" 94 | #"msftncsi.com" 95 | "msnbot-65-55-108-23.search.msn.com" 96 | "msntest.serving-sys.com" 97 | "oca.telemetry.microsoft.com" 98 | "oca.telemetry.microsoft.com.nsatc.net" 99 | "onesettings-db5.metron.live.nsatc.net" 100 | "pre.footprintpredict.com" 101 | "preview.msn.com" 102 | "rad.live.com" 103 | "rad.msn.com" 104 | "redir.metaservices.microsoft.com" 105 | "reports.wes.df.telemetry.microsoft.com" 106 | "schemas.microsoft.akadns.net" 107 | "secure.adnxs.com" 108 | "secure.flashtalking.com" 109 | "services.wes.df.telemetry.microsoft.com" 110 | "settings-sandbox.data.microsoft.com" 111 | #"settings-win.data.microsoft.com" # may cause issues with Windows Updates 112 | "sls.update.microsoft.com.akadns.net" 113 | #"sls.update.microsoft.com.nsatc.net" # may cause issues with Windows Updates 114 | "sqm.df.telemetry.microsoft.com" 115 | "sqm.telemetry.microsoft.com" 116 | "sqm.telemetry.microsoft.com.nsatc.net" 117 | "ssw.live.com" 118 | "static.2mdn.net" 119 | "statsfe1.ws.microsoft.com" 120 | "statsfe2.update.microsoft.com.akadns.net" 121 | "statsfe2.ws.microsoft.com" 122 | "survey.watson.microsoft.com" 123 | "telecommand.telemetry.microsoft.com" 124 | "telecommand.telemetry.microsoft.com.nsatc.net" 125 | "telemetry.appex.bing.net" 126 | "telemetry.microsoft.com" 127 | "telemetry.urs.microsoft.com" 128 | "vortex-bn2.metron.live.com.nsatc.net" 129 | "vortex-cy2.metron.live.com.nsatc.net" 130 | "vortex.data.microsoft.com" 131 | "vortex-sandbox.data.microsoft.com" 132 | "vortex-win.data.microsoft.com" 133 | "cy2.vortex.data.microsoft.com.akadns.net" 134 | "watson.live.com" 135 | "watson.microsoft.com" 136 | "watson.ppe.telemetry.microsoft.com" 137 | "watson.telemetry.microsoft.com" 138 | "watson.telemetry.microsoft.com.nsatc.net" 139 | "wes.df.telemetry.microsoft.com" 140 | "win10.ipv6.microsoft.com" 141 | "www.bingads.microsoft.com" 142 | "www.go.microsoft.akadns.net" 143 | #"www.msftncsi.com" # Issues may arise where Windows 10 thinks it doesn't have internet 144 | "client.wns.windows.com" 145 | #"wdcp.microsoft.com" # may cause issues with Windows Defender Cloud-based protection 146 | #"dns.msftncsi.com" # This causes Windows to think it doesn't have internet 147 | #"storeedgefd.dsx.mp.microsoft.com" # breaks Windows Store 148 | "wdcpalt.microsoft.com" 149 | "settings-ssl.xboxlive.com" 150 | "settings-ssl.xboxlive.com-c.edgekey.net" 151 | "settings-ssl.xboxlive.com-c.edgekey.net.globalredir.akadns.net" 152 | "e87.dspb.akamaidege.net" 153 | "insiderservice.microsoft.com" 154 | "insiderservice.trafficmanager.net" 155 | "e3843.g.akamaiedge.net" 156 | "flightingserviceweurope.cloudapp.net" 157 | #"sls.update.microsoft.com" # may cause issues with Windows Updates 158 | "static.ads-twitter.com" # may cause issues with Twitter login 159 | "www-google-analytics.l.google.com" 160 | "p.static.ads-twitter.com" # may cause issues with Twitter login 161 | "hubspot.net.edge.net" 162 | "e9483.a.akamaiedge.net" 163 | 164 | #"www.google-analytics.com" 165 | #"padgead2.googlesyndication.com" 166 | #"mirror1.malwaredomains.com" 167 | #"mirror.cedia.org.ec" 168 | "stats.g.doubleclick.net" 169 | "stats.l.doubleclick.net" 170 | "adservice.google.de" 171 | "adservice.google.com" 172 | "googleads.g.doubleclick.net" 173 | "pagead46.l.doubleclick.net" 174 | "hubspot.net.edgekey.net" 175 | "insiderppe.cloudapp.net" # Feedback-Hub 176 | "livetileedge.dsx.mp.microsoft.com" 177 | 178 | # extra 179 | "fe2.update.microsoft.com.akadns.net" 180 | "s0.2mdn.net" 181 | "statsfe2.update.microsoft.com.akadns.net" 182 | "survey.watson.microsoft.com" 183 | "view.atdmt.com" 184 | "watson.microsoft.com" 185 | "watson.ppe.telemetry.microsoft.com" 186 | "watson.telemetry.microsoft.com" 187 | "watson.telemetry.microsoft.com.nsatc.net" 188 | "wes.df.telemetry.microsoft.com" 189 | "m.hotmail.com" 190 | 191 | # can cause issues with Skype (#79) or other services (#171) 192 | "apps.skype.com" 193 | "c.msn.com" 194 | # "login.live.com" # prevents login to outlook and other live apps 195 | "pricelist.skype.com" 196 | "s.gateway.messenger.live.com" 197 | "ui.skype.com" 198 | ) 199 | Write-Output "" | Out-File -Encoding ASCII -Append $hosts_file 200 | foreach ($domain in $domains) { 201 | if (-Not (Select-String -Path $hosts_file -Pattern $domain)) { 202 | Write-Output "0.0.0.0 $domain" | Out-File -Encoding ASCII -Append $hosts_file 203 | } 204 | } 205 | 206 | Write-Output "Adding telemetry ips to firewall" 207 | $ips = @( 208 | # Windows telemetry 209 | "134.170.30.202" 210 | "137.116.81.24" 211 | "157.56.106.189" 212 | "184.86.53.99" 213 | "2.22.61.43" 214 | "2.22.61.66" 215 | "204.79.197.200" 216 | "23.218.212.69" 217 | "65.39.117.230" 218 | "65.52.108.33" # Causes problems with Microsoft Store 219 | "65.55.108.23" 220 | "64.4.54.254" 221 | 222 | # NVIDIA telemetry 223 | "8.36.80.197" 224 | "8.36.80.224" 225 | "8.36.80.252" 226 | "8.36.113.118" 227 | "8.36.113.141" 228 | "8.36.80.230" 229 | "8.36.80.231" 230 | "8.36.113.126" 231 | "8.36.80.195" 232 | "8.36.80.217" 233 | "8.36.80.237" 234 | "8.36.80.246" 235 | "8.36.113.116" 236 | "8.36.113.139" 237 | "8.36.80.244" 238 | "216.228.121.209" 239 | ) 240 | Remove-NetFirewallRule -DisplayName "Block Telemetry IPs" -ErrorAction SilentlyContinue 241 | New-NetFirewallRule -DisplayName "Block Telemetry IPs" -Direction Outbound ` 242 | -Action Block -RemoteAddress ([string[]]$ips) 243 | -------------------------------------------------------------------------------- /Scripts/Enabled/002_Disable Services.ps1: -------------------------------------------------------------------------------- 1 | # Description: 2 | # This script disables unwanted Windows services. If you do not want to disable 3 | # certain services comment out the corresponding lines below. 4 | 5 | $services = @( 6 | "diagnosticshub.standardcollector.service" # Microsoft (R) Diagnostics Hub Standard Collector Service 7 | "DiagTrack" # Diagnostics Tracking Service 8 | "dmwappushservice" # WAP Push Message Routing Service (see known issues) 9 | "lfsvc" # Geolocation Service 10 | "MapsBroker" # Downloaded Maps Manager 11 | "NetTcpPortSharing" # Net.Tcp Port Sharing Service 12 | "RemoteAccess" # Routing and Remote Access 13 | "RemoteRegistry" # Remote Registry 14 | "SharedAccess" # Internet Connection Sharing (ICS) 15 | "TrkWks" # Distributed Link Tracking Client 16 | "WbioSrvc" # Windows Biometric Service (required for Fingerprint reader / facial detection) 17 | #"WlanSvc" # WLAN AutoConfig 18 | "WMPNetworkSvc" # Windows Media Player Network Sharing Service 19 | #"wscsvc" # Windows Security Center Service 20 | #"WSearch" # Windows Search 21 | "XblAuthManager" # Xbox Live Auth Manager 22 | "XblGameSave" # Xbox Live Game Save Service 23 | "XboxNetApiSvc" # Xbox Live Networking Service 24 | "ndu" # Windows Network Data Usage Monitor 25 | # Services which cannot be disabled 26 | #"WdNisSvc" 27 | ) 28 | 29 | foreach ($service in $services) { 30 | Write-Output "Trying to disable $service" 31 | Get-Service -Name $service | Set-Service -StartupType Disabled 32 | } 33 | -------------------------------------------------------------------------------- /Scripts/Enabled/003_Disable Windows Defender.ps1: -------------------------------------------------------------------------------- 1 | # Description: 2 | # This script disables Windows Defender. Run it once (will throw errors), then 3 | # reboot, run it again (this time no errors should occur) followed by another 4 | # reboot. 5 | 6 | Import-Module -DisableNameChecking $PSScriptRoot\..\lib\New-FolderForced.psm1 7 | Import-Module -DisableNameChecking $PSScriptRoot\..\lib\take-own.psm1 8 | 9 | Write-Output "Elevating priviledges for this process" 10 | do {} until (Elevate-Privileges SeTakeOwnershipPrivilege) 11 | 12 | $tasks = @( 13 | "\Microsoft\Windows\Windows Defender\Windows Defender Cache Maintenance" 14 | "\Microsoft\Windows\Windows Defender\Windows Defender Cleanup" 15 | "\Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan" 16 | "\Microsoft\Windows\Windows Defender\Windows Defender Verification" 17 | ) 18 | 19 | foreach ($task in $tasks) { 20 | $parts = $task.split('\') 21 | $name = $parts[-1] 22 | $path = $parts[0..($parts.length-2)] -join '\' 23 | 24 | Write-Output "Trying to disable scheduled task $name" 25 | Disable-ScheduledTask -TaskName "$name" -TaskPath "$path" 26 | } 27 | 28 | Write-Output "Disabling Windows Defender via Group Policies" 29 | New-FolderForced -Path "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows Defender" 30 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows Defender" "DisableAntiSpyware" 1 31 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows Defender" "DisableRoutinelyTakingAction" 1 32 | New-FolderForced -Path "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows Defender\Real-Time Protection" 33 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows Defender\Real-Time Protection" "DisableRealtimeMonitoring" 1 34 | 35 | Write-Output "Disabling Windows Defender Services" 36 | Takeown-Registry("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinDefend") 37 | Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WinDefend" "Start" 4 38 | Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WinDefend" "AutorunsDisabled" 3 39 | Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WdNisSvc" "Start" 4 40 | Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WdNisSvc" "AutorunsDisabled" 3 41 | Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Sense" "Start" 4 42 | Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Sense" "AutorunsDisabled" 3 43 | 44 | Write-Output "Removing Windows Defender context menu item" 45 | Set-Item "HKLM:\SOFTWARE\Classes\CLSID\{09A47860-11B0-4DA5-AFA5-26D86198A780}\InprocServer32" "" 46 | 47 | Write-Output "Removing Windows Defender GUI / tray from autorun" 48 | Remove-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "WindowsDefender" -ea 0 49 | -------------------------------------------------------------------------------- /Scripts/Enabled/004_Experimental Unfuckery.ps1: -------------------------------------------------------------------------------- 1 | # Description: 2 | # This script remove strang looking stuff which will probably result in a break 3 | # of your system. It should not be used unless you want to test out a few 4 | # things. It is named `experimental_unfuckery.ps1` for a reason. 5 | 6 | Import-Module -DisableNameChecking $PSScriptRoot\..\lib\take-own.psm1 7 | 8 | Write-Output "Elevating priviledges for this process" 9 | do {} until (Elevate-Privileges SeTakeOwnershipPrivilege) 10 | 11 | Write-Output "Force removing system apps" 12 | $needles = @( 13 | #"Anytime" 14 | "BioEnrollment" 15 | #"Browser" 16 | "ContactSupport" 17 | #"Cortana" # This will disable startmenu search. 18 | #"Defender" 19 | "Feedback" 20 | "Flash" 21 | "Gaming" 22 | #"Holo" 23 | #"InternetExplorer" 24 | #"Maps" 25 | #"MiracastView" 26 | "OneDrive" 27 | #"SecHealthUI" 28 | #"Wallet" 29 | #"Xbox" # This will result in a bootloop since upgrade 1511 30 | ) 31 | 32 | foreach ($needle in $needles) { 33 | Write-Output "Trying to remove all packages containing $needle" 34 | 35 | $pkgs = (Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" | 36 | Where-Object Name -Like "*$needle*") 37 | 38 | foreach ($pkg in $pkgs) { 39 | $pkgname = $pkg.Name.split('\')[-1] 40 | 41 | Takeown-Registry($pkg.Name) 42 | Takeown-Registry($pkg.Name + "\Owners") 43 | 44 | Set-ItemProperty -Path ("HKLM:" + $pkg.Name.Substring(18)) -Name Visibility -Value 1 45 | New-ItemProperty -Path ("HKLM:" + $pkg.Name.Substring(18)) -Name DefVis -PropertyType DWord -Value 2 46 | Remove-Item -Path ("HKLM:" + $pkg.Name.Substring(18) + "\Owners") 47 | 48 | dism.exe /Online /Remove-Package /PackageName:$pkgname /NoRestart 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Scripts/Enabled/005_Fix Privacy Settings.ps1: -------------------------------------------------------------------------------- 1 | # Description: 2 | # This script will try to fix many of the privacy settings for the user. This 3 | # is work in progress! 4 | 5 | Import-Module -DisableNameChecking $PSScriptRoot\..\lib\New-FolderForced.psm1 6 | Import-Module -DisableNameChecking $PSScriptRoot\..\lib\take-own.psm1 7 | 8 | Write-Output "Elevating priviledges for this process" 9 | do {} until (Elevate-Privileges SeTakeOwnershipPrivilege) 10 | 11 | Write-Output "Defuse Windows search settings" 12 | Set-WindowsSearchSetting -EnableWebResultsSetting $false 13 | 14 | Write-Output "Set general privacy options" 15 | # "Let websites provide locally relevant content by accessing my language list" 16 | Set-ItemProperty -Path "HKCU:\Control Panel\International\User Profile" "HttpAcceptLanguageOptOut" 1 17 | # Locaton aware printing (changes default based on connected network) 18 | New-FolderForced -Path "HKCU:\Printers\Defaults" 19 | Set-ItemProperty -Path "HKCU:\Printers\Defaults" "NetID" "{00000000-0000-0000-0000-000000000000}" 20 | # "Send Microsoft info about how I write to help us improve typing and writing in the future" 21 | New-FolderForced -Path "HKCU:\SOFTWARE\Microsoft\Input\TIPC" 22 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Input\TIPC" "Enabled" 0 23 | # "Let apps use my advertising ID for experiencess across apps" 24 | New-FolderForced -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" 25 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" "Enabled" 0 26 | # "Turn on SmartScreen Filter to check web content" 27 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost" "EnableWebContentEvaluation" 0 28 | 29 | Write-Output "Disable synchronisation of settings" 30 | # These only apply if you log on using Microsoft account 31 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync" "BackupPolicy" 0x3c 32 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync" "DeviceMetadataUploaded" 0 33 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync" "PriorLogons" 1 34 | $groups = @( 35 | "Accessibility" 36 | "AppSync" 37 | "BrowserSettings" 38 | "Credentials" 39 | "DesktopTheme" 40 | "Language" 41 | "PackageState" 42 | "Personalization" 43 | "StartLayout" 44 | "Windows" 45 | ) 46 | foreach ($group in $groups) { 47 | New-FolderForced -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\$group" 48 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\$group" "Enabled" 0 49 | } 50 | 51 | Write-Output "Set privacy policy accepted state to 0" 52 | # Prevents sending speech, inking and typing samples to MS (so Cortana 53 | # can learn to recognise you) 54 | New-FolderForced -Path "HKCU:\SOFTWARE\Microsoft\Personalization\Settings" 55 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Personalization\Settings" "AcceptedPrivacyPolicy" 0 56 | 57 | Write-Output "Do not scan contact informations" 58 | # Prevents sending contacts to MS (so Cortana can compare speech etc samples) 59 | New-FolderForced -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore" 60 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore" "HarvestContacts" 0 61 | 62 | Write-Output "Inking and typing settings" 63 | # Handwriting recognition personalization 64 | New-FolderForced -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization" 65 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization" "RestrictImplicitInkCollection" 1 66 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization" "RestrictImplicitTextCollection" 1 67 | 68 | Write-Output "Microsoft Edge settings" 69 | New-FolderForced -Path "HKCU:\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\Main" 70 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\Main" "DoNotTrack" 1 71 | New-FolderForced -Path "HKCU:\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\User\Default\SearchScopes" 72 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\User\Default\SearchScopes" "ShowSearchSuggestionsGlobal" 0 73 | New-FolderForced -Path "HKCU:\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\FlipAhead" 74 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\FlipAhead" "FPEnabled" 0 75 | New-FolderForced -Path "HKCU:\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\PhishingFilter" 76 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\PhishingFilter" "EnabledV9" 0 77 | 78 | Write-Output "Disable background access of default apps" 79 | foreach ($key in (Get-ChildItem "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications")) { 80 | Set-ItemProperty -Path ("HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\" + $key.PSChildName) "Disabled" 1 81 | } 82 | 83 | Write-Output "Denying device access" 84 | # Disable sharing information with unpaired devices 85 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\LooselyCoupled" "Type" "LooselyCoupled" 86 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\LooselyCoupled" "Value" "Deny" 87 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\LooselyCoupled" "InitialAppValue" "Unspecified" 88 | foreach ($key in (Get-ChildItem "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global")) { 89 | if ($key.PSChildName -EQ "LooselyCoupled") { 90 | continue 91 | } 92 | Set-ItemProperty -Path ("HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\" + $key.PSChildName) "Type" "InterfaceClass" 93 | Set-ItemProperty -Path ("HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\" + $key.PSChildName) "Value" "Deny" 94 | Set-ItemProperty -Path ("HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\" + $key.PSChildName) "InitialAppValue" "Unspecified" 95 | } 96 | 97 | Write-Output "Disable location sensor" 98 | New-FolderForced -Path "HKCU:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Permissions\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" 99 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Permissions\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" "SensorPermissionState" 0 100 | 101 | Write-Output "Disable submission of Windows Defender findings (w/ elevated privileges)" 102 | Takeown-Registry("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Spynet") 103 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows Defender\Spynet" "SpyNetReporting" 0 # write-protected even after takeown ?! 104 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows Defender\Spynet" "SubmitSamplesConsent" 0 105 | 106 | # The following section can cause problems with network / internet connectivity 107 | # in generel. See the corresponding issue: 108 | # https://github.com/W4RH4WK/Debloat-Windows-10/issues/270 109 | #Write-Output "Do not share wifi networks" 110 | #$user = New-Object System.Security.Principal.NTAccount($env:UserName) 111 | #$sid = $user.Translate([System.Security.Principal.SecurityIdentifier]).value 112 | #New-FolderForced -Path ("HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features\" + $sid) 113 | #Set-ItemProperty -Path ("HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features\" + $sid) "FeatureStates" 0x33c 114 | #Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" "WiFiSenseCredShared" 0 115 | #Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" "WiFiSenseOpen" 0 116 | -------------------------------------------------------------------------------- /Scripts/Enabled/006_Optimize User Interface.ps1: -------------------------------------------------------------------------------- 1 | # Description 2 | # This script will apply MarkC's mouse acceleration fix (for 100% DPI) and 3 | # disable some accessibility features regarding keyboard input. Additional 4 | # some UI elements will be changed. 5 | 6 | Import-Module -DisableNameChecking $PSScriptRoot\..\lib\New-FolderForced.psm1 7 | Import-Module -DisableNameChecking $PSScriptRoot\..\lib\take-own.psm1 8 | 9 | Write-Output "Elevating priviledges for this process" 10 | do {} until (Elevate-Privileges SeTakeOwnershipPrivilege) 11 | 12 | Write-Output "Apply MarkC's mouse acceleration fix" 13 | Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" "MouseSensitivity" "10" 14 | Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" "MouseSpeed" "0" 15 | Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" "MouseThreshold1" "0" 16 | Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" "MouseThreshold2" "0" 17 | Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" "SmoothMouseXCurve" ([byte[]](0x00, 0x00, 0x00, 18 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xCC, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 19 | 0x80, 0x99, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x26, 0x00, 0x00, 20 | 0x00, 0x00, 0x00, 0x00, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00)) 21 | Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" "SmoothMouseYCurve" ([byte[]](0x00, 0x00, 0x00, 22 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 23 | 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA8, 0x00, 0x00, 24 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00)) 25 | 26 | Write-Output "Disable mouse pointer hiding" 27 | Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" "UserPreferencesMask" ([byte[]](0x9e, 28 | 0x1e, 0x06, 0x80, 0x12, 0x00, 0x00, 0x00)) 29 | 30 | Write-Output "Disable Game DVR and Game Bar" 31 | New-FolderForced -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" 32 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" "AllowgameDVR" 0 33 | 34 | Write-Output "Disable easy access keyboard stuff" 35 | Set-ItemProperty -Path "HKCU:\Control Panel\Accessibility\StickyKeys" "Flags" "506" 36 | Set-ItemProperty -Path "HKCU:\Control Panel\Accessibility\Keyboard Response" "Flags" "122" 37 | Set-ItemProperty -Path "HKCU:\Control Panel\Accessibility\ToggleKeys" "Flags" "58" 38 | 39 | Write-Output "Disable Edge desktop shortcut on new profiles" 40 | New-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Explorer" -Name DisableEdgeDesktopShortcutCreation -PropertyType DWORD -Value 1 41 | 42 | Write-Output "Restoring old volume slider" 43 | New-FolderForced -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\MTCUVC" 44 | Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\MTCUVC" "EnableMtcUvc" 0 45 | 46 | Write-Output "Setting folder view options" 47 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "Hidden" 1 48 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "HideFileExt" 0 49 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "HideDrivesWithNoMedia" 0 50 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "ShowSyncProviderNotifications" 0 51 | 52 | Write-Output "Disable Aero-Shake Minimize feature" 53 | Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "DisallowShaking" 1 54 | 55 | Write-Output "Setting default explorer view to This PC" 56 | Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "LaunchTo" 1 57 | 58 | Write-Output "Removing user folders under This PC" 59 | # Remove Desktop from This PC 60 | Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}" 61 | Remove-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}" 62 | # Remove Documents from This PC 63 | Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}" 64 | Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}" 65 | Remove-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}" 66 | Remove-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}" 67 | # Remove Downloads from This PC 68 | Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B}" 69 | Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}" 70 | Remove-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B}" 71 | Remove-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}" 72 | # Remove Music from This PC 73 | Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE}" 74 | Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}" 75 | Remove-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE}" 76 | Remove-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}" 77 | # Remove Pictures from This PC 78 | Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA}" 79 | Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}" 80 | Remove-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA}" 81 | Remove-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}" 82 | # Remove Videos from This PC 83 | Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C}" 84 | Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}" 85 | Remove-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C}" 86 | Remove-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}" 87 | # Remove 3D Objects from This PC 88 | Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}" 89 | Remove-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}" 90 | 91 | #echo "Disabling tile push notification" 92 | #New-FolderForced -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" 93 | #sp "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" "NoTileApplicationNotification" 1 94 | -------------------------------------------------------------------------------- /Scripts/Enabled/007_Optimize Windows Update.ps1: -------------------------------------------------------------------------------- 1 | # Description: 2 | # This script optimizes Windows updates by disabling automatic download and 3 | # seeding updates to other computers. 4 | # 5 | Import-Module -DisableNameChecking $PSScriptRoot\..\lib\New-FolderForced.psm1 6 | 7 | Write-Output "Disable automatic download and installation of Windows updates" 8 | New-FolderForced -Path "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU" 9 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU" "NoAutoUpdate" 1 10 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU" "AUOptions" 2 11 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU" "ScheduledInstallDay" 0 12 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU" "ScheduledInstallTime" 3 13 | 14 | Write-Output "Disable seeding of updates to other computers via Group Policies" 15 | New-FolderForced -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" 16 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" "DODownloadMode" 0 17 | 18 | #echo "Disabling automatic driver update" 19 | #sp "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" "SearchOrderConfig" 0 20 | 21 | $objSID = New-Object System.Security.Principal.SecurityIdentifier "S-1-1-0" 22 | $EveryOne = $objSID.Translate( [System.Security.Principal.NTAccount]).Value 23 | 24 | 25 | Write-Output "Disable 'Updates are available' message" 26 | 27 | takeown /F "$env:WinDIR\System32\MusNotification.exe" 28 | icacls "$env:WinDIR\System32\MusNotification.exe" /deny "$($EveryOne):(X)" 29 | takeown /F "$env:WinDIR\System32\MusNotificationUx.exe" 30 | icacls "$env:WinDIR\System32\MusNotificationUx.exe" /deny "$($EveryOne):(X)" 31 | -------------------------------------------------------------------------------- /Scripts/Enabled/008_Remove Default Apps.ps1: -------------------------------------------------------------------------------- 1 | # Description: 2 | # This script removes unwanted Apps that come with Windows. If you do not want 3 | # to remove certain Apps comment out the corresponding lines below. 4 | 5 | Import-Module -DisableNameChecking $PSScriptRoot\..\lib\take-own.psm1 6 | Import-Module -DisableNameChecking $PSScriptRoot\..\lib\New-FolderForced.psm1 7 | 8 | Write-Output "Elevating privileges for this process" 9 | do {} until (Elevate-Privileges SeTakeOwnershipPrivilege) 10 | 11 | Write-Output "Uninstalling default apps" 12 | $apps = @( 13 | # default Windows 10 apps 14 | "Microsoft.549981C3F5F10" #Cortana 15 | "Microsoft.3DBuilder" 16 | "Microsoft.Appconnector" 17 | "Microsoft.BingFinance" 18 | "Microsoft.BingNews" 19 | "Microsoft.BingSports" 20 | "Microsoft.BingTranslator" 21 | "Microsoft.BingWeather" 22 | #"Microsoft.FreshPaint" 23 | "Microsoft.GamingServices" 24 | "Microsoft.Microsoft3DViewer" 25 | "Microsoft.MicrosoftOfficeHub" 26 | "Microsoft.MicrosoftPowerBIForWindows" 27 | "Microsoft.MicrosoftSolitaireCollection" 28 | #"Microsoft.MicrosoftStickyNotes" 29 | "Microsoft.MinecraftUWP" 30 | "Microsoft.NetworkSpeedTest" 31 | "Microsoft.Office.OneNote" 32 | "Microsoft.People" 33 | "Microsoft.Print3D" 34 | "Microsoft.SkypeApp" 35 | "Microsoft.Wallet" 36 | #"Microsoft.Windows.Photos" 37 | "Microsoft.WindowsAlarms" 38 | #"Microsoft.WindowsCalculator" 39 | "Microsoft.WindowsCamera" 40 | "microsoft.windowscommunicationsapps" 41 | "Microsoft.WindowsMaps" 42 | "Microsoft.WindowsPhone" 43 | "Microsoft.WindowsSoundRecorder" 44 | #"Microsoft.WindowsStore" # can't be re-installed 45 | "Microsoft.Xbox.TCUI" 46 | "Microsoft.XboxApp" 47 | "Microsoft.XboxGameOverlay" 48 | "Microsoft.XboxGamingOverlay" 49 | "Microsoft.XboxSpeechToTextOverlay" 50 | "Microsoft.YourPhone" 51 | "Microsoft.ZuneMusic" 52 | "Microsoft.ZuneVideo" 53 | 54 | # Threshold 2 apps 55 | "Microsoft.CommsPhone" 56 | "Microsoft.ConnectivityStore" 57 | "Microsoft.GetHelp" 58 | "Microsoft.Getstarted" 59 | "Microsoft.Messaging" 60 | "Microsoft.Office.Sway" 61 | "Microsoft.OneConnect" 62 | "Microsoft.WindowsFeedbackHub" 63 | 64 | # Creators Update apps 65 | "Microsoft.Microsoft3DViewer" 66 | #"Microsoft.MSPaint" 67 | 68 | #Redstone apps 69 | "Microsoft.BingFoodAndDrink" 70 | "Microsoft.BingHealthAndFitness" 71 | "Microsoft.BingTravel" 72 | "Microsoft.WindowsReadingList" 73 | 74 | # Redstone 5 apps 75 | "Microsoft.MixedReality.Portal" 76 | "Microsoft.ScreenSketch" 77 | "Microsoft.XboxGamingOverlay" 78 | 79 | # non-Microsoft 80 | "2FE3CB00.PicsArt-PhotoStudio" 81 | "46928bounde.EclipseManager" 82 | "4DF9E0F8.Netflix" 83 | "613EBCEA.PolarrPhotoEditorAcademicEdition" 84 | "6Wunderkinder.Wunderlist" 85 | "7EE7776C.LinkedInforWindows" 86 | "89006A2E.AutodeskSketchBook" 87 | "9E2F88E3.Twitter" 88 | "A278AB0D.DisneyMagicKingdoms" 89 | "A278AB0D.MarchofEmpires" 90 | "ActiproSoftwareLLC.562882FEEB491" # next one is for the Code Writer from Actipro Software LLC 91 | "CAF9E577.Plex" 92 | "ClearChannelRadioDigital.iHeartRadio" 93 | "D52A8D61.FarmVille2CountryEscape" 94 | "D5EA27B7.Duolingo-LearnLanguagesforFree" 95 | "DB6EA5DB.CyberLinkMediaSuiteEssentials" 96 | "DolbyLaboratories.DolbyAccess" 97 | "DolbyLaboratories.DolbyAccess" 98 | "Drawboard.DrawboardPDF" 99 | "Facebook.Facebook" 100 | "Fitbit.FitbitCoach" 101 | "Flipboard.Flipboard" 102 | "GAMELOFTSA.Asphalt8Airborne" 103 | "KeeperSecurityInc.Keeper" 104 | "NORDCURRENT.COOKINGFEVER" 105 | "PandoraMediaInc.29680B314EFC2" 106 | "Playtika.CaesarsSlotsFreeCasino" 107 | "ShazamEntertainmentLtd.Shazam" 108 | "SlingTVLLC.SlingTV" 109 | "SpotifyAB.SpotifyMusic" 110 | #"TheNewYorkTimes.NYTCrossword" 111 | "ThumbmunkeysLtd.PhototasticCollage" 112 | "TuneIn.TuneInRadio" 113 | "WinZipComputing.WinZipUniversal" 114 | "XINGAG.XING" 115 | "flaregamesGmbH.RoyalRevolt2" 116 | "king.com.*" 117 | "king.com.BubbleWitch3Saga" 118 | "king.com.CandyCrushSaga" 119 | "king.com.CandyCrushSodaSaga" 120 | 121 | # apps which cannot be removed using Remove-AppxPackage 122 | #"Microsoft.BioEnrollment" 123 | #"Microsoft.MicrosoftEdge" 124 | #"Microsoft.Windows.Cortana" 125 | #"Microsoft.WindowsFeedback" 126 | #"Microsoft.XboxGameCallableUI" 127 | #"Microsoft.XboxIdentityProvider" 128 | #"Windows.ContactSupport" 129 | 130 | # apps which other apps depend on 131 | "Microsoft.Advertising.Xaml" 132 | ) 133 | 134 | $appxprovisionedpackage = Get-AppxProvisionedPackage -Online 135 | 136 | foreach ($app in $apps) { 137 | Write-Output "Trying to remove $app" 138 | 139 | Get-AppxPackage -Name $app -AllUsers | Remove-AppxPackage -AllUsers 140 | 141 | ($appxprovisionedpackage).Where( {$_.DisplayName -EQ $app}) | 142 | Remove-AppxProvisionedPackage -Online 143 | } 144 | 145 | # Prevents Apps from re-installing 146 | $cdm = @( 147 | "ContentDeliveryAllowed" 148 | "FeatureManagementEnabled" 149 | "OemPreInstalledAppsEnabled" 150 | "PreInstalledAppsEnabled" 151 | "PreInstalledAppsEverEnabled" 152 | "SilentInstalledAppsEnabled" 153 | "SubscribedContent-314559Enabled" 154 | "SubscribedContent-338387Enabled" 155 | "SubscribedContent-338388Enabled" 156 | "SubscribedContent-338389Enabled" 157 | "SubscribedContent-338393Enabled" 158 | "SubscribedContentEnabled" 159 | "SystemPaneSuggestionsEnabled" 160 | ) 161 | 162 | New-FolderForced -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" 163 | foreach ($key in $cdm) { 164 | Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" $key 0 165 | } 166 | 167 | New-FolderForced -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore" 168 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore" "AutoDownload" 2 169 | 170 | # Prevents "Suggested Applications" returning 171 | New-FolderForced -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" 172 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" "DisableWindowsConsumerFeatures" 1 173 | -------------------------------------------------------------------------------- /Scripts/Enabled/009_Remove Onedrive.ps1: -------------------------------------------------------------------------------- 1 | # Description: 2 | # This script will remove and disable OneDrive integration. 3 | 4 | Import-Module -DisableNameChecking $PSScriptRoot\..\lib\New-FolderForced.psm1 5 | Import-Module -DisableNameChecking $PSScriptRoot\..\lib\take-own.psm1 6 | 7 | Write-Output "Kill OneDrive process" 8 | taskkill.exe /F /IM "OneDrive.exe" 9 | taskkill.exe /F /IM "explorer.exe" 10 | 11 | Write-Output "Remove OneDrive" 12 | if (Test-Path "$env:systemroot\System32\OneDriveSetup.exe") { 13 | & "$env:systemroot\System32\OneDriveSetup.exe" /uninstall 14 | } 15 | if (Test-Path "$env:systemroot\SysWOW64\OneDriveSetup.exe") { 16 | & "$env:systemroot\SysWOW64\OneDriveSetup.exe" /uninstall 17 | } 18 | 19 | Write-Output "Removing OneDrive leftovers" 20 | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:localappdata\Microsoft\OneDrive" 21 | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:programdata\Microsoft OneDrive" 22 | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:systemdrive\OneDriveTemp" 23 | # check if directory is empty before removing: 24 | If ((Get-ChildItem "$env:userprofile\OneDrive" -Recurse | Measure-Object).Count -eq 0) { 25 | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:userprofile\OneDrive" 26 | } 27 | 28 | Write-Output "Disable OneDrive via Group Policies" 29 | New-FolderForced -Path "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\OneDrive" 30 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\OneDrive" "DisableFileSyncNGSC" 1 31 | 32 | Write-Output "Remove Onedrive from explorer sidebar" 33 | New-PSDrive -PSProvider "Registry" -Root "HKEY_CLASSES_ROOT" -Name "HKCR" 34 | mkdir -Force "HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" 35 | Set-ItemProperty -Path "HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" "System.IsPinnedToNameSpaceTree" 0 36 | mkdir -Force "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" 37 | Set-ItemProperty -Path "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" "System.IsPinnedToNameSpaceTree" 0 38 | Remove-PSDrive "HKCR" 39 | 40 | # Thank you Matthew Israelsson 41 | Write-Output "Removing run hook for new users" 42 | reg load "hku\Default" "C:\Users\Default\NTUSER.DAT" 43 | reg delete "HKEY_USERS\Default\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "OneDriveSetup" /f 44 | reg unload "hku\Default" 45 | 46 | Write-Output "Removing startmenu entry" 47 | Remove-Item -Force -ErrorAction SilentlyContinue "$env:userprofile\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk" 48 | 49 | Write-Output "Removing scheduled task" 50 | Get-ScheduledTask -TaskPath '\' -TaskName 'OneDrive*' -ea SilentlyContinue | Unregister-ScheduledTask -Confirm:$false 51 | 52 | Write-Output "Restarting explorer" 53 | Start-Process "explorer.exe" 54 | 55 | Write-Output "Waiting for explorer to complete loading" 56 | Start-Sleep 10 57 | 58 | Write-Output "Removing additional OneDrive leftovers" 59 | foreach ($item in (Get-ChildItem "$env:WinDir\WinSxS\*onedrive*")) { 60 | Takeown-Folder $item.FullName 61 | Remove-Item -Recurse -Force $item.FullName 62 | } 63 | -------------------------------------------------------------------------------- /Scripts/Enabled/Disable Background Applications.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | Echo Set up Disable background applications 3 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications /v GlobalUserDisabled /t REG_DWORD /d 1 /f 4 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications /v Migrated /t REG_DWORD /d 4 /f 5 | -------------------------------------------------------------------------------- /Scripts/Enabled/Disable Fax Services.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Fax Services 3 | DISM /online /disable-feature /featurename:FaxServicesClientPackage /NoRestart 4 | -------------------------------------------------------------------------------- /Scripts/Enabled/Disable Internet Printing Services.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Internet Printing Services 3 | DISM /online /disable-feature /featurename:Printing-Foundation-InternetPrinting-Client /NoRestart 4 | -------------------------------------------------------------------------------- /Scripts/Enabled/Disable Microsoft Internet Explorer 11.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Microsoft Internet Explorer 11 (install another option such Chrome, Firefox, Opera, etc) 3 | DISM /online /disable-feature /featurename:Internet-Explorer-Optional-amd64 /NoRestart 4 | -------------------------------------------------------------------------------- /Scripts/Enabled/Disable Powershell v2.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Windows PowerShell V2 (Security Risk. you can enable again from Windows 10 features). Windows 10 come with PowerShell V5 or above 3 | DISM /online /disable-feature /featurename:MicrosoftWindowsPowerShellV2Root /NoRestart 4 | DISM /online /disable-feature /featurename:MicrosoftWindowsPowerShellV2 /NoRestart 5 | -------------------------------------------------------------------------------- /Scripts/Enabled/Disable Print to PDF Services.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Print to PDF services 3 | DISM /online /disable-feature /featurename:Printing-PrintToPDFServices-Features /NoRestart 4 | -------------------------------------------------------------------------------- /Scripts/Enabled/Disable Print to XPS Services.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Print to XPS services 3 | DISM /online /disable-feature /featurename:Printing-XPSServices-Features /NoRestart 4 | -------------------------------------------------------------------------------- /Scripts/Enabled/Disable Printing Foundation.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Printng foundation 3 | DISM /online /disable-feature /featurename:Printing-Foundation-Features /NoRestart 4 | -------------------------------------------------------------------------------- /Scripts/Enabled/Disable Remote Differential Compression.Safe.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Remote Differential Compression 3 | DISM /online /disable-feature /featurename:MSRDC-Infrastructure /NoRestart 4 | -------------------------------------------------------------------------------- /Scripts/Enabled/Disable Remote Differential Compression.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Remote Differential Compression 3 | DISM /online /disable-feature /featurename:MSRDC-Infrastructure /NoRestart 4 | -------------------------------------------------------------------------------- /Scripts/Enabled/Disable Timeline.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Disabling Timeline 3 | reg ADD HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System /v EnableActivityFeed /t REG_DWORD /d 0 /f 4 | reg ADD HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System /v PublishUserActivities /t REG_DWORD /d 0 /f 5 | reg ADD HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System /v UploadUserActivities /t REG_DWORD /d 0 /f 6 | -------------------------------------------------------------------------------- /Scripts/Enabled/Disable VBS [Virtualization Based Security] CPU.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Disabling VBS [Virtualization Based Security] CPU 3 | bcdedit /set hypervisorlaunchtype off 4 | reg ADD HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\DeviceGuard /v EnableVirtualizationBasedSecurity /t REG_DWORD /d 0 /f 5 | -------------------------------------------------------------------------------- /Scripts/Enabled/Disable Windows Media Player.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Windows Media Player (if you need, install other better alternatives) 3 | DISM /online /disable-feature /featurename:WindowsMediaPlayer /NoRestart 4 | -------------------------------------------------------------------------------- /Scripts/Enabled/Disable Windows Security Center.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Disabling Windows Security Center 3 | REG add "HKLM\SYSTEM\CurrentControlSet\services\wscsvc" /v Start /t REG_DWORD /d 4 /f 4 | -------------------------------------------------------------------------------- /Scripts/Enabled/Disable Work Folders.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Work Folders 3 | DISM /online /disable-feature /featurename:WorkFolders-Client /NoRestart 4 | -------------------------------------------------------------------------------- /Scripts/Enabled/Enable Hibernation.Safe.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Enabling Hibernation 3 | powercfg.exe /hibernate on 4 | -------------------------------------------------------------------------------- /Scripts/Enabled/Fix Pagefile On Windows.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | call :getTotalRAM xRAM 3 | 4 | :: If you want to specific the size of the pagefile, you can define on the following variable 5 | :: Take enote this value is in KB, so if you want 1GB Virtual Memory, then you must set to 1024 6 | :: value -1 is for automatic calculation 7 | set UserDefinedVM=-1 8 | 9 | echo Fix pagefile on Windows (this config is for GPD specific config, so you can change this to your own needs) 10 | echo there is no a general rule for set this value, because depends on the machine and their usage 11 | echo so, my recommendation is to try to reach 12GB total ram, but never set more than the 50% of the 12 | echo current ram as virtual, this mean if you have: 13 | echo if you have less than 8GB RAM, set the virtual memory = RAM/2 14 | echo if you have more than 8GB RAM, set the virtual memory = 2GB 15 | echo. 16 | echo if you have more than 16GB, you have enough RAM memory for run most games, and maybe you can set 17 | echo virtual memory to 0 (zero), but windows is not designed to run without virtual memory, so the 18 | echo performance is not so good as you set some virtual memory. for this reason, my recommendation for 19 | echo machines with more than 8GB RAM (most probably will be 16GB), is to set 2GB as virtual memory. 20 | echo the following configuration is for 4GB RAM, so virtual memory will be 2GB 21 | echo for references: 22 | echo GPD-WIN1 = 4GB 23 | echo GPD-WIN2 = 8GB 24 | echo GPD-MicroPC =8GB 25 | echo GPD-WINMAX = 16GB 26 | echo GPD-WIN3 = 16GB 27 | echo. 28 | if %xRAM% LEQ 8 ( 29 | echo Less or Equal to 8 30 | set /a myVM=xRAM/2 31 | ) else if %xRAM% LEQ 12 ( 32 | echo Less or Equal to 12 33 | set /a myVM=4 34 | ) else ( 35 | set /a myVM=2 36 | ) 37 | if %myVM%==0 set myVM=1 38 | 39 | set /a xmyVM=%myVM% * 1024 40 | 41 | if %UserDefinedVM% GTR 0 set xmyVM=%UserDefinedVM% 42 | 43 | 44 | echo Current RAM installed: %xRAM%GB 45 | echo Virtual Memory : %xmyVM%KB 46 | echo. 47 | :: First disable pagefile 48 | wmic computersystem where name="%computername%" set AutomaticManagedPagefile=false 49 | 50 | :: Now set the pagefile size 51 | wmic pagefileset where name="C:\\pagefile.sys" set InitialSize=%xmyVM%,MaximumSize=%xmyVM% 52 | rem wmic pagefileset where name=”C:\\pagefileGPD.sys” set InitialSize=2048,MaximumSize=2048 53 | timeout /t 5 54 | 55 | goto :ToEnd 56 | 57 | :getTotalRAM :{ 58 | setlocal enableDelayedExpansion 59 | if not defined tempFN set tempFN=%temp%\PS-%RANDOM%%RANDOM%%RANDOM%%RANDOM%.out.txt 60 | for /F "TOKENS=2 DELIMS==" %%A in ('WMIC memorychip GET Capacity /VALUE') DO ( 61 | set SLO=%%A 62 | set /a myGB=1024*1024*1024 63 | set "myC=powershell -Command "!SLO:~0,-1!/!myGB!"" 64 | !myC! >"%tempFN%" 65 | set /p xGB=<"%tempFN%" 66 | ) 67 | ( 68 | endlocal 69 | set %1=%xGB% 70 | exit /b 71 | ) 72 | :} 73 | 74 | :ToEnd -------------------------------------------------------------------------------- /Scripts/Enabled/Fix for Search Menu.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo FIX for search menu (delete a reg entry and enable Windows Geolocalization service "lfsvc") 3 | reg delete HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lfsvc\TriggerInfo\3 /f 4 | sc config lfsvc start= auto 5 | -------------------------------------------------------------------------------- /Scripts/Enabled/Fix for Unreal Engine.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Fix for games that uses Unreal Engine and have issues with intel graphics cards 3 | setx OPENSSL_ia32cap :~0x20000000 4 | setx OPENSSL_ia32cap :~0x20000000 /M -------------------------------------------------------------------------------- /Scripts/Enabled/Remove Taskview button from Windows Bar.Safe.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Remove TaskViewButton from Windows Bar 3 | reg ADD HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v ShowTaskViewButton /t REG_DWORD /d 0 /f 4 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MultitaskingView\AllUpView /v Enabled /t REG_DWORD /d 0 /f 5 | -------------------------------------------------------------------------------- /Scripts/Enabled/Set Coalescing State [RSC].Safe.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Disabling Receive Segment Coalescing State (RSC) - For lan/online gaming 3 | netsh int tcp set global rsc=disabled 4 | -------------------------------------------------------------------------------- /Scripts/Enabled/Set Gaming Priority.Safe.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Gaming Priority 3 | REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" /v "GPU Priority" /t REG_DWORD /d 8 /f 4 | REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" /v "Priority" /t REG_DWORD /d 6 /f 5 | -------------------------------------------------------------------------------- /Scripts/Enabled/Set IncreaseUserVa value to Half of RAM.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enableDelayedExpansion 3 | call :getTotalRAM xRAM 4 | :: If you want to specific the size of the pagefile, you can define on the following variable 5 | :: Take enote this value is in KB, so if you want 1GB Virtual Memory, then you must set to 1024 6 | :: value -1 is for automatic calculation 7 | set UserDefinedVM=-1 8 | 9 | echo It changes the boot configuration of Windows so that it is in effect every time you boot. 10 | echo Not all computers and not all applications play nice with it. 11 | echo If you find your computer has become unstable, or an application has become unstable, 12 | echo you can revoke it with "bcdedit /set IncreaseUserVa 2048" 13 | echo This tweak is basically for 32 bits programs. 14 | echo This script will set the value of IncreaseUserVa to half of memory RAM 15 | echo. 16 | if %xRAM% LEQ 4 ( 17 | echo Less or Equal to 4GB, set default value for this parameter. 18 | set xmyVM=2048 19 | ) else ( 20 | set /a xmyVM=%xRAM%/ 2 21 | set /a xmyVM=!xmyVM! * 1024 22 | ) 23 | 24 | if %UserDefinedVM% GTR 0 set xmyVM=%UserDefinedVM% 25 | 26 | echo Current RAM installed: %xRAM%GB 27 | echo calculated Value : %xmyVM%KB 28 | echo. 29 | bcdedit /set increaseuserva %xmyVM% 30 | timeout /t 5 31 | 32 | goto :ToEnd 33 | 34 | :getTotalRAM :{ 35 | setlocal enableDelayedExpansion 36 | if not defined tempFN set tempFN=%temp%\PS-%RANDOM%%RANDOM%%RANDOM%%RANDOM%.out.txt 37 | set tMEM=0 38 | for /F "TOKENS=2 DELIMS==" %%A in ('WMIC memorychip GET Capacity /VALUE') DO ( 39 | set SLO=%%A 40 | set /a myGB=1024*1024*1024 41 | set "myC=powershell -Command "!SLO:~0,-1!/!myGB!"" 42 | !myC! >"%tempFN%" 43 | set /p xGB=<"%tempFN%" 44 | set /a tMEM+=!xGB! 45 | rem echo xGB=!xGB! 46 | rem echo tMEM=!tMEM! 47 | ) 48 | 49 | ( 50 | endlocal 51 | set %1=%tMEM% 52 | exit /b 53 | ) 54 | :} 55 | 56 | :ToEnd -------------------------------------------------------------------------------- /Scripts/Enabled/Set Internal Cache Leves of NTFS.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Configures the internal cache levels of NTFS paged-pool memory and NTFS nonpaged-pool memory. 3 | echo Set to 1 or 2. When set to 1 (the default), NTFS uses the default amount of paged-pool memory. 4 | echo When set to 2, NTFS increases the size of its lookaside lists and memory thresholds. 5 | echo (A lookaside list is a pool of fixed-size memory buffers that the kernel and device drivers 6 | echo create as private memory caches for file system operations, such as reading a file.) 7 | 8 | Fsutil behaviour set memoryusage 2 9 | -------------------------------------------------------------------------------- /Scripts/Enabled/Set Multimedia Class Sheduler.Safe.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Setup Multimedia Class Scheduler 3 | REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" /v "Priority" /t REG_DWORD /d 6 /f 4 | -------------------------------------------------------------------------------- /Scripts/Enabled/Set Power Plan to Balanced.Safe.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Set Power Plan to Balanced. This is done this way to allow user to setup performance by the sliding control on battery icon. 3 | powercfg.exe /setactive 381b4222-f694-41f0-9685-ff5bb260df2e 4 | -------------------------------------------------------------------------------- /Scripts/Enabled/Set SystemResponsiveness for Gaming.Safe.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo SystemResponsiveness for Gaming (default value is 20, that means 20% reserved for background processes) 3 | REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" /v SystemResponsiveness /t REG_DWORD /d 0 /f 4 | -------------------------------------------------------------------------------- /Scripts/Enabled/Set Visual Effect Windows for Performance.Safe.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Setting visual effects on windows for best performance, but with custom config. 3 | echo This setting really will not impact on gaming, but improve your usage on windows interface. 4 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects /v VisualFXSetting /t REG_DWORD /d 2 /f 5 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\AnimateMinMax /v DefaultApplied /t REG_DWORD /d 0 /f 6 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ComboBoxAnimation /v DefaultApplied /t REG_DWORD /d 0 /f 7 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ControlAnimations /v DefaultApplied /t REG_DWORD /d 0 /f 8 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\CursorShadow /v DefaultApplied /t REG_DWORD /d 0 /f 9 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\DragFullWindows /v DefaultApplied /t REG_DWORD /d 1 /f 10 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\DropShadow /v DefaultApplied /t REG_DWORD /d 0 /f 11 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\DWMAeroPeekEnabled /v DefaultApplied /t REG_DWORD /d 0 /f 12 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\DWMEnabled /v DefaultApplied /t REG_DWORD /d 0 /f 13 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\DWMSaveThumbnailEnabled /v DefaultApplied /t REG_DWORD /d 0 /f 14 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\FontSmoothing /v DefaultApplied /t REG_DWORD /d 1 /f 15 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ListBoxSmoothScrolling /v DefaultApplied /t REG_DWORD /d 0 /f 16 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ListviewAlphaSelect /v DefaultApplied /t REG_DWORD /d 0 /f 17 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ListviewShadow /v DefaultApplied /t REG_DWORD /d 0 /f 18 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\MenuAnimation /v DefaultApplied /t REG_DWORD /d 0 /f 19 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\SelectionFade /v DefaultApplied /t REG_DWORD /d 0 /f 20 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\TaskbarAnimations /v DefaultApplied /t REG_DWORD /d 0 /f 21 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\Themes /v DefaultApplied /t REG_DWORD /d 0 /f 22 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ThumbnailsOrIcon /v DefaultApplied /t REG_DWORD /d 1 /f 23 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\TooltipAnimation /v DefaultApplied /t REG_DWORD /d 0 /f 24 | reg ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\TransparentGlass /v DefaultApplied /t REG_DWORD /d 0 /f 25 | -------------------------------------------------------------------------------- /Scripts/Enabled/Setup Core Affinity to Foreground Process.Safe.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Set up core affinity to foreground process 3 | echo possible values 4 | echo 2A Hex _ 42 Dec = Short, Fixed , High foreground boost. 5 | echo 29 Hex _ 41 Dec = Short, Fixed , Medium foreground boost. 6 | echo 28 Hex _ 40 Dec = Short, Fixed , No foreground boost. 7 | echo. 8 | echo 26 Hex _ 38 Dec = Short, Variable , High foreground boost. 9 | echo 25 Hex _ 37 Dec = Short, Variable , Medium foreground boost. 10 | echo 24 Hex _ 36 Dec = Short, Variable , No foreground boost. 11 | echo. 12 | echo 1A Hex _ 26 Dec = Long, Fixed, High foreground boost. 13 | echo 19 Hex _ 25 Dec = Long, Fixed, Medium foreground boost. 14 | echo 18 Hex _ 24 Dec = Long, Fixed, No foreground boost. 15 | echo. 16 | echo 16 Hex _ 22 Dec = Long, Variable, High foreground boost. 17 | echo 15 Hex _ 21 Dec = Long, Variable, Medium foreground boost. 18 | echo 14 Hex _ 20 Dec = Long, Variable, No foreground boost. 19 | 20 | :: note: value is in decimal 21 | reg ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\PriorityControl /v Win32PrioritySeparation /t REG_DWORD /d 38 /f 22 | -------------------------------------------------------------------------------- /Scripts/Enabled/Show Drive Letters Before Drive Label.Safe.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Show drive letters before drive label 3 | REG ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer /v ShowDriveLettersFirst /t REG_DWORD /D 4 /f 4 | taskkill /f /im explorer.exe 5 | start explorer.exe 6 | -------------------------------------------------------------------------------- /Scripts/Enabled/Z90_Install Chocolatey Repository.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo Installing Chocolatey Repository 3 | powershell Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) 4 | -------------------------------------------------------------------------------- /Scripts/Enabled/Z92_Install Microsoft Store.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enableextensions enabledelayedexpansion 3 | cd /d "%~dp0" 4 | pushd "%~dp0" 5 | set bDebug=0 6 | cls 7 | goto :StartScript 8 | 9 | :: __________________________________________________________________ sub InitColors 10 | :: Initialize color variables 11 | :InitColors :{ 12 | set cReset= 13 | set cBold= 14 | set cUnder= 15 | set cInv= 16 | 17 | set caBLACK=0 18 | set caRED=1 19 | set caGREEN=2 20 | set caYELLOW=3 21 | set caBLUE=4 22 | set caMAGENTA=5 23 | set caCYAN=6 24 | set caWHITE=7 25 | set caTEST=88 26 | 27 | set coFORE=3 28 | set coNORMAL=3 29 | set coFORENORMAL=3 30 | set coBACK=4 31 | set coBACKNORMAL=4 32 | set coFORESTRONG=9 33 | set coBACKSTRONG=10 34 | 35 | set cTAFore=Yellow 36 | set cTAForeType=STRONG 37 | set cTABack=Red 38 | set cTABackType=NORMAL 39 | 40 | :: standard colors for powershell window 41 | set cDeFore=white 42 | set cDeType=normal 43 | set cDeBack=blue 44 | set cdeBackType=normal 45 | ( 46 | exit /b) 47 | :} 48 | 49 | :: __________________________________________________________________ sub InitColors 50 | :: Set string to be printed in colors 51 | :cText varText {outVar} [foreColor] [forType] [backColor] [backType] :{ 52 | setlocal disableDelayedExpansion 53 | set myV1=%3 54 | set myVS1=%4 55 | set myV2=%5 56 | set myVS2=%6 57 | 58 | rem if "_%myV1%"=="_" set myV1=%cDeFore% 59 | rem if "_%myVS1%"=="_" set myVS1=%cDeType% 60 | rem if "_%myV2%"=="_" set myV2=%cDeBack% 61 | rem if "_%myVS2%"=="_" set myVS2=%cDeBackType% 62 | 63 | if defined ca%myV1% ( 64 | if /I "_%myVS1%" EQU "_strong" ( 65 | call set xFCol=9%%ca%myV1%%% 66 | ) else ( 67 | call set xFCol=3%%ca%myV1%%% 68 | ) 69 | ) else ( 70 | rem set xFCol=3%caWHITE% 71 | ) 72 | 73 | if defined ca%myV2% ( 74 | if /I "_%myVS2%" EQU "_strong" ( 75 | call set xBCol=10%%ca%myV2%%% 76 | ) else ( 77 | call set xBCol=4%%ca%myV2%%% 78 | ) 79 | ) else ( 80 | rem set xFCol=3%caWHITE% 81 | ) 82 | 83 | rem set myXCol=%xBCol%;%xFCol% 84 | set iCC=0 85 | if "_%xFCol%" NEQ "_" set /a iCC+=1 86 | if "_%xBCol%" NEQ "_" set /a iCC+=1 87 | if %iCC% == 2 ( 88 | set myXCol=%xBCol%;%xFCol% 89 | ) else ( 90 | set myXCol=%xBCol%%xFCol% 91 | ) 92 | set rcVar=[%myXCol%m%~1 93 | if %bDebug%==1 ( 94 | echo ====== sub cText [%1] [%2] [%3] [%4] [%5] [%6] 95 | echo * xBCol =%xBCol% 96 | echo * xFCol =%xFCol% 97 | echo * myXCol =%myXCol% 98 | echo * rcVar =%rcVar% 99 | ) 100 | ( 101 | endlocal 102 | set %2=%rcVar% 103 | exit /b 104 | ) 105 | :} 106 | 107 | 108 | :StartScript 109 | call :InitColors 110 | set "BaseDirProc=%~dp0" 111 | set "ScriptPath=%~0" 112 | set bReadOnly=0 113 | set "runPath=%temp%\MicrosoftStore\LTSC-Add-MicrosoftStore-2019" 114 | set "runPath2=%BaseDirProc%..\..\Extras\MicrosoftStore\LTSC-Add-MicrosoftStore-2019\" 115 | 116 | call :cText "kkkgo" kkkgo white strong green strong 117 | echo Downloading and running Microsoft Store (70MB aprox) installation script by %kkkgo% 118 | echo Be Patient... 119 | echo This script will install Microsoft Store, App Installer, Purchase App and XBox Identity. 120 | echo. 121 | echo check GitHub link for more info: 122 | call :ctext "https://github.com/kkkgo/LTSC-Add-MicrosoftStore" sTXT black normal white strong 123 | echo %sTXT% 124 | echo. 125 | if not exist "%runPath2%Add-Store.cmd" ( 126 | powershell Invoke-WebRequest "https://github.com/lixuy/LTSC-Add-MicrosoftStore/archive/2019.zip" -OutFile "%temp%\MicrosoftStore.zip" 127 | set "sCMD=Expand-Archive -F '%temp%\MicrosoftStore.zip' '%temp%\MicrosoftStore'" 128 | rem echo sCMD=%sCMD% 129 | rem echo sCMD=!sCMD! 130 | rem echo powershell -command !sCMD! 131 | powershell -command !sCMD! 132 | 133 | if not exist "%temp%\MicrosoftStore.zip" ( 134 | echo Can´t download the required file. 135 | echo try downloading directly this link: 136 | echo https://github.com/lixuy/LTSC-Add-MicrosoftStore/archive/2019.zip 137 | echo uncompress and copy the files on the following directory: 138 | echo %BaseDirProc%..\..\MicrosoftStore\LTSC-Add-MicrosoftStore-2019\ 139 | echo and run again this script. 140 | goto :ToEnd 141 | ) 142 | if not exist "%runPath2%" ( 143 | echo trying to create file structure on main Script folder... 144 | mkdir "%runPath2%" >nul 145 | echo Copying unpacked files to DNXDOScript directory... 146 | xcopy "%runPath%\" "!runPath2!" >nul 147 | ) 148 | ) 149 | 150 | if not exist "%runPath2%" ( 151 | echo Running from system Temp folder... 152 | set bReadOnly=1 153 | ) else ( 154 | echo Running from Main Script folder... 155 | set "runPath=!runPath2!" 156 | ) 157 | rem powershell -Command "(gc '%RootPath%\DNXSharedFolder.wsb') -replace '##ROOTDNXPSOFTFOLDER##', '%MainFolder%' | Set-Content '%RootPath%\DNXSharedFolder.wsb' -Encoding Default" 158 | copy "%runPath%\Add-Store.cmd" "%runPath%\DNXAdd-Store.cmd" >nul 159 | 160 | powershell -Command "(gc '%runPath%\DNXAdd-Store.cmd') -replace 'pause', 'rem pause' | Set-Content '%runPath%\DNXAdd-Store.cmd' -Encoding Default" 161 | rem echo start "%runPath%\DNXAdd-Store.cmd" 162 | rem pause 163 | start "Installing Microsoft Store" "%runPath%\DNXAdd-Store.cmd" 164 | :ToEnd 165 | --------------------------------------------------------------------------------