53 Commits
2.12 ... 2.20

Author SHA1 Message Date
Disassembler
c4a3e1a5c1 v2.20, 2018-04-15 - RS4 (1803) ready
Lots of changes, few of them BREAKING, hence the bigger version bump.
 - Add "DisableActivityHistory"
 - Add "DisableSMBServer" (thx @Phenix66)
 - Add "Disable LLMNR"
 - Add "Enable Core Isolation Memory Integrity"
 - Add more bloatware for removal (thx @jnslmk and @agsimmons)
 - Update "UnpinStartMenuTiles" for 1803 (thx @sippi90)
 - Update "Disable Web Search" for 1803
 - Update "Disable Location Tracking" for 1803
 - Update "DisableAppSuggestions" to remove ads from Task View
 - *BREAKING* Update "ShowTaskbarSearch*" to add type choice (thx @Letouane)
 - *BREAKING* Split "ShowTaskbarTitles" to add type choice (thx @sztanpet)
 - *BREAKING* Update "SetControlPanel*" to add icon size choice
 - Update "DisableSmartScreen" to use GPO
 - Update "DisableFeedback" to use GPO
 - Update "DisableAdvertisingID" to use GPO
 - Update "DisableSharedExperiences" to use GPO
 - Update "DisableAdobeFlash" to use GPO
 - Update "DisableUpdateDriver" to use GPO and set more keys
 - Move "DisableTailoredExperiences" to separate tweak and use GPO
 - Update "UninstallInternetExplorer" to support also x86
 - Update "InstallLinuxSubsystem" compatibility with old OS builds
 - Update "DisableDefender" compatibility with old OS builds
 - Update "DisableXboxFeatures" compatibility with old OS builds
 - Update "SetP2PUpdateLocal" and comment from default preset
 - Comment "DisableHomeGroups" removed in 1803
 - *BREAKING* Merge "DisableLockScreenSpotlight" into "DisableAppSuggestions"
 - *BREAKING* Remove "DisableAutoLogger" as it was never useful
 - Remove test files as they seemed to be confusing
 - Few other minor improvements
 - Documentation update
2018-04-15 13:29:35 +02:00
Disassembler
43f70e46a6 Update README.md into mini-wiki 2018-04-15 12:54:37 +02:00
Disassembler
603f5a74fe Split "ShowTaskbarTitles" to add type choice, closes #78 (thx @sztanpet) 2018-04-15 10:14:21 +02:00
Disassembler
b5eb8e42c1 Update "ShowTaskbarSearch*" to add type choice, reimplements #55 (thx @Letouane) 2018-04-15 10:14:12 +02:00
Disassembler
94b8a92278 Update "SetControlPanel*" to add icon size choice
Also set them per-user and don't trigger antimalware
2018-04-15 10:14:04 +02:00
Disassembler
f66f0d0bb4 Few more build restrictions and notes 2018-04-15 10:13:44 +02:00
Disassembler
b44f65dc60 Suppress XboxIdentityProvider error on pre-1607 builds 2018-04-14 22:42:40 +02:00
Disassembler
9decdac904 Optimize "ShowTaskManagerDetails" and add a note 2018-04-14 22:37:01 +02:00
Disassembler
db20580134 Update backwards compatibility of "DisableDefender" 2018-04-14 19:07:19 +02:00
Disassembler
2f33a2a17a Add more bloatware for removal and sort alphabetically, closes #76, closes #77 (thx @jnslmk and @agsimmons) 2018-04-14 16:39:12 +02:00
Disassembler
fe299da41e Update "UninstallInternetExplorer" to support also x86, related to #62 2018-04-14 16:15:53 +02:00
Disassembler
488baa111f Update "UnpinStartMenuTiles" for 1803, closes #71 (thx @sippi90) 2018-04-14 12:23:32 +02:00
Disassembler
5fa6f4409c Update "InstallLinuxSubsystem" compatibility with old OS builds 2018-04-14 12:12:50 +02:00
Disassembler
88cac9efa8 Shave off some wait time from "UninstallOneDrive" 2018-04-14 10:57:40 +02:00
Disassembler
4ef4163172 Save a few characters by converting hex sequences to decimal 2018-04-14 10:55:55 +02:00
Disassembler
8d0ad4c9c8 Update "DisableAdobeFlash" to use GPO 2018-04-14 10:55:48 +02:00
Disassembler
f152b727ed Add note to "DisableLockScreenRS1" 2018-04-14 10:55:42 +02:00
Disassembler
98e106b78a Update "DisableSharedExperiences" to use GPO 2018-04-14 10:55:35 +02:00
Disassembler
d4fe0001a9 Comment "DisableHomeGroups" as they were removed in 1803 2018-04-14 10:55:28 +02:00
Disassembler
03e501b481 Update "DisableUpdateDriver" to use GPO and set more keys 2018-04-14 10:55:20 +02:00
Disassembler
2c79e6fb1f Add "Enable Core Isolation Memory Integrity" 2018-04-14 10:54:58 +02:00
Disassembler
bf97bb5f7b Add "Disable LLMNR" 2018-04-14 10:19:38 +02:00
Disassembler
3e16baf9fa Update "DisableAdvertisingID" to use GPO 2018-04-14 10:18:51 +02:00
Disassembler
39ff492b70 Move "DisableTailoredExperiences" to separate tweak and use GPO 2018-04-14 10:18:09 +02:00
Disassembler
793e98af93 Update "DisableFeedback" to use GPO
(1507 don't have the GPO, so the HKCU stays)
2018-04-14 10:00:22 +02:00
Disassembler
9f755fab3d Add "DisableSMBServer", closes #65 (thx @Phenix66) 2018-04-14 10:00:08 +02:00
Disassembler
eb82e5b855 Remove "DisableAutoLogger" as it was never useful 2018-04-14 10:00:00 +02:00
Disassembler
749150e9e2 Slim down "SetP2PUpdateLocal" and comment from default preset 2018-04-14 09:59:46 +02:00
Disassembler
4b8a519ee0 Update "Disable Location Tracking" for 1803 2018-04-14 09:59:35 +02:00
Disassembler
12b6cef3d1 Add "DisableActivityHistory" 2018-04-14 09:59:27 +02:00
Disassembler
657d353cab Merge "DisableLockScreenSpotlight" into "DisableAppSuggestions" 2018-04-14 09:59:17 +02:00
Disassembler
fea6de8104 Update "DisableAppSuggestions" to remove ads from Task View 2018-04-14 09:58:59 +02:00
Disassembler
7b3398fdd7 Update "Disable Web Search" for 1803 2018-04-14 09:58:51 +02:00
Disassembler
7b653187a4 Update "DisableSmartScreen" to use GPO 2018-04-14 09:58:19 +02:00
Disassembler
9332fd4e7b Remove the test preset + move the default preset one level up 2018-04-14 09:57:15 +02:00
Disassembler
cf5af8ab17 More cleanup after #66 (@Conder000 !!!), fixes #69 2018-04-07 09:45:43 +02:00
Disassembler
dc0a121435 v2.14, 2018-04-06
- Fix and reorganize Telemetry tweaks
 - Update "Enable Remote Desktop" to enable firewall rules (thx @timmytandian)
 - Add "Uninstall Internet Explorer" (thx @mhujer)
 - Add "Enable strong cryptography for .NET Framework" (thx @Sta2s)
 - Add "Enable Audio" for Server
 - Add default preset for making custom presets easier (thx @Conder000)
2018-04-06 16:18:42 +02:00
Disassembler
1ab60c363e Add "Enable Audio" (for Server) 2018-04-06 15:54:35 +02:00
Disassembler
575b7ef26a Add "Enable strong cryptography for .NET Framework", closes #64 (thx @Sta2s) 2018-04-06 14:41:03 +02:00
Disassembler
7be6666d1d Cleanup after #66 2018-04-06 14:37:55 +02:00
Martin Hujer
4df2b8cc44 Add "Uninstall Internet Explorer" (#62) 2018-04-06 14:20:50 +02:00
Disassembler
9dcbd908f4 Add firewall rules modification to Remote Desktop tweaks, closes #63 2018-04-06 14:17:02 +02:00
Disassembler
cf870330c8 Fix and reorganize Telemetry tweaks, closes #67 2018-04-06 13:57:55 +02:00
Conder000
3bdb745e0f Added default preset to the /test folder (#66) 2018-04-06 13:19:28 +02:00
Disassembler
5fe7d91b79 v2.13, 2018-03-18
- Add "Disable Windows Script Host"
 - Add "Uninstall Microsoft Print to PDF"
 - Add "Uninstall Microsoft XPS Document Writer"
 - Add "Remove Default Fax Printer" (thx @MisterDuval)
 - Add more 3rd party bloatware for removal (thx @iamteerawut)
 - Add more Microsoft bloatware for removal
 - Replace Write-Host cmdlet with Write-Output
 - Reorganize and regroup the tweaks a bit
2018-03-18 20:22:44 +01:00
Disassembler
615ff8cacc Add tweaks for default printers uninstallation, reimplements and closes #58 (thx @MisterDuval) 2018-03-18 20:12:03 +01:00
Disassembler
42fde5e945 Remove additional Microsoft bloatware 2018-03-18 12:15:14 +01:00
Disassembler
e3570d5f28 Add "Disable Windows Script Host" 2018-03-18 11:41:57 +01:00
Disassembler
7de3e81c79 Reorganize and regroup tweaks - no functional changes 2018-03-18 11:19:28 +01:00
Disassembler
a41c0eea7b Replace Write-Host cmdlet with Write-Output, closes #44 once and for all 2018-03-18 09:58:24 +01:00
Disassembler
ccc65c4ad3 Remove additonal 3rd party bloatware, closes #60 (thx @iamteerawut) 2018-03-18 09:50:01 +01:00
Disassembler
17a5c51e66 Add a warning for DisableTelemetry, kinda sorta resolves #57 2018-03-18 09:46:31 +01:00
Disassembler
1eaa9d58bd Unify coding style 2018-01-10 08:45:22 +01:00
11 changed files with 1270 additions and 1326 deletions

3
Default.bat Normal file
View File

@@ -0,0 +1,3 @@
@ECHO OFF
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "Win10.ps1" -preset "Default.preset"

View File

@@ -1,125 +1,137 @@
# Windows 10 - Apply all
RequireAdmin
DisableTelemetry
DisableWiFiSense
DisableSmartScreen
DisableWebSearch
DisableAppSuggestions
DisableBackgroundApps
DisableLockScreenSpotlight
DisableLocationTracking
DisableMapUpdates
DisableFeedback
DisableAdvertisingID
DisableCortana
DisableErrorReporting
SetP2PUpdateLocal
DisableAutoLogger
DisableDiagTrack
DisableWAPPush
SetUACLow
EnableSharingMappedDrives
DisableAdminShares
# DisableSMB1
SetCurrentNetworkPrivate
SetUnknownNetworksPrivate
DisableNetDevicesAutoInst
EnableCtrldFolderAccess
DisableFirewall
DisableDefender
DisableDefenderCloud
DisableUpdateMSRT
DisableUpdateDriver
DisableUpdateRestart
DisableHomeGroups
DisableSharedExperiences
DisableRemoteAssistance
EnableRemoteDesktop
DisableAutoplay
DisableAutorun
EnableStorageSense
DisableDefragmentation
DisableSuperfetch
DisableIndexing
SetBIOSTimeUTC
EnableHibernation
DisableSleepButton
DisableSleepTimeout
DisableFastStartup
DisableActionCenter
DisableLockScreen
DisableLockScreenRS1
HideNetworkFromLockScreen
HideShutdownFromLockScreen
DisableStickyKeys
ShowTaskManagerDetails
ShowFileOperationsDetails
EnableFileDeleteConfirm
HideTaskbarSearchBox
HideTaskView
ShowSmallTaskbarIcons
ShowTaskbarTitles
HideTaskbarPeopleIcon
ShowTrayIcons
ShowKnownExtensions
ShowHiddenFiles
HideSyncNotifications
HideRecentShortcuts
SetExplorerThisPC
ShowThisPCOnDesktop
ShowUserFolderOnDesktop
HideDesktopFromThisPC
HideDesktopFromExplorer
HideDocumentsFromThisPC
HideDocumentsFromExplorer
HideDownloadsFromThisPC
HideDownloadsFromExplorer
HideMusicFromThisPC
HideMusicFromExplorer
HidePicturesFromThisPC
HidePicturesFromExplorer
HideVideosFromThisPC
HideVideosFromExplorer
Hide3DObjectsFromThisPC
Hide3DObjectsFromExplorer
SetControlPanelViewIcons
SetVisualFXPerformance
DisableThumbnails
DisableThumbsDB
AddENKeyboard
EnableNumlock
DisableOneDrive
UninstallOneDrive
UninstallMsftBloat
UninstallThirdPartyBloat
UninstallWindowsStore
DisableXboxFeatures
DisableAdobeFlash
UninstallMediaPlayer
UninstallWorkFolders
InstallLinuxSubsystem
InstallHyperV
SetPhotoViewerAssociation
AddPhotoViewerOpenWith
DisableSearchAppInStore
DisableNewAppPrompt
EnableF8BootMenu
SetDEPOptOut
EnableMeltdownCompatFlag
# HideServerManagerOnLogin
# DisableShutdownTracker
# DisablePasswordPolicy
# DisableCtrlAltDelLogin
# DisableIEEnhancedSecurity
UnpinStartMenuTiles
UnpinTaskbarIcons
WaitForKey
Restart
# Default preset
RequireAdmin
DisableTelemetry
DisableWiFiSense
# DisableSmartScreen
DisableWebSearch
DisableAppSuggestions
DisableActivityHistory
DisableBackgroundApps
DisableLocationTracking
DisableMapUpdates
DisableFeedback
DisableTailoredExperiences
DisableAdvertisingID
DisableCortana
DisableErrorReporting
# SetP2PUpdateLocal
DisableDiagTrack
DisableWAPPush
# SetUACLow
# EnableSharingMappedDrives
DisableAdminShares
# DisableSMB1
# DisableSMBServer
# DisableLLMNR
SetCurrentNetworkPrivate
# SetUnknownNetworksPrivate
# DisableNetDevicesAutoInst
# EnableCtrldFolderAccess
# DisableFirewall
# DisableDefender
# DisableDefenderCloud
EnableF8BootMenu
SetDEPOptOut
# EnableCIMemoryIntegrity
DisableScriptHost
EnableDotNetStrongCrypto
# EnableMeltdownCompatFlag
# DisableUpdateMSRT
# DisableUpdateDriver
DisableUpdateRestart
# DisableHomeGroups
DisableSharedExperiences
DisableRemoteAssistance
EnableRemoteDesktop
DisableAutoplay
DisableAutorun
# EnableStorageSense
# DisableDefragmentation
# DisableSuperfetch
# DisableIndexing
# SetBIOSTimeUTC
# EnableHibernation
# DisableSleepButton
# DisableSleepTimeout
# DisableFastStartup
DisableActionCenter
DisableLockScreen
# DisableLockScreenRS1
HideNetworkFromLockScreen
HideShutdownFromLockScreen
DisableStickyKeys
ShowTaskManagerDetails
ShowFileOperationsDetails
# EnableFileDeleteConfirm
HideTaskbarSearch
HideTaskView
ShowSmallTaskbarIcons
SetTaskbarCombineWhenFull
HideTaskbarPeopleIcon
ShowTrayIcons
DisableSearchAppInStore
DisableNewAppPrompt
# SetControlPanelSmallIcons
SetVisualFXPerformance
# AddENKeyboard
# EnableNumlock
ShowKnownExtensions
ShowHiddenFiles
HideSyncNotifications
HideRecentShortcuts
SetExplorerThisPC
ShowThisPCOnDesktop
# ShowUserFolderOnDesktop
HideDesktopFromThisPC
# HideDesktopFromExplorer
HideDocumentsFromThisPC
# HideDocumentsFromExplorer
HideDownloadsFromThisPC
# HideDownloadsFromExplorer
HideMusicFromThisPC
# HideMusicFromExplorer
HidePicturesFromThisPC
# HidePicturesFromExplorer
HideVideosFromThisPC
# HideVideosFromExplorer
Hide3DObjectsFromThisPC
# Hide3DObjectsFromExplorer
# DisableThumbnails
DisableThumbsDB
DisableOneDrive
UninstallOneDrive
UninstallMsftBloat
UninstallThirdPartyBloat
# UninstallWindowsStore
DisableXboxFeatures
DisableAdobeFlash
# UninstallMediaPlayer
# UninstallInternetExplorer
# UninstallWorkFolders
# InstallLinuxSubsystem
# InstallHyperV
SetPhotoViewerAssociation
AddPhotoViewerOpenWith
# UninstallPDFPrinter
UninstallXPSPrinter
RemoveFaxPrinter
# HideServerManagerOnLogin
# DisableShutdownTracker
# DisablePasswordPolicy
# DisableCtrlAltDelLogin
# DisableIEEnhancedSecurity
# EnableAudio
# UnpinStartMenuTiles
# UnpinTaskbarIcons
WaitForKey
Restart

126
README.md
View File

@@ -1,14 +1,26 @@
## Contents
- [Description](#description)
- [Usage](#usage)
- [FAQ](#faq)
- [Windows builds overview](#windows-builds-overview)
- [Maintaining own forks](#maintaining-own-forks)
- [Contribution guidelines](#contribution-guidelines)
 
## Description
This is a PowerShell script for automation of routine tasks done after fresh installations of Windows 10 and Windows Server 2016. This is by no means any complete set of all existing Windows tweaks and neither is it another "antispying" type of script. It's simply a setting which I like to use and which in my opinion make the system less obtrusive.
This repository has been originally created as complementary to article <https://www.dasm.cz/clanek/jak-z-windows-10-udelat-desktopovy-system> (written in Czech) which explains the respective snippets a bit more in detail. The article was last updated on 2016-08-15 and will not be updated further. All development and discussion has been moved here.
&nbsp;
## Usage
If you just want to run the script with default preset, simply right click on the *Win10.ps1* file, choose *Run with PowerShell*, and confirm execution policy change. Make sure your account is a member of *Administrators* group as the script attempts to run with elevated privileges.
Alternatively copy also *Default.bat* and *Default.preset* along with the *Win10.ps1* file and then doubleclick on *Default.bat* to run it.
### Advanced usage
The script consists of separate functions, each of which contains one tweak. The functions can be grouped to *presets*. Preset is simply a list of function names which should be called. If you don't supply any specific preset, the default preset defined by `$tweaks` array in the beginning of the script will be applied. Any function which is not present or is commented in a preset will not be called, thus the corresponding tweak will not be applied. If you choose to fork the script and adjust the defaults instead of creating a customized preset file, then all you have to modify is the `$tweaks` array.
The script consists of separate functions, each of which contains one tweak. The functions can be grouped to *presets*. Preset is simply a list of function names which should be called. If you don't supply any specific preset, the default preset defined by `$tweaks` array in the beginning of the script will be applied. Any function which is not present or is commented in a preset will not be called, thus the corresponding tweak will not be applied.
To supply a customized preset, you can either pass the function names directly as parameters.
@@ -29,71 +41,141 @@ Command using the preset file above:
powershell.exe -NoProfile -ExecutionPolicy Bypass -File Win10.ps1 -preset mypreset.txt
For even more advanced usage, refer to section [Maintaining own forks](#maintaining-own-forks).
&nbsp;
## FAQ
**Q:** Can I run the script safely?
**A:** Definitely not. You have to understand what the functions do and what will be the implications for you if you run them. Some functions lower security, hide controls or uninstall applications. **If you're not sure what the script does, do not attempt to run it!**
**Q:** Can I run the script repeatedly?
**A:** Yes! In fact the script has been written to support exactly this as it's not uncommon that big Windows Updates reset some of the settings.
**A:** Yes! In fact the script has been written to support exactly that, as it's not uncommon that big Windows Updates reset some of the settings.
**Q:** Can I run the script in multi-user environment?
**A:** Yes, to certain extent. Some tweaks (most notably UI tweaks) are set only for the user currently executing the script. As stated above, the script can be run repeatedly; therefore it's possible to run it multiple times, each time as different user. Due to the nature of authentication and privilege escalation mechanisms in Windows, the script can be successfully applied only for users belonging to *Administrators* group. Standard users will get an UAC prompt asking for admin credentials which then causes the tweaks to be applied to the given admin account instead of the original non-privileged one. To circumvent this, add the standard user to the *Administrators* group, run the script, and then remove the user from *Administrators* group again. There are a few ways how the same functionality can be achieved programmatically, but I'm not planning to include any of them as it would negatively impact code complexity and readability. If you still wish to try to use the script in multi-user environment, check [this answer in issue #29](https://github.com/Disassembler0/Win10-Initial-Setup-Script/issues/29#issuecomment-333040591) for some pointers.
**Q:** Which versions and editions of Windows are supported?
**A:** The script aims to be fully compatible with the most up-to-date 64bit version of Windows 10 receiving updates from semi-annual channel, however if you create your own preset and exclude the incompatible tweaks, it will work also on LTSB/LTSC and possibly also on 32bit systems. Vast majority of the tweaks will work on all Windows editions. Some of them rely on group policy settings, so there may be a few limitations for Home and Education editions.
**Q:** Can I run the script on Windows Server 2016?
**A:** Yes. Starting from version 2.5, Windows Server 2016 is supported. There are even few tweaks specific to Server environment. Keep in mind though, that the script is still primarily designed for Windows 10, so you have to create your own preset for Windows Server 2016.
**Q:** Can I run the script on Windows 7, 8, 8.1 or other versions of Windows?
**A:** No. Although some tweaks may work also on older versions of Windows, the script is developed only for Windows 10 and Windows Server 2016. There are no plans to add support for older versions.
**A:** No. Although some tweaks may work also on older versions of Windows, the script is developed only for Windows 10 and Windows Server 2016. There are no plans to support older versions.
**Q:** Can I run the script in multi-user environment?
**A:** Yes, to certain extent. Some tweaks (most notably UI tweaks) are set only for the user currently executing the script. As stated above, the script can be run repeatedly; therefore it's possible to run it multiple times, each time as different user. Due to the nature of authentication and privilege escalation mechanisms in Windows, most of the tweaks can be successfully applied only by users belonging to *Administrators* group. Standard users will get an UAC prompt asking for admin credentials which then causes the tweaks to be applied to the given admin account instead of the original non-privileged one. There are a few ways how this can be circumvented programmatically, but I'm not planning to include any as it would negatively impact code complexity and readability. If you still wish to try to use the script in multi-user environment, check [this answer in issue #29](https://github.com/Disassembler0/Win10-Initial-Setup-Script/issues/29#issuecomment-333040591) for some pointers.
**Q:** Did you test the script?
**A:** Yes. I'm testing new additions on up-to-date Home and Enterprise editions in VMs. I'm also regularly using it for all my home installations after all bigger updates.
**A:** Yes. I'm testing new additions on up-to-date 64bit Home and Enterprise editions in VMs. I'm also regularly using it for all my home installations after all bigger updates.
**Q**: I've run the script and it did xxx, how can I undo it?
**A:** For every tweak, there is also a corresponding function which restores the default settings. The default is considered freshly installed Windows 10 or Windows Server 2016 with no adjustments made during or after the installation. Use the tweaks to create and run new preset. Alternatively, since most functions are just automation for actions which can be done using GUI, find appropriate control and modify it manually.
**A:** For every tweak, there is also a corresponding function which restores the default settings. The default is considered freshly installed Windows 10 or Windows Server 2016 with no adjustments made during or after the installation. Use the tweaks to create and run new preset. Alternatively, since some functions are just automation for actions which can be done using GUI, find appropriate control and modify it manually.
**Q:** I've run the script and it broke my computer / killed neighbor's dog / caused world war 3.
**A:** I don't care. Also, that's not a question.
**Q:** I'm using a tweak for xxx on my installation, can you add it?
**A:** Submit a PR or drop me a message. If I find the functionality simple, useful and not dependent on any 3rd party modules or executables, I might add it.
**Q:** I'm using a tweak for &lt;feature&gt; on my installation, can you add it?
**A:** Submit a PR, create a feature request issue or drop me a message. If I find the functionality simple, useful and not dependent on any 3rd party modules or executables (including also *Chocolatey*, *NuGet*, *Ninite* or other automation solutions), I might add it.
**Q:** Can I use the script or modify it for my / my company's needs?
**A:** Sure, knock yourself out. Just don't forget to include copyright notice as per MIT license requirements. I'd also suggest including a link to this GitHub repo as it's very likely that something will be changed, added or improved to keep track with future versions of Windows 10.
**Q:** Why are there repeated pieces of code throughout some functions?
**A:** So you can directly take the function block and use it elsewhere, without elaborating on any dependencies.
**A:** So you can directly take a function block or a line from within a function and use it elsewhere, without elaborating on any dependencies.
**Q:** For how long are you going to maintain the script?
**A:** As long as I use Windows 10.
**Q:** I really like the script. Is there any way to express gratitude and send donation?
**Q:** I really like the script. Is there any way to express gratitude and send a donation?
**A:** Feel free to send donations via [PayPal donation link](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=disassembler%40dasm%2ecz&item_name=Disassembler&no_shipping=1). Any amount is appreciated, just be aware that PayPal charges [mediation fees](https://www.paypal.com/selfhelp/article/FAQ690). Also be aware that donations are completely voluntary and I'm not obliged to make any script adjustments in your favor regardless of the donated amount.
&nbsp;
## Windows builds overview
| Version | Code name | Marketing name | Build |
| :-----: | ----------------------- | ---------------------- | :---: |
| 1507 | Threshold 1 (TH1 / RTM) | N/A | 10240 |
| 1511 | Threshold 2 (TH2) | November Update | 10586 |
| 1607 | Redstone 1 (RS1) | Anniversary Update | 14393 |
| 1703 | Redstone 2 (RS2) | Creators Update | 15063 |
| 1709 | Redstone 3 (RS3) | Fall Creators Update | 16299 |
| 1803 | Redstone 4 (RS4) | Spring Creators Update | 17133 |
&nbsp;
## Maintaining own forks
The easiest way how to customize the script settings it is to create your own preset file. For easy start, you can base it on the *Default.bat* and *Default.preset* and maintain just that. If you choose to fork the script anyway and adjust the defaults directly in the script instead, then all you have to modify is the `$tweaks` array in the beginning of the script. You don't need to comment or remove the actual functions, because if they are not called, they are not used.
If you wish to make more elaborate modifications and incorporate some personal tweaks or adjustments, the I suggest doing it in a following way:
1. Fork the repository on GitHub (obviously).
2. Clone your fork on your computer.
```
git clone https://github.com/<yournamehere>/Win10-Initial-Setup-Script
cd Win10-Initial-Setup-Script
```
3. Add the original repository as a remote.
```
git remote add upstream https://github.com/Disassembler0/Win10-Initial-Setup-Script
```
4. Commit your modifications as you see fit.
5. Once there are new additions in the upstream commited by me, create a temporary branch, fetch the changes and reset the branch to be identical with my repository.
```
git branch upstream
git checkout upstream
git fetch upstream
git reset --hard upstream/master
```
6. When you have the upstream branch up to date, check back your master and rebase it based on the upstream branch. If there are some conflicts between the changesets, you'll be asked to resolve them manually.
```
git checkout master
git rebase upstream
```
7. Eventually, delete the upstream branch and force push your changes back onto GitHub.
```
git branch -D upstream
git push -f master
```
**Word of warning:** Rebasing and force-pushing will change the history of your commits. The upside is that your adjustments will always stay on top of the commit history. The downside is that everybody remote-tracking your repository will always have to rebase and force-push too, otherwise their commit history will not match yours.
&nbsp;
## Contribution guidelines
Following is a list of rules which I'm trying to apply in this project. The rules are not binding and I accept pull requests even if they don't adhere to them, as long as their purpose and content are clear. In rare cases, when there are too many rule violations, I might simply redo the whole functionality and reject the PR (while still crediting you). If you'd like to make my work easier, please consider adhering to the following rules too.
Following is a list of rules which I'm trying to apply in this project. The rules are not binding and I accept pull requests even if they don't adhere to them, as long as their purpose and content are clear. In cases when there are too many rule violations, I might simply redo the whole functionality and reject the PR while still crediting you. If you'd like to make my work easier, please consider adhering to the following rules too.
### Function naming
Try to give a function a meaningful name up to 25 characters long, which gives away the purpose of the function. Use verbs like `Enable`/`Disable`, `Show`/`Hide`, `Install`/`Uninstall`, `Add`/`Remove` in the beginning of the function name. In case the function doesn't fit any of these verbs, come up with another name, beginning with the verb `Set`, which indicates what the function does, eg. `SetCurrentNetworkPrivate` and `SetCurrentNetworkPublic`.
Try to give a function a meaningful name up to 25 characters long, which gives away the purpose of the function. Use verbs like `Enable`/`Disable`, `Show`/`Hide`, `Install`/`Uninstall`, `Add`/`Remove` in the beginning of the function name. In case the function doesn't fit any of these verbs, come up with another name, beginning with the verb `Set`, which indicates what the function does, e.g. `SetCurrentNetworkPrivate` and `SetCurrentNetworkPublic`.
### Revert functions
Always add a function with opposite name (or equivalent) which reverts the behaviour to default. The default is considered freshly installed Windows 10 or Windows Server 2016 with no adjustments made during or after the installation. If you don't have access to either of these, create the revert function to the best of your knowledge and I will fill in the rest if necessary.
Always add a function with opposite name (or equivalent) which reverts the behavior to default. The default is considered freshly installed Windows 10 or Windows Server 2016 with no adjustments made during or after the installation. If you don't have access to either of these, create the revert function to the best of your knowledge and I will fill in the rest if necessary.
### Function similarities
Check if there isn't already a function with similar purpose as the one you are trying to add. As long as the name and objective of the existing function is unchanged, feel free to add your tweak to that function rather than creating a new one.
Check if there isn't already a function with similar purpose as the one you're trying to add. As long as the name and objective of the existing function is unchanged, feel free to add your tweak to that function rather than creating a new one.
### Function grouping
Try to group functions thematically. There are already five major groups (privacy, services, user interface, applications and server-specific), but even within these, some tweaks may be related to each other. In such case, add a new tweak below the existing one and not to the end of the whole group.
Try to group functions thematically. There are already several major groups (privacy, security, services etc.), but even within these, some tweaks may be related to each other. In such case, add a new tweak below the existing one and not to the end of the whole group.
### Default preset
Always add a reference to the tweak and its revert function in the `$tweaks` array containing the default set of tweaks. Add references to both functions on the same line (mind the quotes and commas) and always comment out the revert function. Whether to comment out also the tweak in the default preset is a matter of personal preference. The rule of thumb is that if the tweak makes the system faster, smoother, more secure and less obtrusive, it should be enabled by default. Usability has preference over performance (that's why e.g. indexing is kept enabled). Also don't forget to add the function references to all test files.
Always add a reference to the tweak and its revert function in the `$tweaks` array containing the default set of tweaks. Add references to both functions on the same line (mind the quotes and commas) and always comment out the revert function. Whether to comment out also the tweak in the default preset is a matter of personal preference. The rule of thumb is that if the tweak makes the system faster, smoother, more secure and less obtrusive, it should be enabled by default. Usability has preference over performance (that's why e.g. indexing is kept enabled). Also don't forget to add the function references to the *Default.preset* file.
### Repeatability
Unless applied on unsupported system, all functions have to be applicable repeatedly without any errors. When you're creating a registry key, always check first if the key doesn't happen to already exist. When you're deleting registry value, always append `-ErrorAction SilentlyContinue` to prevent errors while deleting already deleted values.
### Input / output hiding
Suppress all output generated by commands and cmdlets using `| Out-Null` or `-ErrorAction SilentlyContinue` where applicable. Whenever an input is needed, use appropriate parameters to suppress the prompt and programmatically provide values for the command to run (eg. using `-Confirm:$false`). The only acceptable output is from the `Write-Host` cmdlets in the beginning of each function and from non-suppressible cmdlets like `Remove-AppxPackage`.
Suppress all output generated by commands and cmdlets using `| Out-Null` or `-ErrorAction SilentlyContinue` where applicable. Whenever an input is needed, use appropriate parameters to suppress the prompt and programmatically provide values for the command to run (e.g. using `-Confirm:$false`). The only acceptable output is from the `Write-Output` cmdlets in the beginning of each function and from non-suppressible cmdlets like `Remove-AppxPackage`.
### Registry
Create the registry keys only if they don't exist on fresh installation if Windows 10 or Windows Server 2016. When deleting registry, delete only registry values, not the whole keys. When you're setting registry values, always use `Set-ItemProperty` instead of `New-ItemProperty`. When you're removing registry values, choose either `Set-ItemProperty` or `Remove-ItemProperty` to reinstate the same situation as it was on the clean installation. Again, if you don't know what the original state was, let me know in PR description and I will fill in the gaps. When you need to use `HKEY_USERS` registry hive, always add following snippet before the registry modification to ensure portability.
@@ -108,7 +190,7 @@ If (!(Test-Path "HKU:")) {
Star Wars jokes aside, don't use `-Force` parameter unless absolutely necessary. The only permitted case is when you're creating a new registry key (not a value) and you need to ensure that all parent keys will be created as well. In such case always check first if the key doesn't already exist, otherwise you will delete all its existing values.
### Comments
Always add a simple comment above the function briefly describing what the function does, especially if it has an ambiguous name or if there is some logic hidden under the hood. If you know that the tweak doesn't work on some editions of Windows 10 or on Windows Server, state it in the comment too. Add a `Write-Host` cmdlet with the short description of action also to the first line of the function body, so the user can see what is being executed and which function is the problematic one whenever an error occurs. The comment is written in present simple tense, the `Write-Host` in present continuous with ellipsis (resp. three dots) at the end.
Always add a simple comment above the function briefly describing what the function does, especially if it has an ambiguous name or if there is some logic hidden under the hood. If you know that the tweak doesn't work on some editions of Windows 10 or on Windows Server, state it in the comment too. Add a `Write-Output` cmdlet with the short description of action also to the first line of the function body, so the user can see what is being executed and which function is the problematic one whenever an error occurs. The comment is written in present simple tense, the `Write-Output` in present continuous with ellipsis (resp. three dots) at the end.
### Coding style
Indent using tabs, enclose all string values in double quotes (`"`) and strictly use `PascalCase` wherever possible. Put opening curly bracket on the same line as the function name or condition, but leave the closing bracket on a separate line for readability.
@@ -122,7 +204,7 @@ Indent using tabs, enclose all string values in double quotes (`"`) and strictly
```powershell
# Enable some feature
Function EnableSomeFeature {
Write-Host "Enabling some feature..."
Write-Output "Enabling some feature..."
If (!(Test-Path "HKLM:\Some\Registry\Key")) {
New-Item -Path "HKLM:\Some\Registry\Key" -Force | Out-Null
}
@@ -131,7 +213,7 @@ Function EnableSomeFeature {
# Disable some feature
Function DisableSomeFeature {
Write-Host "Disabling some feature..."
Write-Output "Disabling some feature..."
Remove-ItemProperty -Path "HKLM:\Some\Registry\Key" -Name "SomeValueName" -ErrorAction SilentlyContinue
}
```

1824
Win10.ps1

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +0,0 @@
@ECHO OFF
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "..\Win10.ps1" -preset "Win10-ApplyAll.preset"

View File

@@ -1,3 +0,0 @@
@ECHO OFF
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "..\Win10.ps1" -preset "Win10-RestoreAll.preset"

View File

@@ -1,122 +0,0 @@
# Windows 10 - Restore all
RequireAdmin
EnableTelemetry
EnableWiFiSense
EnableSmartScreen
EnableWebSearch
EnableAppSuggestions
EnableBackgroundApps
EnableLockScreenSpotlight
EnableLocationTracking
EnableMapUpdates
EnableFeedback
EnableAdvertisingID
EnableCortana
EnableErrorReporting
SetP2PUpdateInternet
EnableAutoLogger
EnableDiagTrack
EnableWAPPush
SetUACHigh
DisableSharingMappedDrives
EnableAdminShares
# EnableSMB1
SetCurrentNetworkPublic
SetUnknownNetworksPublic
EnableNetDevicesAutoInst
DisableCtrldFolderAccess
EnableFirewall
EnableDefender
EnableDefenderCloud
EnableUpdateMSRT
EnableUpdateDriver
EnableUpdateRestart
EnableHomeGroups
EnableSharedExperiences
EnableRemoteAssistance
DisableRemoteDesktop
EnableAutoplay
EnableAutorun
DisableStorageSense
EnableDefragmentation
EnableSuperfetch
EnableIndexing
SetBIOSTimeLocal
DisableHibernation
EnableSleepButton
EnableSleepTimeout
EnableFastStartup
EnableActionCenter
EnableLockScreen
EnableLockScreenRS1
ShowNetworkOnLockScreen
ShowShutdownOnLockScreen
EnableStickyKeys
HideTaskManagerDetails
HideFileOperationsDetails
DisableFileDeleteConfirm
ShowTaskbarSearchBox
ShowTaskView
ShowLargeTaskbarIcons
HideTaskbarTitles
ShowTaskbarPeopleIcon
HideTrayIcons
HideKnownExtensions
HideHiddenFiles
ShowSyncNotifications
ShowRecentShortcuts
SetExplorerQuickAccess
HideThisPCFromDesktop
HideUserFolderFromDesktop
ShowDesktopInThisPC
ShowDesktopInExplorer
ShowDocumentsInThisPC
ShowDocumentsInExplorer
ShowDownloadsInThisPC
ShowDownloadsInExplorer
ShowMusicInThisPC
ShowMusicInExplorer
ShowPicturesInThisPC
ShowPicturesInExplorer
ShowVideosInThisPC
ShowVideosInExplorer
Show3DObjectsInThisPC
Show3DObjectsInExplorer
SetControlPanelViewCategories
SetVisualFXAppearance
EnableThumbnails
EnableThumbsDB
RemoveENKeyboard
DisableNumlock
EnableOneDrive
InstallOneDrive
InstallMsftBloat
InstallThirdPartyBloat
InstallWindowsStore
EnableXboxFeatures
EnableAdobeFlash
InstallMediaPlayer
InstallWorkFolders
UninstallLinuxSubsystem
UninstallHyperV
UnsetPhotoViewerAssociation
RemovePhotoViewerOpenWith
EnableSearchAppInStore
EnableNewAppPrompt
DisableF8BootMenu
SetDEPOptIn
DisableMeltdownCompatFlag
# ShowServerManagerOnLogin
# EnableShutdownTracker
# EnablePasswordPolicy
# EnableCtrlAltDelLogin
# EnableIEEnhancedSecurity
WaitForKey
Restart

View File

@@ -1,3 +0,0 @@
@ECHO OFF
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "..\Win10.ps1" -preset "WinServer2016-ApplyAll.preset"

View File

@@ -1,125 +0,0 @@
# Windows Server 2016 - Apply all
RequireAdmin
DisableTelemetry
DisableWiFiSense
DisableSmartScreen
DisableWebSearch
DisableAppSuggestions
DisableBackgroundApps
DisableLockScreenSpotlight
DisableLocationTracking
DisableMapUpdates
DisableFeedback
DisableAdvertisingID
DisableCortana
DisableErrorReporting
SetP2PUpdateLocal
DisableAutoLogger
DisableDiagTrack
DisableWAPPush
SetUACLow
EnableSharingMappedDrives
DisableAdminShares
DisableSMB1
SetCurrentNetworkPrivate
SetUnknownNetworksPrivate
DisableNetDevicesAutoInst
# EnableCtrldFolderAccess
DisableFirewall
DisableDefender
DisableDefenderCloud
DisableUpdateMSRT
DisableUpdateDriver
DisableUpdateRestart
# DisableHomeGroups
# DisableSharedExperiences
# DisableRemoteAssistance
EnableRemoteDesktop
DisableAutoplay
DisableAutorun
# EnableStorageSense
DisableDefragmentation
# DisableSuperfetch
DisableIndexing
SetBIOSTimeUTC
EnableHibernation
DisableSleepButton
DisableSleepTimeout
DisableFastStartup
DisableActionCenter
DisableLockScreen
DisableLockScreenRS1
HideNetworkFromLockScreen
HideShutdownFromLockScreen
DisableStickyKeys
ShowTaskManagerDetails
ShowFileOperationsDetails
EnableFileDeleteConfirm
HideTaskbarSearchBox
HideTaskView
ShowSmallTaskbarIcons
ShowTaskbarTitles
HideTaskbarPeopleIcon
ShowTrayIcons
ShowKnownExtensions
ShowHiddenFiles
HideSyncNotifications
HideRecentShortcuts
SetExplorerThisPC
ShowThisPCOnDesktop
ShowUserFolderOnDesktop
HideDesktopFromThisPC
HideDesktopFromExplorer
HideDocumentsFromThisPC
HideDocumentsFromExplorer
HideDownloadsFromThisPC
HideDownloadsFromExplorer
HideMusicFromThisPC
HideMusicFromExplorer
HidePicturesFromThisPC
HidePicturesFromExplorer
HideVideosFromThisPC
HideVideosFromExplorer
Hide3DObjectsFromThisPC
Hide3DObjectsFromExplorer
SetControlPanelViewIcons
SetVisualFXPerformance
DisableThumbnails
DisableThumbsDB
AddENKeyboard
EnableNumlock
DisableOneDrive
# UninstallOneDrive
UninstallMsftBloat
UninstallThirdPartyBloat
UninstallWindowsStore
DisableXboxFeatures
DisableAdobeFlash
UninstallMediaPlayer
# UninstallWorkFolders
# InstallLinuxSubsystem
InstallHyperV
SetPhotoViewerAssociation
AddPhotoViewerOpenWith
DisableSearchAppInStore
DisableNewAppPrompt
EnableF8BootMenu
SetDEPOptOut
EnableMeltdownCompatFlag
HideServerManagerOnLogin
DisableShutdownTracker
DisablePasswordPolicy
DisableCtrlAltDelLogin
DisableIEEnhancedSecurity
# UnpinStartMenuTiles
UnpinTaskbarIcons
WaitForKey
Restart

View File

@@ -1,3 +0,0 @@
@ECHO OFF
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "..\Win10.ps1" -preset "WinServer2016-RestoreAll.preset"

View File

@@ -1,122 +0,0 @@
# Windows Server 2016 - Restore all
RequireAdmin
EnableTelemetry
EnableWiFiSense
EnableSmartScreen
EnableWebSearch
EnableAppSuggestions
EnableBackgroundApps
EnableLockScreenSpotlight
EnableLocationTracking
EnableMapUpdates
EnableFeedback
EnableAdvertisingID
EnableCortana
EnableErrorReporting
SetP2PUpdateInternet
EnableAutoLogger
EnableDiagTrack
EnableWAPPush
SetUACHigh
DisableSharingMappedDrives
EnableAdminShares
EnableSMB1
SetCurrentNetworkPublic
SetUnknownNetworksPublic
EnableNetDevicesAutoInst
# DisableCtrldFolderAccess
EnableFirewall
EnableDefender
EnableDefenderCloud
EnableUpdateMSRT
EnableUpdateDriver
EnableUpdateRestart
# EnableHomeGroups
# EnableSharedExperiences
# EnableRemoteAssistance
DisableRemoteDesktop
EnableAutoplay
EnableAutorun
# DisableStorageSense
EnableDefragmentation
# EnableSuperfetch
EnableIndexing
SetBIOSTimeLocal
DisableHibernation
EnableSleepButton
EnableSleepTimeout
EnableFastStartup
EnableActionCenter
EnableLockScreen
EnableLockScreenRS1
ShowNetworkOnLockScreen
ShowShutdownOnLockScreen
EnableStickyKeys
HideTaskManagerDetails
HideFileOperationsDetails
DisableFileDeleteConfirm
ShowTaskbarSearchBox
ShowTaskView
ShowLargeTaskbarIcons
HideTaskbarTitles
ShowTaskbarPeopleIcon
HideTrayIcons
HideKnownExtensions
HideHiddenFiles
ShowSyncNotifications
ShowRecentShortcuts
SetExplorerQuickAccess
HideThisPCFromDesktop
HideUserFolderFromDesktop
ShowDesktopInThisPC
ShowDesktopInExplorer
ShowDocumentsInThisPC
ShowDocumentsInExplorer
ShowDownloadsInThisPC
ShowDownloadsInExplorer
ShowMusicInThisPC
ShowMusicInExplorer
ShowPicturesInThisPC
ShowPicturesInExplorer
ShowVideosInThisPC
ShowVideosInExplorer
Show3DObjectsInThisPC
Show3DObjectsInExplorer
SetControlPanelViewCategories
SetVisualFXAppearance
EnableThumbnails
EnableThumbsDB
RemoveENKeyboard
DisableNumlock
EnableOneDrive
# InstallOneDrive
InstallMsftBloat
InstallThirdPartyBloat
InstallWindowsStore
EnableXboxFeatures
EnableAdobeFlash
InstallMediaPlayer
# InstallWorkFolders
# UninstallLinuxSubsystem
UninstallHyperV
UnsetPhotoViewerAssociation
RemovePhotoViewerOpenWith
EnableSearchAppInStore
EnableNewAppPrompt
DisableF8BootMenu
SetDEPOptIn
DisableMeltdownCompatFlag
ShowServerManagerOnLogin
EnableShutdownTracker
EnablePasswordPolicy
EnableCtrlAltDelLogin
EnableIEEnhancedSecurity
WaitForKey
Restart