diff --git a/src/PlatformInformation.ts b/src/PlatformInformation.ts index bf192845f..17eb47f08 100644 --- a/src/PlatformInformation.ts +++ b/src/PlatformInformation.ts @@ -92,8 +92,12 @@ export class PlatformInformation { } private static GetWindowsArchitecture(): Promise { - const command = "wmic"; - const args = ["os", "get", "osarchitecture"]; + const command = "powershell"; + const args = [ + "-executionPolicy", + "bypass", + "(Get-WmiObject Win32_OperatingSystem).OSArchitecture", + ]; return utils .execChildProcess(command, args, utils.extensionContext.extensionPath) .then((architecture) => {