Skip to content

Commit ff50f74

Browse files
Ben ReaderBen Reader
Ben Reader
authored and
Ben Reader
committed
allow for 32-bit arch to be installed on 64bit OS
1 parent 91b9c5f commit ff50f74

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

scripts/Install-VSCode.ps1

+9-3
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,21 @@ if (!($IsLinux -or $IsOSX)) {
137137
$bitVersion = "win32-x64"
138138
}
139139
else {
140-
$codePath = ${env:ProgramFiles(x86)}
140+
$codePath = $env:ProgramFiles
141141
$bitVersion = "win32"
142142
$Architecture = "32-bit"
143143
}
144144
break;
145145
}
146146
"32-bit" {
147-
$codePath = ${env:ProgramFiles(x86)}
148-
$bitVersion = "win32"
147+
if ((Get-CimInstance -ClassName Win32_OperatingSystem).OSArchitecture -eq "32-bit"){
148+
$codePath = $env:ProgramFiles
149+
$bitVersion = "win32"
150+
}
151+
else {
152+
$codePath = ${env:ProgramFiles(x86)}
153+
$bitVersion = "win32"
154+
}
149155
break;
150156
}
151157
}

0 commit comments

Comments
 (0)