47 Commits
3.1 ... 3.6

Author SHA1 Message Date
Disassembler
f49b932407 v3.6, 2019-01-28
- Add "Disable IE first run wizard" (thx @sippi90)
 - Add "Disable Modern UI swap file" (thx gtein)
 - Add "Disable enhanced pointer precision"
 - Add "Enable clearing of recent files on exit" (thx @r3incarnat0r)
 - Add "Disable recent files lists" (thx @r3incarnat0r)
 - Reimplement HideMostUsedApps using GPO (thx @r3incarnat0r)
 - *BREAKING* Removed HideRecentJumplists (superseded by DisableRecentFiles)
 - Update UninstallMsftBloat to not remove Snipping tool
 - Update DisableTelemetry to not report KMS client activation data (thx @wallrik)
 - Fix main execution loop when the script is called by another PowerShell process
2019-01-28 15:22:29 +01:00
Disassembler
159626f45b Add "Disable enhanced pointer precision" 2019-01-27 23:17:15 +01:00
r3incarnat0r
3b582a1f59 Add tweaks for disabling and cleanup of recent items (#159)
- Add "EnableClearRecentFiles" for cleanup on every logout
- Add "DisableRecentFiles" to not create MRU lists at all
- Add previously removed "HideMostUsedApps", this time via GPO
- Removed HideRecentJumplists (superseded by DisableRecentFiles)
2019-01-27 21:55:37 +01:00
Disassembler
53058b1322 Update DisableTelemetry to not report KMS client activation data, closes #195 (thx @wallrik) 2019-01-27 14:55:11 +01:00
Disassembler
031848fcb9 Add "Disable Modern UI swap file", closes #190 (thx gtein) 2019-01-27 14:13:07 +01:00
Disassembler
e9d329f3d2 Use script scope instead of global for preset compilation, fixes #196 2019-01-19 10:25:21 +01:00
Disassembler
7062510cc1 Don't remove Screen Sketch as it replaces Snipping tool, closes #193 2019-01-09 23:57:51 +01:00
sippi90
0f26a47e0d Add "Disable IE first run wizard" (#189) 2018-12-26 22:16:28 +01:00
Disassembler
95c66ecf21 v3.5, 2018-12-23
- Fix "DisableUpdateDriver" to not block driver installation entirely (thx Nick for pointing this out)
 - Fix "HideShortcutArrow" to not show black squares over the icons (thx @Ozgood for helping me debug)
2018-12-23 17:09:31 +01:00
Disassembler
6ce0765a03 Update "HideShortcutArrow" to use RGBA icon, closes for #186 2018-12-22 14:22:34 +01:00
Disassembler
12c2c533d5 Revert "Update "DisableUpdateDriver" to add one more GPO, closes #178 (thx @kukubau)"
This reverts commit daa5da122e.
2018-12-21 09:30:00 +01:00
Disassembler
8c9053cabc Update "HideShortcutArrow" to restart explorer process, tryfix for #186 2018-12-19 22:53:27 +01:00
Disassembler
9365a3a013 v3.4, 2018-12-19
- Add more bloatware for removal (thx @r3incarnat0r, @mhujer)
 - Add "Hide shortcut icon arrow"
 - Add "Show Control panel shortcut on desktop" (thx @Win10debloater)
 - Add "Enable window title bar color" (thx @scruel)
 - Add "Disable Edge preload after Windows startup" (thx Nick)
 - Update "DisableBackgroundApps" to properly show toasts and notifications
 - Update "DisableActivityHistory" to fix problems caused by disabled CDP user service
 - Update "DisableUpdateDriver" to add one more GPO (thx @kukubau)
2018-12-19 19:06:10 +01:00
Disassembler
24a1c79d58 Update "HideShortcutArrow" to clean icon cache
Prevents black squares showing in place of arrows
2018-12-19 18:47:04 +01:00
Disassembler
9b765a694d Reorder ShowControlPanelOnDesktop (no functional changes) 2018-12-19 18:15:58 +01:00
Disassembler
c67227992a Change all "Dword" to "DWord" (No functional changes) 2018-12-17 15:19:17 +01:00
Disassembler
8069d87266 Add "Disable Edge preload after Windows startup", closes #184 (thx Nick) 2018-12-17 15:13:18 +01:00
Disassembler
abe812ace0 Reimplement "Enable window title bar color", closes #162 (thx @scruel) 2018-12-17 14:02:07 +01:00
Disassembler
aef24a75a8 Properly PascalCase ShowControlPanelOnDesktop name and comment in default preset 2018-12-17 13:44:23 +01:00
Win10debloater
2ab1f27eeb Show Control panel shortcut on desktop (#183) 2018-12-17 13:42:57 +01:00
Disassembler
daa5da122e Update "DisableUpdateDriver" to add one more GPO, closes #178 (thx @kukubau) 2018-12-17 13:36:01 +01:00
Martin Hujer
9d4a14c55a UninstallThirdPartyBloat: also remove Fitbit.FitbitCoach (#175) 2018-11-18 05:18:33 +01:00
Disassembler
494409c3cb Use modern method of determining server/workstation, closes #168 2018-11-15 09:22:13 +01:00
Disassembler
50e9804974 Revert "Update DisableActivityHistory to disable CDP user service". Fixes #170, #172
This reverts commit 08ce664a37.
2018-11-15 08:36:42 +01:00
Varghese Jacob
1b38a82c88 Fix "HKCU:\Software" case, no functional changes (#167) 2018-11-06 13:21:33 +01:00
Disassembler
dc30f4b8c2 Update DisableBackgroundApps to properly show toasts and notifications, closes #164 2018-10-28 11:42:07 +01:00
Disassembler
5b2333ba35 Add "Hide shortcut icon arrow" 2018-10-23 22:19:08 +02:00
r3incarnat0r
6786ed78b5 Add more MS bloatware for removal (#158) 2018-10-23 08:06:03 +02:00
Disassembler
f830a46fa9 v3.3, 2018-10-22, Tweak exclusion support added
- Add option to remove tweaks from selection (see advanced usage)
 - Add "Enable Dark Theme" (thx @DaniloNC)
 - Update DisableActivityHistory to disable CDP user service
 - Minor description updates in comments
2018-10-22 17:38:55 +02:00
Milos Svasek
544e15aefc Fixing ShowDefenderTrayIcon function name (#157) 2018-10-22 14:18:29 +02:00
r3incarnat0r
436e708a1f Unified quotes (#155) 2018-10-18 05:26:20 +02:00
Conder000
e4a24bf83d Update description for DisableAutoRebootOnCrash and DisableActionCenter (#154) 2018-10-14 07:44:32 +02:00
Disassembler
771a32db0d Update PayPal link 2018-10-12 19:43:03 +02:00
Disassembler
5ccc376764 Add option to remove tweaks from selection, closes #152
also kinda related to #81 and #99
2018-10-12 18:57:15 +02:00
Disassembler
ef8b490da8 Simplify registry operations in DisableAppSuggestions and UnpinStartMenuTiles, related to #148 2018-10-11 07:11:18 +02:00
Disassembler
08ce664a37 Update DisableActivityHistory to disable CDP user service, closes #149 2018-10-10 15:48:32 +02:00
Disassembler
c511b60739 Add "Enable Dark Theme", closes #150 (thx @DaniloNC) 2018-10-10 08:25:36 +02:00
Disassembler
27157fef8f v3.2, 2018-10-08, Server 2019 support added
- Add "Hide Windows Defender SysTray icon" (thx @sippi90)
 - Revert DisableSharedExperiences to safer non-GPO variant
 - Update DisableAppSuggestions to hide suggestions in settings
 - Update DisableAppSuggestions to purge and reload tile cache
 - Update UnpinStartMenuTiles to reload tile cache
 - Update EnableStorageSense to set only the necessary values
 - Update documentation and comments to announce Server 2019 support
2018-10-08 22:05:19 +02:00
Disassembler
9e4ad4215b Revert DisableSharedExperiences to non-GPO variant, closes #145
Reverts commit 98e106b78a
2018-10-08 22:04:45 +02:00
Disassembler
baa547cbd8 Update UnpinStartMenuTiles to purge tile cache 2018-10-08 21:45:30 +02:00
Disassembler
503b1a2826 Update DisableAppSuggestions to purge tile cache, related to #145 2018-10-08 21:45:00 +02:00
Disassembler
3a0ff06a81 Add "Hide Windows Defender SysTray icon", salvaged from #146 (thx @sippi90) 2018-10-08 16:44:02 +02:00
Disassembler
0438564bfe Remove extra values in EnableStorageSense, see #143 2018-10-08 16:16:24 +02:00
Disassembler
0d15efc24d Update DisableAppSuggestions to hide suggestions in settings 2018-10-06 16:18:54 +02:00
Disassembler
db2c2d54d9 Add note about InstallLinuxSubsystem Server applicability 2018-10-04 23:04:29 +02:00
Disassembler
efb89f42c2 Update note about DisableSuperfetch Server applicability 2018-10-04 22:55:46 +02:00
Disassembler
4d28393ac0 Add note about DefenderAppGuard Server applicability 2018-10-04 22:41:30 +02:00
4 changed files with 457 additions and 227 deletions

View File

@@ -1,7 +1,7 @@
##########
# Win10 / WinServer2016 Initial Setup Script - Default preset
# Win 10 / Server 2016 / Server 2019 Initial Setup Script - Default preset
# Author: Disassembler <disassembler@dasm.cz>
# Version: v3.1, 2018-10-04
# Version: v3.6, 2019-01-28
# Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
##########
@@ -27,7 +27,8 @@ DisableErrorReporting # EnableErrorReporting
# SetP2PUpdateLocal # SetP2PUpdateInternet # SetP2PUpdateDisable
DisableDiagTrack # EnableDiagTrack
DisableWAPPush # EnableWAPPush
# HideRecentJumplists # ShowRecentJumplists
# EnableClearRecentFiles # DisableClearRecentFiles
# DisableRecentFiles # EnableRecentFiles
### Security Tweaks ###
# SetUACLow # SetUACHigh
@@ -41,6 +42,7 @@ SetCurrentNetworkPrivate # SetCurrentNetworkPublic
# SetUnknownNetworksPrivate # SetUnknownNetworksPublic
# DisableNetDevicesAutoInst # EnableNetDevicesAutoInst
# DisableFirewall # EnableFirewall
# HideDefenderTrayIcon # ShowDefenderTrayIcon
# DisableDefender # EnableDefender
# DisableDefenderCloud # EnableDefenderCloud
# EnableCtrldFolderAccess # DisableCtrldFolderAccess
@@ -71,6 +73,7 @@ DisableAutorun # EnableAutorun
# DisableDefragmentation # EnableDefragmentation
# DisableSuperfetch # EnableSuperfetch
# DisableIndexing # EnableIndexing
# DisableSwapFile # EnableSwapFile
# DisableNTFSLastAccess # EnableNTFSLastAccess
# SetBIOSTimeUTC # SetBIOSTimeLocal
# EnableHibernation # DisableHibernation
@@ -99,11 +102,16 @@ ShowTrayIcons # HideTrayIcons
DisableSearchAppInStore # EnableSearchAppInStore
DisableNewAppPrompt # EnableNewAppPrompt
# HideRecentlyAddedApps # ShowRecentlyAddedApps
# HideMostUsedApps # ShowMostUsedApps
# SetControlPanelSmallIcons # SetControlPanelLargeIcons # SetControlPanelCategories
DisableShortcutInName # EnableShortcutInName
# HideShortcutArrow # ShowShortcutArrow
SetVisualFXPerformance # SetVisualFXAppearance
# EnableTitleBarColor # DisableTitleBarColor
# EnableDarkTheme # DisableDarkTheme
# AddENKeyboard # RemoveENKeyboard
# EnableNumlock # DisableNumlock
# DisableEnhPointerPrecision # EnableEnhPointerPrecision
# SetSoundSchemeNone # SetSoundSchemeDefault
# DisableStartupSound # EnableStartupSound
# DisableChangingSoundScheme # EnableChangingSoundScheme
@@ -122,6 +130,7 @@ SetExplorerThisPC # SetExplorerQuickAccess
HideQuickAccess # ShowQuickAccess
ShowThisPCOnDesktop # HideThisPCFromDesktop
# ShowUserFolderOnDesktop # HideUserFolderFromDesktop
# ShowControlPanelOnDesktop # HideControlPanelFromDesktop
HideDesktopFromThisPC # ShowDesktopInThisPC
# HideDesktopFromExplorer # ShowDesktopInExplorer
HideDocumentsFromThisPC # ShowDocumentsInThisPC
@@ -151,7 +160,9 @@ UninstallThirdPartyBloat # InstallThirdPartyBloat
# UninstallWindowsStore # InstallWindowsStore
DisableXboxFeatures # EnableXboxFeatures
DisableAdobeFlash # EnableAdobeFlash
DisableEdgePreload # EnableEdgePreload
DisableEdgeShortcutCreation # EnableEdgeShortcutCreation
DisableIEFirstRun # EnableIEFirstRun
# UninstallMediaPlayer # InstallMediaPlayer
# UninstallInternetExplorer # InstallInternetExplorer
# UninstallWorkFolders # InstallWorkFolders

View File

@@ -11,7 +11,7 @@
## 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 is a PowerShell script for automation of routine tasks done after fresh installations of Windows 10 and Windows Server 2016 / 2019. 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.
&nbsp;
@@ -33,11 +33,11 @@ The script supports command line options and parameters which can help you custo
**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 Server 2016 or 2019?
**A:** Yes. Starting from version 2.5, Windows Server 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.
**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 support 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 / 2019. 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.
@@ -66,8 +66,8 @@ The script supports command line options and parameters which can help you custo
**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 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.
**Q:** I really like the script. Can I send a donation?
**A:** Feel free to send donations via [PayPal](https://www.paypal.me/Disassembler). Any amount is appreciated, but keep in mind that donations are completely voluntary and I'm not obliged to make any script adjustments in your favor regardless of the donated amount. You can also drop me a mail to discuss an alternative way.
&nbsp;
@@ -87,16 +87,19 @@ The script supports command line options and parameters which can help you custo
## Advanced usage
powershell.exe -NoProfile -ExecutionPolicy Bypass -File Win10.ps1 [-include filename] [-preset filename] [tweakname]
powershell.exe -NoProfile -ExecutionPolicy Bypass -File Win10.ps1 [-include filename] [-preset filename] [[!]tweakname]
-include filename load module with user-defined tweaks
-preset filename load preset with tweak names to apply
tweakname apply tweak with this particular name
!tweakname remove tweak with this particular name from selection
### Presets
The tweak library consists of separate idempotent functions, containing one tweak each. The functions can be grouped to *presets*. Preset is simply a list of function names which should be called. Any function which is not present or is commented in a preset will not be called, thus the corresponding tweak will not be applied. In order for the script to do something, you need to supply at least one tweak library via `-include` and at least one tweak name, either via `-preset` or directly as command line argument.
The tweak names can be prefixed with exclamation mark (`!`) which will instead cause the tweak to be removed from selection. This is useful in cases when you want to apply the whole preset, but omit a few specific tweaks in the current run. Alternatively, you can have a preset which "patches" another preset by adding and removing a small amount of tweaks.
To supply a customized preset, you can either pass the function names directly as arguments.
powershell.exe -NoProfile -ExecutionPolicy Bypass -File Win10.ps1 -include Win10.psm1 EnableFirewall EnableDefender
@@ -110,7 +113,7 @@ Example of a preset file `mypreset.txt`:
# UI tweaks
ShowKnownExtensions
ShowHiddenFiles # Only hidden, not system
ShowHiddenFiles # Only hidden, not system
Command using the preset file above:
@@ -142,9 +145,9 @@ Command using the script above:
All features described above can be combined. You can have a preset which includes both tweaks from the original script and your personal ones. Both `-include` and `-preset` options can be used more than once, so you can split your tweaks into groups and then combine them based on your current needs. The `-include` modules are always imported before the first tweak is applied, so the order of the command line parameters doesn't matter and neither does the order of the tweaks (except for `RequireAdmin`, which should always be called first and `Restart`, which should be always called last). It can happen that some tweaks are applied more than once during a singe run because you have them in multiple presets. That shouldn't cause any problems as the tweaks are idempotent.
Example of a preset file `otherpreset.txt`:
InstallLinuxSubsystem
MyTweak1
MyTweak2
!ShowHiddenFiles # Will remove the tweak from selection
WaitForKey
Command using all three examples combined:
@@ -209,7 +212,7 @@ Following is a list of rules which I'm trying to apply in this project. The rule
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 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.
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 / 2019 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'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.
@@ -227,7 +230,7 @@ Unless applied on unsupported system, all functions have to be applicable repeat
Suppress all output generated by commands and cmdlets using `| Out-Null` or `-ErrorAction SilentlyContinue` where applicable. Whenever an input is needed, use appropriate arguments 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.
Create the registry keys only if they don't exist on fresh installation if Windows 10 or Windows Server 2016 / 2019. 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.
```powershell
If (!(Test-Path "HKU:")) {

View File

@@ -1,7 +1,7 @@
##########
# Win10 / WinServer2016 Initial Setup Script - Main execution loop
# Win 10 / Server 2016 / Server 2019 Initial Setup Script - Main execution loop
# Author: Disassembler <disassembler@dasm.cz>
# Version: v3.1, 2018-10-04
# Version: v3.6, 2019-01-28
# Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
##########
@@ -16,6 +16,16 @@ Function RequireAdmin {
$tweaks = @()
$PSCommandArgs = @()
Function AddOrRemoveTweak($tweak) {
If ($tweak[0] -eq "!") {
# If the name starts with exclamation mark (!), exclude the tweak from selection
$script:tweaks = $script:tweaks | Where-Object { $_ -ne $tweak.Substring(1) }
} ElseIf ($tweak -ne "") {
# Otherwise add the tweak
$script:tweaks += $tweak
}
}
# Parse and resolve paths in passed arguments
$i = 0
While ($i -lt $args.Length) {
@@ -30,11 +40,11 @@ While ($i -lt $args.Length) {
$preset = Resolve-Path $args[++$i]
$PSCommandArgs += "-preset `"$preset`""
# Load tweak names from the preset file
$tweaks += Get-Content $preset -ErrorAction Stop | ForEach-Object { $_.Split("#")[0].Trim() } | Where-Object { $_ -ne "" }
Get-Content $preset -ErrorAction Stop | ForEach-Object { AddOrRemoveTweak($_.Split("#")[0].Trim()) }
} Else {
$PSCommandArgs += $args[$i]
# Load tweak names from command line
$tweaks += $args[$i]
AddOrRemoveTweak($args[$i])
}
$i++
}

File diff suppressed because it is too large Load Diff