|
25 | 25 | .EXTERNALSCRIPTDEPENDENCIES
|
26 | 26 |
|
27 | 27 | .RELEASENOTES
|
| 28 | + 21/03/2018 - added functionality to install the VSCode context menus. Also, VSCode is now always added to the search path |
| 29 | + -- |
28 | 30 | 20/03/2018 - fix OS detection to prevent error
|
29 | 31 | --
|
30 | 32 | 28/12/2017 - added functionality to support 64-bit versions of VSCode
|
|
69 | 71 | When present, causes Visual Studio Code to be launched as soon as installation
|
70 | 72 | has finished.
|
71 | 73 |
|
| 74 | +.PARAMETER EnableContextMenus |
| 75 | + When present, causes the installer to configure the Explorer context menus |
| 76 | +
|
72 | 77 | .EXAMPLE
|
73 | 78 | Install-VSCode.ps1 -Architecture 32-bit
|
74 | 79 |
|
@@ -128,7 +133,9 @@ param(
|
128 | 133 | [ValidateNotNull()]
|
129 | 134 | [string[]]$AdditionalExtensions = @(),
|
130 | 135 |
|
131 |
| - [switch]$LaunchWhenDone |
| 136 | + [switch]$LaunchWhenDone, |
| 137 | + |
| 138 | + [switch]$EnableContextMenus |
132 | 139 | )
|
133 | 140 |
|
134 | 141 | if (($PSVersionTable.PSVersion.Major -le 5) -or $IsWindows) {
|
@@ -178,7 +185,12 @@ if (($PSVersionTable.PSVersion.Major -le 5) -or $IsWindows) {
|
178 | 185 | Invoke-WebRequest -Uri "https://vscode-update.azurewebsites.net/latest/$($bitVersion)/$($BuildEdition)" -OutFile "$env:TEMP\vscode-$($BuildEdition).exe"
|
179 | 186 |
|
180 | 187 | Write-Host "`nInstalling $appName..." -ForegroundColor Yellow
|
181 |
| - Start-Process -Wait "$env:TEMP\vscode-$($BuildEdition).exe" -ArgumentList /silent, /mergetasks=!runcode |
| 188 | + if ($EnableContextMenus) { |
| 189 | + Start-Process -Wait "$env:TEMP\vscode-$($BuildEdition).exe" -ArgumentList "/verysilent /tasks=addcontextmenufiles,addcontextmenufolders,addtopath" |
| 190 | + } |
| 191 | + else { |
| 192 | + Start-Process -Wait "$env:TEMP\vscode-$($BuildEdition).exe" -ArgumentList "/verysilent /tasks=addtopath" |
| 193 | + } |
182 | 194 | }
|
183 | 195 | else {
|
184 | 196 | Write-Host "`n$appName is already installed." -ForegroundColor Yellow
|
|
0 commit comments