Skip to content

Commit d2992b1

Browse files
committed
(#291) Improve Edge Firstrun Experience
...by successfully removing it.
1 parent 9acc317 commit d2992b1

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

Start-C4bNexusSetup.ps1

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -267,19 +267,12 @@ process {
267267
if (-not (Test-Path 'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe')) {
268268
Write-Host "Installing Microsoft Edge, to allow viewing the Nexus site"
269269
Invoke-Choco install microsoft-edge -y --source ChocolateyInternal
270-
if ($LASTEXITCODE -eq 0) {
271-
if (Test-Path 'HKLM:\SOFTWARE\Microsoft\Edge') {
272-
$RegArgs = @{
273-
Path = 'HKLM:\SOFTWARE\Microsoft\Edge\'
274-
Name = 'HideFirstRunExperience'
275-
Type = 'Dword'
276-
Value = 1
277-
Force = $true
278-
}
279-
$null = Set-ItemProperty @RegArgs
280-
}
281-
}
282270
}
271+
$Key = @{ Key = 'HKLM:\Software\Policies\Microsoft\Edge' ; Value = 'HideFirstRunExperience' }
272+
if (-not (Test-Path $Key.Key)) {
273+
$null = New-Item -Path $Key.Key -Force
274+
}
275+
$null = New-ItemProperty -Path $Key.Key -Name $Key.Value -Value 1 -PropertyType DWORD -Force
283276

284277
# Save useful params
285278
Update-Clixml -Properties @{

0 commit comments

Comments
 (0)