Windows Setup 1

TairikuOkami Nov 17th, 2017 (edited) 1,012 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. powercfg -h off
  3. rem Access CMD with SYSTEM rights at logon (Win+U)
  4. takeown /s %computername% /u %username% /f "%WINDIR%\System32\utilman.exe"
  5. icacls "%WINDIR%\System32\utilman.exe" /grant:r %username%:F
  6. copy /y %WINDIR%\System32\cmd.exe %WINDIR%\System32\utilman.exe
  7. takeown /s %computername% /u %username% /f "%WINDIR%\System32\sethc.exe"
  8. icacls "%WINDIR%\System32\sethc.exe" /grant:r %username%:F
  9. copy /y %WINDIR%\System32\cmd.exe %WINDIR%\System32\sethc.exe
  11. rem Disable Auto-install subscribed/suggested apps (games like Candy Crush Soda Saga/Minecraft)
  12. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "ContentDeliveryAllowed" /t REG_DWORD /d "0" /f
  13. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "OemPreInstalledAppsEnabled" /t REG_DWORD /d "0" /f
  14. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d "0" /f
  15. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEverEnabled" /t REG_DWORD /d "0" /f
  16. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d "0" /f
  17. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SoftLandingEnabled" /t REG_DWORD /d "0" /f
  18. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContentEnabled" /t REG_DWORD /d "0" /f
  19. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-310093Enabled" /t REG_DWORD /d "0" /f
  20. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338388Enabled" /t REG_DWORD /d "0" /f
  21. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338389Enabled" /t REG_DWORD /d "0" /f
  22. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338393Enabled" /t REG_DWORD /d "0" /f
  23. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353694Enabled" /t REG_DWORD /d "0" /f
  24. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353696Enabled" /t REG_DWORD /d "0" /f
  25. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SystemPaneSuggestionsEnabled" /t REG_DWORD /d "0" /f
  26. reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager\Subscriptions" /f
  27. reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager\SuggestedApps" /f
  29. rem Remove OneDrive
  30. taskkill /F /IM onedrive.exe
  31. "%SYSTEMROOT%\System32\OneDriveSetup.exe" /uninstall
  32. "%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe" /uninstall
  33. rd "%LOCALAPPDATA%\Microsoft\OneDrive" /Q /S
  34. rd "%PROGRAMDATA%\Microsoft OneDrive" /Q /S
  35. rd "%USERPROFILE%\OneDrive" /Q /S
  37. rem Disable EFS and Decrypt everything on C:
  38. fsutil behavior set disableencryption 1
  39. cipher /d /s:C:\
  41. rem Disable Windows File Compression
  42. fsutil behavior set disablecompression 1
  43. compact /CompactOs:never
  45. rem 0 - Disable Reserved Storage (7GB)
  46. reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\ReserveManager" /v "ShippedWithReserves" /t REG_DWORD /d "0" /f
  48. rem Disable pagefile
  49. rem fsutil behavior set EncryptPagingFile 1
  50. wmic computersystem where name="%computername%" set AutomaticManagedPagefile=False
  51. wmic pagefileset where name="%SystemDrive%\\pagefile.sys" set InitialSize=0,MaximumSize=0
  52. wmic pagefileset where name="%SystemDrive%\\pagefile.sys" delete
  54. rem Setup Network (NetBIOS might be required for aDSL/LAN)
  55. rem Disable IPv6/LMHOSTS lookup/NetBIOS and Set DNS Servers
  56. netsh int ipv6 isatap set state disabled
  57. netsh int teredo set state disabled
  58. netsh interface ipv6 6to4 set state state=disabled undoonstop=disabled
  59. reg add "HKLM\System\CurrentControlSet\Services\Tcpip6\Parameters" /v "DisabledComponents" /t REG_DWORD /d "255" /f
  60. wmic nicconfig where DHCPEnabled=TRUE call SetDNSServerSearchOrder ("")
  61. wmic nicconfig where macaddress="D0:17:C2:D0:30:DC" call EnableStatic (""), ("")
  62. wmic nicconfig where macaddress="D0:17:C2:D0:30:DC" call SetDNSServerSearchOrder (",")
  63. wmic nicconfig where macaddress="D0:17:C2:D0:30:DC" call SetGateways ("")
  64. reg add "HKLM\System\CurrentControlSet\Services\NetBT\Parameters" /v "EnableLMHOSTS" /t REG_DWORD /d "0" /f
  65. wmic nicconfig where TcpipNetbiosOptions=0 call SetTcpipNetbios 2
  66. wmic nicconfig where TcpipNetbiosOptions=1 call SetTcpipNetbios 2
  68. pause
  70. rem
  71. rem Dism /Online /Get-Features
  72. Dism /Online /Disable-Feature /FeatureName:FaxServicesClientPackage /Quiet /NoRestart
  73. Dism /Online /Disable-Feature /FeatureName:Internet-Explorer-Optional-amd64 /Quiet /NoRestart
  74. Dism /Online /Disable-Feature /FeatureName:MediaPlayback /Quiet /NoRestart
  75. Dism /Online /Disable-Feature /FeatureName:Microsoft-Windows-Subsystem-Linux /Quiet /NoRestart
  76. Dism /Online /Disable-Feature /FeatureName:MicrosoftWindowsPowerShellV2 /Quiet /NoRestart
  77. Dism /Online /Disable-Feature /FeatureName:MicrosoftWindowsPowerShellV2Root /Quiet /NoRestart
  78. Dism /Online /Disable-Feature /FeatureName:MSRDC-Infrastructure /Quiet /NoRestart
  79. Dism /Online /Disable-Feature /FeatureName:Printing-Foundation-Features /Quiet /NoRestart
  80. Dism /Online /Disable-Feature /FeatureName:Printing-Foundation-InternetPrinting-Client /Quiet /NoRestart
  81. Dism /Online /Disable-Feature /FeatureName:Printing-PrintToPDFServices-Features /Quiet /NoRestart
  82. Dism /Online /Disable-Feature /FeatureName:Printing-XPSServices-Features /Quiet /NoRestart
  83. Dism /Online /Disable-Feature /FeatureName:SMB1Protocol /Quiet /NoRestart
  84. Dism /Online /Disable-Feature /FeatureName:SearchEngine-Client-Package /Quiet /NoRestart
  85. Dism /Online /Disable-Feature /FeatureName:WCF-TCP-PortSharing45 /Quiet /NoRestart
  86. Dism /Online /Disable-Feature /FeatureName:Windows-Defender-Default-Definitions /Quiet /NoRestart
  87. Dism /Online /Disable-Feature /FeatureName:WorkFolders-Client /Quiet /NoRestart
  88. Dism /Online /Enable-Feature /FeatureName:NetFx3 /All /Quiet /NoRestart
  89. rem Dism /Online /Enable-Feature /FeatureName:NetFx3 /All /Source:E:\sources\sxs /LimitAccess
  91. rem Activate and Update Apps/Windows
  92. slmgr.vbs /ato
  93. rem start ms-windows-store:
  94. start ms-settings:windowsupdate-action
  96. rem Remove Windows product key from the registry
  97. slmgr /cpky
  99. pause
  101. copy "D:\Software\Temp\Setup\0.msi" "%USERPROFILE%\Desktop"
  102. start "" /wait "%USERPROFILE%\Desktop\0.msi"
  104. pause
  106. rem Single-click to open an item (point to select)
  107. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "ShellState" /t REG_BINARY /d "2400000017a8000000000000000000000000000001000000130000000000000073000000" /f
  109. rem Windows Settings - System - System info - Advanced system settings - Keep: Shows thumbnails/Show windows contents/Smooth edges
  110. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" /v "VisualFXSetting" /t REG_DWORD /d "3" /f
  111. reg add "HKCU\Control Panel\Desktop" /v "DragFullWindows" /t REG_SZ /d "1" /f
  112. reg add "HKCU\Control Panel\Desktop" /v "FontSmoothingType" /t REG_DWORD /d "2" /f
  113. reg add "HKCU\Control Panel\Desktop" /v "UserPreferencesMask" /t REG_BINARY /d "9012038010000000" /f
  114. reg add "HKCU\Control Panel\Desktop\WindowMetrics" /v "MinAnimate" /t REG_SZ /d "0" /f
  115. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "IconsOnly" /t REG_DWORD /d "0" /f
  116. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ListviewAlphaSelect" /t REG_DWORD /d "0" /f
  117. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ListviewShadow" /t REG_DWORD /d "0" /f
  118. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarAnimations" /t REG_DWORD /d "0" /f
  119. reg add "HKCU\Software\Microsoft\Windows\DWM" /v "AlwaysHibernateThumbnails" /t REG_DWORD /d "0" /f
  120. reg add "HKCU\Software\Microsoft\Windows\DWM" /v "EnableAeroPeek" /t REG_DWORD /d "0" /f
  122. rem Move Documents
  123. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Personal" /t REG_SZ /d "Z:\Documents" /f
  124. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{F42EE2D3-909F-4907-8871-4C22FC0BF756}" /t REG_EXPAND_SZ /d "Z:\Documents" /f
  125. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Personal" /t REG_SZ /d "Z:\Documents" /f
  127. rem Move Downloads
  128. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "{374DE290-123F-4565-9164-39C4925E467B}" /t REG_SZ /d "D:\Software\Temp\Downloads" /f
  129. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{374DE290-123F-4565-9164-39C4925E467B}" /t REG_EXPAND_SZ /d "D:\Software\Temp\Downloads" /f
  130. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{7D83EE9B-2244-4E70-B1F5-5393042AF1E4}" /t REG_EXPAND_SZ /d "D:\Software\Temp\Downloads" /f
  132. rem Move Pictures
  133. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Pictures" /t REG_SZ /d "D:\Software\Temp\Pics" /f
  134. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{0DDD015D-B06C-45D5-8C4C-F59713854639}" /t REG_EXPAND_SZ /d "D:\Software\Temp\Pics" /f
  135. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Pictures" /t REG_EXPAND_SZ /d "D:\Software\Temp\Pics" /f
  137. rem Move Videos
  138. rem reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Video" /t REG_SZ /d "D:\Movies" /f
  139. rem reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{35286A68-3C57-41A1-BBB1-0EAE73D76C95}" /t REG_EXPAND_SZ /d "D:\Movies" /f
  140. rem reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Video" /t REG_EXPAND_SZ /d "D:\Movies" /f
  142. rem Symlink for Apps in RAMDisk
  143. mklink /d "%LocalAppData%\Discord" "Z:\Discord"
  144. md "Z:\Discord"
  145. mklink /d "%LocalAppData%\Yandex" "Z:\Yandex"
  146. md "Z:\Yandex"
  148. rem Temp Folders to RAMDisk
  149. reg add "HKCU\Environment" /v "TEMP" /t REG_EXPAND_SZ /d "Z:\TEMP" /f
  150. reg add "HKCU\Environment" /v "TMP" /t REG_SZ /d "Z:\TEMP" /f
  152. start "" /wait "D:\Software\Temp\Setup\1.exe"
  153. start "" /wait "D:\Software\Temp\Setup\2.exe"
  154. start "" /wait "D:\Software\Temp\Setup\3.exe"
  155. start "" /wait "D:\Software\Temp\Setup\4.exe"
  156. start "" /wait "D:\Software\Temp\Setup\5.exe"
  157. start "" /wait "D:\Software\Temp\Setup\8.exe"
  158. start "" /wait "D:\Software\Temp\Setup\9.exe"
  159. start "" /wait "D:\Software\Temp\Setup\11.exe"
  160. start "" /wait "D:\Software\Temp\Setup\12.exe"
  161. start "" /wait "D:\Software\Temp\Setup\13.exe"
  163. pause
  165. rem Remove All Apps including Store
  166. %WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe "Get-AppxPackage -AllUsers | Remove-AppxPackage"
  168. rem Restart in ...
  170. pause
  172. shutdown /r /f /t 0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand