Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b696783

Browse files
committedAug 30, 2019
Added functionality to install the User variant of Stable Edition
1 parent a11e27c commit b696783

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed
 

‎scripts/Install-VSCode.ps1

+19-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<#PSScriptInfo
22
3-
.VERSION 1.3
3+
.VERSION 1.3.1
44
55
.GUID 539e5585-7a02-4dd6-b9a6-5dd288d0a5d0
66
@@ -25,6 +25,8 @@
2525
.EXTERNALSCRIPTDEPENDENCIES
2626
2727
.RELEASENOTES
28+
30/08/2019 - added functionality to install the "User Install" variant of Stable Edition.
29+
--
2830
07/11/2018 - added support for PowerShell Core and macOS/Linux platforms.
2931
--
3032
15/08/2018 - added functionality to install the new "User Install" variant of Insiders Edition.
@@ -132,7 +134,7 @@ param(
132134
[string]$Architecture = "64-bit",
133135

134136
[parameter()]
135-
[ValidateSet("Stable", "Insider-System", "Insider-User")]
137+
[ValidateSet("Stable","Stable-User", "Insider-System", "Insider-User")]
136138
[string]$BuildEdition = "Stable",
137139

138140
[Parameter()]
@@ -199,7 +201,7 @@ function Get-CodePlatformInformation {
199201
$Bitness,
200202

201203
[Parameter(Mandatory=$true)]
202-
[ValidateSet('Stable', 'Insider-System', 'Insider-User')]
204+
[ValidateSet('Stable', 'Stable-User', 'Insider-System', 'Insider-User')]
203205
[string]
204206
$BuildEdition
205207
)
@@ -231,6 +233,11 @@ function Get-CodePlatformInformation {
231233
break
232234
}
233235

236+
'Stable-User' {
237+
$appName = "Visual Studio Code ($($Architecture) - User)"
238+
break
239+
}
240+
234241
'Insider-System' {
235242
$appName = "Visual Studio Code - Insiders Edition ($Bitness)"
236243
break
@@ -321,6 +328,9 @@ function Get-CodePlatformInformation {
321328
'Stable' {
322329
$exePath = "$installBase\Microsoft VS Code\bin\code.cmd"
323330
}
331+
'Stable-User' {
332+
$exePath = "${env:LocalAppData}\Programs\Microsoft VS Code\bin\code.cmd"
333+
}
324334

325335
'Insider-System' {
326336
$exePath = "$installBase\Microsoft VS Code Insiders\bin\code-insiders.cmd"
@@ -339,6 +349,12 @@ function Get-CodePlatformInformation {
339349
break
340350
}
341351

352+
'Stable-User' {
353+
$channel = 'stable'
354+
$platform += '-user'
355+
break
356+
}
357+
342358
'Insider-System' {
343359
$channel = 'insider'
344360
break

0 commit comments

Comments
 (0)
Please sign in to comment.