|
25 | 25 | .EXTERNALSCRIPTDEPENDENCIES
|
26 | 26 |
|
27 | 27 | .RELEASENOTES
|
| 28 | + 15/08/2018 - added functionality to install the new "User Install" variant of Insiders Edition. |
| 29 | + -- |
28 | 30 | 28/12/2017 - added functionality to support 64-bit versions of VSCode
|
29 | 31 | & support for installation of VSCode Insiders Edition.
|
30 | 32 | --
|
|
53 | 55 | downloaded instead. If parameter is not used, then 64-bit is used as default.
|
54 | 56 |
|
55 | 57 | .PARAMETER BuildEdition
|
56 |
| - A validated string defining which build edition or "stream" to download - stable or |
57 |
| - insiders edition. If the parameter is not used, then stable is downloaded as default. |
| 58 | + A validated string defining which build edition or "stream" to download: |
| 59 | + Stable or Insiders Edition (system install or user profile install). |
| 60 | + If the parameter is not used, then stable is downloaded as default. |
58 | 61 |
|
59 |
| -.PARAMETER User |
60 |
| - When present, the latest VSCode "User Profile" Insider Edition will be installed. |
61 |
| - if BuildEdition is set to "stable" this will revert back to the current standard. |
62 | 62 |
|
63 | 63 | .PARAMETER AdditionalExtensions
|
64 | 64 | An array of strings that are the fully-qualified names of extensions to be
|
|
88 | 88 | extensions.
|
89 | 89 |
|
90 | 90 | .EXAMPLE
|
91 |
| - Install-VSCode.ps1 -BuildEdition Insider -LaunchWhenDone |
| 91 | + Install-VSCode.ps1 -BuildEdition Insider-User -LaunchWhenDone |
92 | 92 |
|
93 |
| - Installs Visual Studio Code Insiders Edition (64-bit) and then launches the editor |
| 93 | + Installs Visual Studio Code Insiders Edition (64-bit) to the user profile and then launches the editor |
94 | 94 | after installation completes.
|
95 | 95 |
|
96 | 96 | .NOTES
|
@@ -123,8 +123,8 @@ param(
|
123 | 123 | [string]$Architecture = "64-bit",
|
124 | 124 |
|
125 | 125 | [parameter()]
|
126 |
| - [ValidateSet("stable","insider")] |
127 |
| - [string]$BuildEdition = "stable", |
| 126 | + [ValidateSet("Stable","Insider-System","Insider-User")] |
| 127 | + [string]$BuildEdition = "Stable", |
128 | 128 |
|
129 | 129 | [Parameter()]
|
130 | 130 | [switch]$User,
|
@@ -166,21 +166,23 @@ if (!($IsLinux -or $IsOSX)) {
|
166 | 166 | "Stable" {
|
167 | 167 | $codeCmdPath = "$codePath\Microsoft VS Code\bin\code.cmd"
|
168 | 168 | $appName = "Visual Studio Code ($($Architecture))"
|
| 169 | + $fileUri = "https://vscode-update.azurewebsites.net/latest/$($bitVersion)/$($BuildEdition)" |
| 170 | + |
169 | 171 | break;
|
170 | 172 | }
|
171 |
| - "Insider" { |
| 173 | + "Insider-System" { |
172 | 174 | $codeCmdPath = "$codePath\Microsoft VS Code Insiders\bin\code-insiders.cmd"
|
173 | 175 | $appName = "Visual Studio Code - Insiders Edition ($($Architecture))"
|
| 176 | + $fileUri = "https://vscode-update.azurewebsites.net/latest/$($bitVersion)/$($BuildEdition)" |
| 177 | + |
| 178 | + break; |
| 179 | + } |
| 180 | + "Insider-User" { |
| 181 | + $codeCmdPath = "$env:LocalAppData\Programs\Microsoft VS Code Insiders\bin\code-insiders.cmd" |
| 182 | + $appName = "Visual Studio Code - Insiders Edition ($($Architecture) - User)" |
| 183 | + $fileUri = "https://vscode-update.azurewebsites.net/latest/$($bitVersion)-user/$($BuildEdition)" |
174 | 184 | break;
|
175 | 185 | }
|
176 |
| - } |
177 |
| - if ($User -and $BuildEdition -eq "Insider") { |
178 |
| - $codeCmdPath = "$env:LocalAppData\Programs\Microsoft VS Code Insiders\bin\code-insiders.cmd" |
179 |
| - $appName = "Visual Studio Code - Insiders Edition ($($Architecture) - User)" |
180 |
| - $fileUri = "https://vscode-update.azurewebsites.net/latest/$($bitVersion)-user/$($BuildEdition)" |
181 |
| - } |
182 |
| - else { |
183 |
| - $fileUri = "https://vscode-update.azurewebsites.net/latest/$($bitVersion)/$($BuildEdition)" |
184 | 186 | }
|
185 | 187 | try {
|
186 | 188 | $ProgressPreference = 'SilentlyContinue'
|
|
0 commit comments