File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,7 +126,19 @@ VisualStudioFinder.prototype = {
126126 // Invoke the PowerShell script to get information about Visual Studio 2017
127127 // or newer installations
128128 findVisualStudio2017OrNewer : function findVisualStudio2017OrNewer ( cb ) {
129- var ps = path . join ( process . env . SystemRoot , 'System32' ,
129+ // 32-bit PowerShell (available in SysWOW64) is needed on ARM64 because of
130+ // the COM classes and interfaces used by Find-VisualStudio.cs, which are
131+ // not registered for being used from ARM64 processes.
132+ //
133+ // This fix is required for the clean installation of Windows 11. Old
134+ // versions (e.g. Windows 10 upgraded to 11) work without it.
135+ //
136+ // Since VS v17.4 and later is natively supported on ARM64 it seems to
137+ // register the ARM64 COM components correctly, but VS 2019 and 2017 will
138+ // still have problems being detected. Once support for VS 2017 and 2019
139+ // is dropped, this change can be reverted.
140+ var systemDirectory = process . arch === 'arm64' ? 'SysWOW64' : 'System32'
141+ var ps = path . join ( process . env . SystemRoot , systemDirectory ,
130142 'WindowsPowerShell' , 'v1.0' , 'powershell.exe' )
131143 var csFile = path . join ( __dirname , 'Find-VisualStudio.cs' )
132144 var psArgs = [
You can’t perform that action at this time.
0 commit comments