mirror of
https://github.com/Disassembler0/Win10-Initial-Setup-Script.git
synced 2026-01-12 07:28:29 -05:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60c9237983 | ||
|
|
6cdfc3292d | ||
|
|
d5bb4a6782 | ||
|
|
7df79cac16 | ||
|
|
f3afde4551 | ||
|
|
db7356151c | ||
|
|
e12cb11a0c |
@@ -5,7 +5,7 @@ This is a PowerShell script for automation of routine tasks done after fresh ins
|
||||
This repository has been originaly 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.
|
||||
|
||||
## 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.
|
||||
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.
|
||||
|
||||
### Advanced usage
|
||||
The script supports customized presets where you can specify which tweaks should be applied. You can either pass the function names directly as parameters.
|
||||
@@ -22,6 +22,9 @@ Or you can create a file where you write the function names (one function per li
|
||||
**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.
|
||||
|
||||
**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.
|
||||
|
||||
**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.
|
||||
|
||||
|
||||
512
Win10.ps1
512
Win10.ps1
@@ -1,7 +1,7 @@
|
||||
##########
|
||||
# Win10 Initial Setup Script
|
||||
# Author: Disassembler <disassembler@dasm.cz>
|
||||
# Version: 2.0, 2017-01-08
|
||||
# Version: 2.2, 2017-04-08
|
||||
##########
|
||||
|
||||
# Ask for elevated permissions if required
|
||||
@@ -12,68 +12,81 @@ If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:
|
||||
|
||||
# Default preset
|
||||
$preset = @(
|
||||
"DisableTelemetry",
|
||||
"DisableWiFiSense",
|
||||
"DisableSmartScreen",
|
||||
"DisableWebSearch",
|
||||
"DisableStartSuggestions",
|
||||
"DisableLocationTracking",
|
||||
"DisableFeedback",
|
||||
"DisableAdvertisingID",
|
||||
"DisableCortana",
|
||||
"DisableErrorReporting",
|
||||
"RestrictUpdateP2P",
|
||||
"DisableAutoLogger",
|
||||
"DisableDiagTrack",
|
||||
"DisableWAPPush",
|
||||
### Privacy Settings ###
|
||||
"DisableTelemetry", # "EnableTelemetry",
|
||||
"DisableWiFiSense", # "EnableWiFiSense",
|
||||
# "DisableSmartScreen", # "EnableSmartScreen",
|
||||
"DisableWebSearch", # "EnableWebSearch",
|
||||
"DisableStartSuggestions", # "EnableStartSuggestions",
|
||||
"DisableLocationTracking", # "EnableLocationTracking",
|
||||
"DisableFeedback", # "EnableFeedback",
|
||||
"DisableAdvertisingID", # "EnableAdvertisingID",
|
||||
"DisableCortana", # "EnableCortana",
|
||||
"DisableErrorReporting", # "EnableErrorReporting",
|
||||
"RestrictUpdateP2P", # "UnrestrictUpdateP2P",
|
||||
"DisableAutoLogger", # "EnableAutoLogger",
|
||||
"DisableDiagTrack", # "EnableDiagTrack",
|
||||
"DisableWAPPush", # "EnableWAPPush",
|
||||
|
||||
# "LowerUAC",
|
||||
# "EnableSharingMappedDrives",
|
||||
"DisableAdminShares",
|
||||
"DisableFirewall",
|
||||
# "DisableDefender",
|
||||
# "DisableUpdateMSRT",
|
||||
# "DisableUpdateDriver",
|
||||
"DisableUpdateRestart",
|
||||
"DisableHomeGroups",
|
||||
"DisableRemoteAssistance",
|
||||
"EnableRemoteDesktop",
|
||||
### Service Tweaks ###
|
||||
# "LowerUAC", # "RaiseUAC",
|
||||
# "EnableSharingMappedDrives", # "DisableSharingMappedDrives",
|
||||
"DisableAdminShares", # "EnableAdminShares",
|
||||
# "DisableFirewall", # "EnableFirewall",
|
||||
# "DisableDefender", # "EnableDefender",
|
||||
# "DisableUpdateMSRT", # "EnableUpdateMSRT",
|
||||
# "DisableUpdateDriver", # "EnableUpdateDriver",
|
||||
"DisableUpdateRestart", # "EnableUpdateRestart",
|
||||
"DisableHomeGroups", # "EnableHomeGroups",
|
||||
"DisableRemoteAssistance", # "EnableRemoteAssistance",
|
||||
"EnableRemoteDesktop", # "DisableRemoteDesktop",
|
||||
"DisableAutoplay", # "EnableAutoplay",
|
||||
"DisableAutorun", # "EnableAutorun",
|
||||
# "DisableDefragmentation", # "EnableDefragmentation",
|
||||
# "SetBIOSTimeUTC", # "SetBIOSTimeLocal",
|
||||
|
||||
"DisableActionCenter",
|
||||
"DisableLockScreen",
|
||||
# "DisableLockScreenWorkaround",
|
||||
"DisableAutoplay",
|
||||
"DisableAutorun",
|
||||
"DisableStickyKeys",
|
||||
"HideTaskbarSearchBox",
|
||||
"HideTaskView",
|
||||
"ShowSmallTaskbarIcons",
|
||||
"ShowTaskbarTitles",
|
||||
"ShowTrayIcons",
|
||||
"ShowKnownExtensions",
|
||||
"ShowHiddenFiles",
|
||||
"ExplorerThisPC",
|
||||
"ShowThisPCOnDesktop",
|
||||
"HideDesktopFromThisPC",
|
||||
"HideDocumentsFromThisPC",
|
||||
"HideDownloadsFromThisPC",
|
||||
"HideMusicFromThisPC",
|
||||
"HidePicturesFromThisPC",
|
||||
"HideVideosFromThisPC",
|
||||
# "AddENKeyboard",
|
||||
# "EnableNumlock",
|
||||
### UI Tweaks ###
|
||||
"DisableActionCenter", # "EnableActionCenter",
|
||||
"DisableLockScreen", # "EnableLockScreen",
|
||||
# "DisableLockScreenRS1", # "EnableLockScreenRS1",
|
||||
"DisableStickyKeys", # "EnableStickyKeys",
|
||||
"ShowFileOperationsDetails", # "HideFileOperationsDetails",
|
||||
"HideTaskbarSearchBox", # "ShowTaskbarSearchBox",
|
||||
"HideTaskView", # "ShowTaskView",
|
||||
"ShowSmallTaskbarIcons", # "ShowLargeTaskbarIcons",
|
||||
"ShowTaskbarTitles", # "HideTaskbarTitles",
|
||||
"ShowTrayIcons", # "HideTrayIcons",
|
||||
"ShowKnownExtensions", # "HideKnownExtensions",
|
||||
"ShowHiddenFiles", # "HideHiddenFiles",
|
||||
"HideSyncNotifications" # "ShowSyncNotifications"
|
||||
"ExplorerThisPC", # "ExplorerQuickAccess",
|
||||
"ShowThisPCOnDesktop", # "HideThisPCFromDesktop",
|
||||
"HideDesktopFromThisPC", # "ShowDesktopInThisPC",
|
||||
"HideDocumentsFromThisPC", # "ShowDocumentsInThisPC",
|
||||
"HideDownloadsFromThisPC", # "ShowDownloadsInThisPC",
|
||||
"HideMusicFromThisPC", # "ShowMusicInThisPC",
|
||||
"HidePicturesFromThisPC", # "ShowPicturesInThisPC",
|
||||
"HideVideosFromThisPC", # "ShowVideosInThisPC",
|
||||
# "AddENKeyboard", # "RemoveENKeyboard",
|
||||
# "EnableNumlock", # "DisableNumlock",
|
||||
|
||||
"DisableOneDrive",
|
||||
"UninstallOneDrive",
|
||||
"UninstallBloatware",
|
||||
"DisableXboxDVR",
|
||||
# "UninstallMediaPlayer",
|
||||
# "UninstallWorkFolders",
|
||||
# "InstallLinuxSubsystem",
|
||||
"SetPhotoViewerAssociation",
|
||||
"AddPhotoViewerOpenWith",
|
||||
"EnableF8BootMenu",
|
||||
### Application Tweaks ###
|
||||
"DisableOneDrive", # "EnableOneDrive",
|
||||
"UninstallOneDrive", # "InstallOneDrive",
|
||||
"UninstallBloatware", # "InstallBloatware",
|
||||
# "UninstallWindowsStore", # "InstallWindowsStore",
|
||||
"DisableConsumerApps", # "EnableConsumerApps",
|
||||
"DisableXboxFeatures", # "EnableXboxFeatures",
|
||||
# "UninstallMediaPlayer", # "InstallMediaPlayer",
|
||||
# "UninstallWorkFolders", # "InstallWorkFolders",
|
||||
# "InstallLinuxSubsystem", # "UninstallLinuxSubsystem",
|
||||
"SetPhotoViewerAssociation", # "UnsetPhotoViewerAssociation",
|
||||
"AddPhotoViewerOpenWith", # "RemovePhotoViewerOpenWith",
|
||||
"DisableSearchAppInStore", # "EnableSearchAppInStore",
|
||||
"DisableNewAppPrompt", # "EnableNewAppPrompt",
|
||||
"EnableF8BootMenu", # "DisableF8BootMenu",
|
||||
|
||||
### Auxiliary Functions ###
|
||||
"WaitForKey",
|
||||
"Restart"
|
||||
)
|
||||
@@ -130,13 +143,22 @@ Function DisableSmartScreen {
|
||||
Write-Host "Disabling SmartScreen Filter..."
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" -Name "SmartScreenEnabled" -Type String -Value "Off"
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost" -Name "EnableWebContentEvaluation" -Type DWord -Value 0
|
||||
$edge = (Get-AppxPackage -AllUsers "Microsoft.MicrosoftEdge").PackageFamilyName
|
||||
If (!(Test-Path "HKCU:\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\$edge\MicrosoftEdge\PhishingFilter")) {
|
||||
New-Item -Path "HKCU:\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\$edge\MicrosoftEdge\PhishingFilter" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\$edge\MicrosoftEdge\PhishingFilter" -Name "EnabledV9" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\$edge\MicrosoftEdge\PhishingFilter" -Name "PreventOverride" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Enable SmartScreen Filter
|
||||
Function EnableSmartScreen {
|
||||
Write-Host "Enabling SmartScreen Filter..."
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" -Name "SmartScreenEnabled" -Type String -Value "RequireAdmin"
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost" -Name "EnableWebContentEvaluation"
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost" -Name "EnableWebContentEvaluation" -ErrorAction SilentlyContinue
|
||||
$edge = (Get-AppxPackage -AllUsers "Microsoft.MicrosoftEdge").PackageFamilyName
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\$edge\MicrosoftEdge\PhishingFilter" -Name "EnabledV9" -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\$edge\MicrosoftEdge\PhishingFilter" -Name "PreventOverride" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Web Search in Start Menu
|
||||
@@ -152,8 +174,8 @@ Function DisableWebSearch {
|
||||
# Enable Web Search in Start Menu
|
||||
Function EnableWebSearch {
|
||||
Write-Host "Enabling Bing Search in Start Menu..."
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "BingSearchEnabled"
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Name "DisableWebSearch"
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "BingSearchEnabled" -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Name "DisableWebSearch" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Start Menu suggestions
|
||||
@@ -196,7 +218,7 @@ Function DisableFeedback {
|
||||
# Enable Feedback
|
||||
Function EnableFeedback {
|
||||
Write-Host "Enabling Feedback..."
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Siuf\Rules" -Name "NumberOfSIUFInPeriod"
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Siuf\Rules" -Name "NumberOfSIUFInPeriod" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Advertising ID
|
||||
@@ -211,7 +233,7 @@ Function DisableAdvertisingID {
|
||||
# Enable Advertising ID
|
||||
Function EnableAdvertisingID {
|
||||
Write-Host "Enabling Advertising ID..."
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" -Name "Enabled"
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" -Name "Enabled" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Cortana
|
||||
@@ -239,11 +261,11 @@ Function DisableCortana {
|
||||
# Enable Cortana
|
||||
Function EnableCortana {
|
||||
Write-Host "Enabling Cortana..."
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Personalization\Settings" -Name "AcceptedPrivacyPolicy"
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Personalization\Settings" -Name "AcceptedPrivacyPolicy" -ErrorAction SilentlyContinue
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization" -Name "RestrictImplicitTextCollection" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization" -Name "RestrictImplicitInkCollection" -Type DWord -Value 0
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore" -Name "HarvestContacts"
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Name "AllowCortana"
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore" -Name "HarvestContacts" -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Name "AllowCortana" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Error reporting
|
||||
@@ -255,7 +277,7 @@ Function DisableErrorReporting {
|
||||
# Enable Error reporting
|
||||
Function EnableErrorReporting {
|
||||
Write-Host "Enabling Error reporting..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "Disabled"
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "Disabled" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Restrict Windows Update P2P only to local network
|
||||
@@ -271,8 +293,8 @@ Function RestrictUpdateP2P {
|
||||
# Unrestrict Windows Update P2P
|
||||
Function UnrestrictUpdateP2P {
|
||||
Write-Host "Unrestricting Windows Update P2P to internet..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode"
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization" -Name "SystemSettingsDownloadMode"
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization" -Name "SystemSettingsDownloadMode" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Remove AutoLogger file and restrict directory
|
||||
@@ -350,7 +372,7 @@ Function EnableSharingMappedDrives {
|
||||
# Disable sharing mapped drives between users
|
||||
Function DisableSharingMappedDrives {
|
||||
Write-Host "Disabling sharing mapped drives between users..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableLinkedConnections"
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableLinkedConnections" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable implicit administrative shares
|
||||
@@ -362,7 +384,7 @@ Function DisableAdminShares {
|
||||
# Enable implicit administrative shares
|
||||
Function EnableAdminShares {
|
||||
Write-Host "Enabling implicit administrative shares..."
|
||||
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" -Name "AutoShareWks"
|
||||
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" -Name "AutoShareWks" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Firewall
|
||||
@@ -381,14 +403,14 @@ Function EnableFirewall {
|
||||
Function DisableDefender {
|
||||
Write-Host "Disabling Windows Defender..."
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableAntiSpyware" -Type DWord -Value 1
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "WindowsDefender" -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "SecurityHealth" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Enable Windows Defender
|
||||
Function EnableDefender {
|
||||
Write-Host "Enabling Windows Defender..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableAntiSpyware"
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "WindowsDefender" -Type ExpandString -Value "`"%ProgramFiles%\Windows Defender\MSASCuiL.exe`""
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableAntiSpyware" -ErrorAction SilentlyContinue
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "SecurityHealth" -Type ExpandString -Value "`"%ProgramFiles%\Windows Defender\MSASCuiL.exe`""
|
||||
}
|
||||
|
||||
# Disable offering of Malicious Software Removal Tool through Windows Update
|
||||
@@ -403,7 +425,7 @@ Function DisableUpdateMSRT {
|
||||
# Enable offering of Malicious Software Removal Tool through Windows Update
|
||||
Function EnableUpdateMSRT {
|
||||
Write-Host "Enabling Malicious Software Removal Tool offering..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\MRT" -Name "DontOfferThroughWUAU"
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\MRT" -Name "DontOfferThroughWUAU" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable offering of drivers through Windows Update
|
||||
@@ -420,7 +442,7 @@ Function DisableUpdateDriver {
|
||||
Function EnableUpdateDriver {
|
||||
Write-Host "Enabling driver offering through Windows Update..."
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" -Name "SearchOrderConfig" -Type DWord -Value 1
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ExcludeWUDriversInQualityUpdate"
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ExcludeWUDriversInQualityUpdate" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Windows Update automatic restart
|
||||
@@ -437,7 +459,7 @@ Function DisableUpdateRestart {
|
||||
Function EnableUpdateRestart {
|
||||
Write-Host "Enabling Windows Update automatic restart..."
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "UxOption" -Type DWord -Value 0
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoRebootWithLoggedOnUsers"
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoRebootWithLoggedOnUsers" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Stop and disable Home Groups services
|
||||
@@ -483,6 +505,57 @@ Function DisableRemoteDesktop {
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" -Name "UserAuthentication" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Disable Autoplay
|
||||
Function DisableAutoplay {
|
||||
Write-Host "Disabling Autoplay..."
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers" -Name "DisableAutoplay" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Enable Autoplay
|
||||
Function EnableAutoplay {
|
||||
Write-Host "Enabling Autoplay..."
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers" -Name "DisableAutoplay" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Disable Autorun for all drives
|
||||
Function DisableAutorun {
|
||||
Write-Host "Disabling Autorun for all drives..."
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoDriveTypeAutoRun" -Type DWord -Value 255
|
||||
}
|
||||
|
||||
# Enable Autorun for removable drives
|
||||
Function EnableAutorun {
|
||||
Write-Host "Enabling Autorun for all drives..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoDriveTypeAutoRun" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable scheduled defragmentation
|
||||
Function DisableDefragmentation {
|
||||
Write-Host "Disabling scheduled defragmentation..."
|
||||
Disable-ScheduledTask -TaskName "\Microsoft\Windows\Defrag\ScheduledDefrag" | Out-Null
|
||||
}
|
||||
|
||||
# Enable scheduled defragmentation
|
||||
Function EnableDefragmentation {
|
||||
Write-Host "Enabling scheduled defragmentation..."
|
||||
Enable-ScheduledTask -TaskName "\Microsoft\Windows\Defrag\ScheduledDefrag" | Out-Null
|
||||
}
|
||||
|
||||
# Set BIOS time to UTC
|
||||
Function SetBIOSTimeUTC {
|
||||
Write-Host "Setting BIOS time to UTC..."
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" -Name "RealTimeIsUniversal" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Set BIOS time to local time
|
||||
Function SetBIOSTimeLocal {
|
||||
Write-Host "Setting BIOS time to Local time..."
|
||||
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" -Name "RealTimeIsUniversal" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
|
||||
|
||||
##########
|
||||
@@ -502,8 +575,8 @@ Function DisableActionCenter {
|
||||
# Enable Action Center
|
||||
Function EnableActionCenter {
|
||||
Write-Host "Enabling Action Center..."
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "DisableNotificationCenter"
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled"
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "DisableNotificationCenter" -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Lock screen
|
||||
@@ -518,11 +591,11 @@ Function DisableLockScreen {
|
||||
# Enable Lock screen
|
||||
Function EnableLockScreen {
|
||||
Write-Host "Enabling Lock screen..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" -Name "NoLockScreen"
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" -Name "NoLockScreen" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Lock screen (Anniversary Update workaround) - Applicable to RS1 or newer
|
||||
Function DisableLockScreenWorkaround {
|
||||
Function DisableLockScreenRS1 {
|
||||
Write-Host "Disabling Lock screen using scheduler workaround..."
|
||||
$service = New-Object -com Schedule.Service
|
||||
$service.Connect()
|
||||
@@ -538,38 +611,11 @@ Function DisableLockScreenWorkaround {
|
||||
}
|
||||
|
||||
# Enable Lock screen (Anniversary Update workaround) - Applicable to RS1 or newer
|
||||
Function EnableLockScreenWorkaround {
|
||||
Function EnableLockScreenRS1 {
|
||||
Write-Host "Enabling Lock screen (removing scheduler workaround)..."
|
||||
Unregister-ScheduledTask -TaskName "Disable LockScreen" -Confirm:$false -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Autoplay
|
||||
Function DisableAutoplay {
|
||||
Write-Host "Disabling Autoplay..."
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers" -Name "DisableAutoplay" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Enable Autoplay
|
||||
Function EnableAutoplay {
|
||||
Write-Host "Enabling Autoplay..."
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers" -Name "DisableAutoplay" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Disable Autorun for all drives
|
||||
Function DisableAutorun {
|
||||
Write-Host "Disabling Autorun for all drives..."
|
||||
If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer")) {
|
||||
New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoDriveTypeAutoRun" -Type DWord -Value 255
|
||||
}
|
||||
|
||||
# Enable Autorun
|
||||
Function EnableAutorun {
|
||||
Write-Host "Enabling Autorun for all drives..."
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoDriveTypeAutoRun"
|
||||
}
|
||||
|
||||
# Disable Sticky keys prompt
|
||||
Function DisableStickyKeys {
|
||||
Write-Host "Disabling Sticky keys prompt..."
|
||||
@@ -582,6 +628,21 @@ Function EnableStickyKeys {
|
||||
Set-ItemProperty -Path "HKCU:\Control Panel\Accessibility\StickyKeys" -Name "Flags" -Type String -Value "510"
|
||||
}
|
||||
|
||||
# Show file operations details
|
||||
Function ShowFileOperationsDetails {
|
||||
Write-Host "Showing file operations details..."
|
||||
If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager")) {
|
||||
New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager" | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager" -Name "EnthusiastMode" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Hide file operations details
|
||||
Function HideFileOperationsDetails {
|
||||
Write-Host "Hiding file operations details..."
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager" -Name "EnthusiastMode" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Hide Taskbar Search button / box
|
||||
Function HideTaskbarSearchBox {
|
||||
Write-Host "Hiding Taskbar Search box / button..."
|
||||
@@ -591,7 +652,7 @@ Function HideTaskbarSearchBox {
|
||||
# Show Taskbar Search button / box
|
||||
Function ShowTaskbarSearchBox {
|
||||
Write-Host "Showing Taskbar Search box / button..."
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "SearchboxTaskbarMode"
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "SearchboxTaskbarMode" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Hide Task View button
|
||||
@@ -603,7 +664,7 @@ Function HideTaskView {
|
||||
# Show Task View button
|
||||
Function ShowTaskView {
|
||||
Write-Host "Showing Task View button..."
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowTaskViewButton"
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowTaskViewButton" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Show small icons in taskbar
|
||||
@@ -615,7 +676,7 @@ Function ShowSmallTaskbarIcons {
|
||||
# Show large icons in taskbar
|
||||
Function ShowLargeTaskbarIcons {
|
||||
Write-Host "Showing large icons in taskbar..."
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarSmallIcons"
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarSmallIcons" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Show titles in taskbar
|
||||
@@ -627,7 +688,7 @@ Function ShowTaskbarTitles {
|
||||
# Hide titles in taskbar
|
||||
Function HideTaskbarTitles {
|
||||
Write-Host "Hiding titles in taskbar..."
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarGlomLevel"
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarGlomLevel" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Show all tray icons
|
||||
@@ -639,7 +700,7 @@ Function ShowTrayIcons {
|
||||
# Hide tray icons as needed
|
||||
Function HideTrayIcons {
|
||||
Write-Host "Hiding tray icons..."
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" -Name "EnableAutoTray"
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" -Name "EnableAutoTray" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Show known file extensions
|
||||
@@ -666,6 +727,18 @@ Function HideHiddenFiles {
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "Hidden" -Type DWord -Value 2
|
||||
}
|
||||
|
||||
# Hide sync provider notifications
|
||||
Function HideSyncNotifications {
|
||||
Write-Host "Hiding sync provider notifications..."
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowSyncProviderNotifications" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Show sync provider notifications
|
||||
Function ShowSyncNotifications {
|
||||
Write-Host "Showing sync provider notifications..."
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowSyncProviderNotifications" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Change default Explorer view to This PC
|
||||
Function ExplorerThisPC {
|
||||
Write-Host "Changing default Explorer view to This PC..."
|
||||
@@ -675,7 +748,7 @@ Function ExplorerThisPC {
|
||||
# Change default Explorer view to Quick Access
|
||||
Function ExplorerQuickAccess {
|
||||
Write-Host "Changing default Explorer view to Quick Access..."
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "LaunchTo"
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "LaunchTo" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Show This PC shortcut on desktop
|
||||
@@ -691,8 +764,8 @@ Function ShowThisPCOnDesktop {
|
||||
# Hide This PC shortcut from desktop
|
||||
Function HideThisPCFromDesktop {
|
||||
Write-Host "Hiding This PC shortcut from desktop..."
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" -Name "{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" -Name "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Hide Desktop icon from This PC
|
||||
@@ -801,6 +874,11 @@ Function EnableNumlock {
|
||||
New-PSDrive -Name HKU -PSProvider Registry -Root HKEY_USERS | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKU:\.DEFAULT\Control Panel\Keyboard" -Name "InitialKeyboardIndicators" -Type DWord -Value 2147483650
|
||||
Add-Type -AssemblyName System.Windows.Forms
|
||||
If (!([System.Windows.Forms.Control]::IsKeyLocked('NumLock'))) {
|
||||
$wsh = New-Object -ComObject WScript.Shell
|
||||
$wsh.SendKeys('{NUMLOCK}')
|
||||
}
|
||||
}
|
||||
|
||||
# Disable NumLock after startup
|
||||
@@ -810,12 +888,17 @@ Function DisableNumlock {
|
||||
New-PSDrive -Name HKU -PSProvider Registry -Root HKEY_USERS | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKU:\.DEFAULT\Control Panel\Keyboard" -Name "InitialKeyboardIndicators" -Type DWord -Value 2147483648
|
||||
Add-Type -AssemblyName System.Windows.Forms
|
||||
If ([System.Windows.Forms.Control]::IsKeyLocked('NumLock')) {
|
||||
$wsh = New-Object -ComObject WScript.Shell
|
||||
$wsh.SendKeys('{NUMLOCK}')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
##########
|
||||
# Remove unwanted applications
|
||||
# Application Tweaks
|
||||
##########
|
||||
|
||||
# Disable OneDrive
|
||||
@@ -830,7 +913,7 @@ Function DisableOneDrive {
|
||||
# Enable OneDrive
|
||||
Function EnableOneDrive {
|
||||
Write-Host "Enabling OneDrive..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\OneDrive" -Name "DisableFileSyncNGSC"
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\OneDrive" -Name "DisableFileSyncNGSC" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Uninstall OneDrive
|
||||
@@ -890,7 +973,6 @@ Function UninstallBloatware {
|
||||
Get-AppxPackage "Microsoft.WindowsMaps" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.WindowsPhone" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.WindowsSoundRecorder" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.XboxApp" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.ZuneMusic" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.ZuneVideo" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.AppConnector" | Remove-AppxPackage
|
||||
@@ -907,46 +989,71 @@ Function UninstallBloatware {
|
||||
Get-AppxPackage "D52A8D61.FarmVille2CountryEscape" | Remove-AppxPackage
|
||||
Get-AppxPackage "GAMELOFTSA.Asphalt8Airborne" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.WindowsFeedbackHub" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.MinecraftUWP" | Remove-AppxPackage
|
||||
Get-AppxPackage "flaregamesGmbH.RoyalRevolt2" | Remove-AppxPackage
|
||||
Get-AppxPackage "AdobeSystemsIncorporated.AdobePhotoshopExpress" | Remove-AppxPackage
|
||||
Get-AppxPackage "ActiproSoftwareLLC.562882FEEB491" | Remove-AppxPackage
|
||||
Get-AppxPackage "D5EA27B7.Duolingo-LearnLanguagesforFree" | Remove-AppxPackage
|
||||
Get-AppxPackage "Facebook.Facebook" | Remove-AppxPackage
|
||||
Get-AppxPackage "46928bounde.EclipseManager" | Remove-AppxPackage
|
||||
Get-AppxPackage "A278AB0D.MarchofEmpires" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.MicrosoftPowerBIForWindows" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.NetworkSpeedTest" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.MSPaint" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.Microsoft3DViewer" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.RemoteDesktop" | Remove-AppxPackage
|
||||
}
|
||||
|
||||
# Install default Microsoft applications
|
||||
Function InstallBloatware {
|
||||
Write-Host "Installing default Microsoft applications..."
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.3DBuilder").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.BingFinance").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.BingNews").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.BingSports").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.BingWeather").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.Getstarted").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.MicrosoftOfficeHub").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.MicrosoftSolitaireCollection").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.Office.OneNote").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.People").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.SkypeApp").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.Windows.Photos").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.WindowsAlarms").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.WindowsCamera").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.windowscommunicationsapps").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.WindowsMaps").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.WindowsPhone").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.WindowsSoundRecorder").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.XboxApp").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.ZuneMusic").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.ZuneVideo").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.AppConnector").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.ConnectivityStore").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.Office.Sway").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.Messaging").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.CommsPhone").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "9E2F88E3.Twitter").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "king.com.CandyCrushSodaSaga").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "4DF9E0F8.Netflix").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Drawboard.DrawboardPDF").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.MicrosoftStickyNotes").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.OneConnect").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "D52A8D61.FarmVille2CountryEscape").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "GAMELOFTSA.Asphalt8Airborne").InstallLocation)\AppXManifest.xml"
|
||||
Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.WindowsFeedbackHub").InstallLocation)\AppXManifest.xml"
|
||||
Get-AppxPackage -AllUsers "Microsoft.3DBuilder" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.BingFinance" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.BingNews" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.BingSports" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.BingWeather" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.Getstarted" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.MicrosoftOfficeHub" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.MicrosoftSolitaireCollection" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.Office.OneNote" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.People" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.SkypeApp" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.Windows.Photos" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.WindowsAlarms" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.WindowsCamera" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.windowscommunicationsapps" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.WindowsMaps" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.WindowsPhone" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.WindowsSoundRecorder" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.ZuneMusic" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.ZuneVideo" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.AppConnector" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.ConnectivityStore" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.Office.Sway" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.Messaging" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.CommsPhone" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "9E2F88E3.Twitter" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "king.com.CandyCrushSodaSaga" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "4DF9E0F8.Netflix" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Drawboard.DrawboardPDF" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.MicrosoftStickyNotes" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.OneConnect" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "D52A8D61.FarmVille2CountryEscape" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "GAMELOFTSA.Asphalt8Airborne" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.WindowsFeedbackHub" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.MinecraftUWP" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "flaregamesGmbH.RoyalRevolt2" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "AdobeSystemsIncorporated.AdobePhotoshopExpress" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "ActiproSoftwareLLC.562882FEEB491" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "D5EA27B7.Duolingo-LearnLanguagesforFree" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Facebook.Facebook" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "46928bounde.EclipseManager" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "A278AB0D.MarchofEmpires" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.MicrosoftPowerBIForWindows" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.NetworkSpeedTest" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.MSPaint" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.Microsoft3DViewer" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.RemoteDesktop" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
}
|
||||
# In case you have removed them for good, you can try to restore the files using installation medium as follows
|
||||
# New-Item C:\Mnt -Type Directory | Out-Null
|
||||
@@ -955,9 +1062,42 @@ Function InstallBloatware {
|
||||
# dism /Unmount-Image /Discard /MountDir:C:\Mnt
|
||||
# Remove-Item -Path C:\Mnt -Recurse
|
||||
|
||||
# Disable Xbox DVR
|
||||
Function DisableXboxDVR {
|
||||
Write-Host "Disabling Xbox DVR..."
|
||||
# Uninstall Windows Store
|
||||
Function UninstallWindowsStore {
|
||||
Write-Host "Uninstalling Windows Store..."
|
||||
Get-AppxPackage "Microsoft.DesktopAppInstaller" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.WindowsStore" | Remove-AppxPackage
|
||||
}
|
||||
|
||||
# Install Windows Store
|
||||
Function InstallWindowsStore {
|
||||
Write-Host "Installing Windows Store..."
|
||||
Get-AppxPackage -AllUsers "Microsoft.DesktopAppInstaller" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.WindowsStore" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
}
|
||||
|
||||
# Disable installation of consumer experience applications
|
||||
Function DisableConsumerApps {
|
||||
Write-Host "Disabling installation of consumer experience applications..."
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableWindowsConsumerFeatures" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Enable installation of consumer experience applications
|
||||
Function EnableConsumerApps {
|
||||
Write-Host "Enabling installation of consumer experience applications..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableWindowsConsumerFeatures" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Xbox features
|
||||
Function DisableXboxFeatures {
|
||||
Write-Host "Disabling Xbox features..."
|
||||
Get-AppxPackage "Microsoft.XboxApp" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.XboxIdentityProvider" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.XboxSpeechToTextOverlay" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.XboxGameOverlay" | Remove-AppxPackage
|
||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type DWord -Value 0
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" | Out-Null
|
||||
@@ -965,9 +1105,13 @@ Function DisableXboxDVR {
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" -Name "AllowGameDVR" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Enable Xbox DVR
|
||||
Function EnableXboxDVR {
|
||||
Write-Host "Enabling Xbox DVR..."
|
||||
# Enable Xbox features
|
||||
Function EnableXboxFeatures {
|
||||
Write-Host "Enabling Xbox features..."
|
||||
Get-AppxPackage -AllUsers "Microsoft.XboxApp" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.XboxIdentityProvider" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.XboxSpeechToTextOverlay" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.XboxGameOverlay" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type DWord -Value 1
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" -Name "AllowGameDVR" -ErrorAction SilentlyContinue
|
||||
}
|
||||
@@ -1032,13 +1176,13 @@ Function UnsetPhotoViewerAssociation {
|
||||
If (!(Test-Path "HKCR:")) {
|
||||
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | Out-Null
|
||||
}
|
||||
Remove-Item -Path "HKCR:\Paint.Picture\shell\open" -Recurse
|
||||
Remove-ItemProperty -Path "HKCR:\giffile\shell\open" -Name "MuiVerb"
|
||||
Remove-Item -Path "HKCR:\Paint.Picture\shell\open" -Recurse -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKCR:\giffile\shell\open" -Name "MuiVerb" -ErrorAction SilentlyContinue
|
||||
Set-ItemProperty -Path "HKCR:\giffile\shell\open" -Name "CommandId" -Type String -Value "IE.File"
|
||||
Set-ItemProperty -Path "HKCR:\giffile\shell\open\command" -Name "(Default)" -Type String -Value "`"$env:SystemDrive\Program Files\Internet Explorer\iexplore.exe`" %1"
|
||||
Set-ItemProperty -Path "HKCR:\giffile\shell\open\command" -Name "DelegateExecute" -Type String -Value "{17FE9752-0B5A-4665-84CD-569794602F5C}"
|
||||
Remove-Item -Path "HKCR:\jpegfile\shell\open" -Recurse
|
||||
Remove-Item -Path "HKCR:\pngfile\shell\open" -Recurse
|
||||
Remove-Item -Path "HKCR:\jpegfile\shell\open" -Recurse -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKCR:\pngfile\shell\open" -Recurse -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Add Photo Viewer to "Open with..."
|
||||
@@ -1060,7 +1204,37 @@ Function RemovePhotoViewerOpenWith {
|
||||
If (!(Test-Path "HKCR:")) {
|
||||
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | Out-Null
|
||||
}
|
||||
Remove-Item -Path "HKCR:\Applications\photoviewer.dll\shell\open" -Recurse
|
||||
Remove-Item -Path "HKCR:\Applications\photoviewer.dll\shell\open" -Recurse -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable search for app in store for unknown extensions
|
||||
Function DisableSearchAppInStore {
|
||||
Write-Host "Disabling search for app in store for unknown extensions..."
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer" | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "NoUseStoreOpenWith" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Enable search for app in store for unknown extensions
|
||||
Function EnableSearchAppInStore {
|
||||
Write-Host "Enabling search for app in store for unknown extensions..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "NoUseStoreOpenWith" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable 'How do you want to open this file?' prompt
|
||||
Function DisableNewAppPrompt {
|
||||
Write-Host "Disabling 'How do you want to open this file?' prompt..."
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer" | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "NoNewAppAlert" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Enable 'How do you want to open this file?' prompt
|
||||
Function EnableNewAppPrompt {
|
||||
Write-Host "Enabling 'How do you want to open this file?' prompt..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "NoNewAppAlert" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Enable F8 boot menu options
|
||||
@@ -1078,13 +1252,13 @@ Function DisableF8BootMenu {
|
||||
|
||||
|
||||
##########
|
||||
# Auxiliary
|
||||
# Auxiliary Functions
|
||||
##########
|
||||
|
||||
Function WaitForKey {
|
||||
Write-Host
|
||||
Write-Host "Press any key to continue..." -ForegroundColor Black -BackgroundColor White
|
||||
$key = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
|
||||
[Console]::ReadKey($true) | Out-Null
|
||||
}
|
||||
|
||||
Function Restart {
|
||||
|
||||
Reference in New Issue
Block a user