Skip to content

Commit

Permalink
(#209) Disable Browser First Run Wizards (#522)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
corbob authored Oct 18, 2024
1 parent 452ab61 commit cd6f1f5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Boxstarter.WinConfig/Boxstarter.WinConfig.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ CmdletsToExport = @(
'Set-WindowsExplorerOptions',
'Set-BoxstarterTaskbarOptions',
'Disable-BingSearch',
'Set-BoxstarterPageFile'
'Set-BoxstarterPageFile',
'Disable-BoxstarterBrowserFirstRun'
)

# Variables to export from this module
Expand All @@ -69,4 +70,3 @@ PrivateData = '8459d49a8d5a049d8936519ccf045706c7b3eb23'
# DefaultCommandPrefix = ''

}

29 changes: 29 additions & 0 deletions Boxstarter.WinConfig/Disable-BoxstarterBrowserFirstRun.ps1
Original file line number Diff line number Diff line change
@@ -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."
}

0 comments on commit cd6f1f5

Please sign in to comment.