File tree Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -96,20 +96,24 @@ process {
96
96
choco source add - n ' ChocolateyCore' - s " $ ( (Get-NexusRepository - Name ' ChocolateyCore' ).url) /index.json" -- priority 0 -- admin- only
97
97
98
98
# Install a non-IE browser for browsing the Nexus web portal.
99
- if (-not (Test-Path ' C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe' )) {
99
+ if (Test-Path ' C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe' ){
100
+ Write-Host " Syncing Microsoft Edge, to bring it under Chocolatey management"
101
+ choco sync -- id= " Microsoft Edge" -- package- id= " microsoft-edge"
102
+ }
103
+ else {
100
104
Write-Host " Installing Microsoft Edge, to allow viewing the Nexus site"
101
- choco install microsoft- edge - y -- source ChocolateyInternal
102
- if ($LASTEXITCODE -eq 0 ) {
103
- if (Test-Path ' HKLM:\SOFTWARE\Microsoft\Edge' ) {
104
- $RegArgs = @ {
105
- Path = ' HKLM:\SOFTWARE\Microsoft\Edge\'
106
- Name = ' HideFirstRunExperience'
107
- Type = ' Dword'
108
- Value = 1
109
- Force = $true
110
- }
111
- $null = Set-ItemProperty @RegArgs
105
+ choco install microsoft- edge - y -- source ChocolateyCore
106
+ }
107
+ if ($LASTEXITCODE -eq 0 ) {
108
+ if (Test-Path ' HKLM:\SOFTWARE\Microsoft\Edge' ) {
109
+ $RegArgs = @ {
110
+ Path = ' HKLM:\SOFTWARE\Microsoft\Edge\'
111
+ Name = ' HideFirstRunExperience'
112
+ Type = ' Dword'
113
+ Value = 1
114
+ Force = $true
112
115
}
116
+ $null = Set-ItemProperty @RegArgs
113
117
}
114
118
}
115
119
You can’t perform that action at this time.
0 commit comments