Skip to content

Commit

Permalink
rm use of wmic in favor of Get WmiObject
Browse files Browse the repository at this point in the history
  • Loading branch information
brianignacio5 committed Dec 13, 2024
1 parent 066fc02 commit 2505ab4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/PlatformInformation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,12 @@ export class PlatformInformation {
}

private static GetWindowsArchitecture(): Promise<string> {
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) => {
Expand Down

0 comments on commit 2505ab4

Please sign in to comment.