diff --git a/packages/cli/src/commands/doctor/healthchecks/androidStudio.ts b/packages/cli/src/commands/doctor/healthchecks/androidStudio.ts index 4a7f76923..8c22ec59e 100644 --- a/packages/cli/src/commands/doctor/healthchecks/androidStudio.ts +++ b/packages/cli/src/commands/doctor/healthchecks/androidStudio.ts @@ -26,9 +26,8 @@ export default { 'bin', 'studio.exe', ).replace(/\\/g, '\\\\'); - const powershell = `${process.env.SystemRoot}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`; const {stdout} = await executeCommand( - `${powershell} -Command "& { (Get-ChildItem \\"${androidStudioPath}\\").VersionInfo.FileVersionRaw.ToString() }"`, + `wmic datafile where name="${androidStudioPath}" get Version`, ); const version = stdout.replace(/(\r\n|\n|\r)/gm, '').trim();