From 5398d237bb44647c92b7f8f819dc629cb8d08e96 Mon Sep 17 00:00:00 2001 From: Cory Knox Date: Fri, 30 Sep 2022 20:15:14 -0700 Subject: [PATCH] (#209) Disable Browser First Run Wizards Add function to disable browser first run wizards so that PowerShell Invoke-WebRequest can work correctly, and so that Edge doesn't pester the user to configure it. --- .../Disable-BoxstarterBrowserFirstRun.ps1 | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Boxstarter.WinConfig/Disable-BoxstarterBrowserFirstRun.ps1 diff --git a/Boxstarter.WinConfig/Disable-BoxstarterBrowserFirstRun.ps1 b/Boxstarter.WinConfig/Disable-BoxstarterBrowserFirstRun.ps1 new file mode 100644 index 00000000..a06291a1 --- /dev/null +++ b/Boxstarter.WinConfig/Disable-BoxstarterBrowserFirstRun.ps1 @@ -0,0 +1,29 @@ +function Disable-BoxstarterBrowserFirstRun { + <# + .SYNOPSIS + Turns off IE and Edge first run customization wizards. + + .LINK + https://boxstarter.org + + .EXAMPLE + Disable-BrowserFirstRun + + Turns off IE and Edge first run customization wizards. + #> + $RegistryKeys = @( + @{ Key = 'HKLM:\Software\Policies\Microsoft\Edge' ; Value = 'HideFirstRunExperience' } # Edge + @{ Key = 'HKLM:\Software\Microsoft\Internet Explorer\Main' ; Value = 'DisableFirstRunCustomize' } # Internet Explorer 11 + @{ Key = 'HKLM:\Software\Policies\Microsoft\Internet Explorer\Main' ; Value = 'DisableFirstRunCustomize' } # Internet Explorer 9 + ) + + foreach ($Key in $RegistryKeys) { + if (-not (Test-Path $Key.Key)) { + New-Item -Path $Key.Key -Force + } + + New-ItemProperty -Path $Key.Key -Name $Key.Value -Value 1 -PropertyType DWORD -Force + } + + Write-Output "IE and Edge first run customizations wizards have been disabled." +}