Error: Command failed: wmic os get Caption 'wmic' is not recognized as an internal or external command, operable program or batch file.
See original GitHub issueBug Report
What does actually happen?
Im getting this error after I updated to cordova 9.0.0
C:\Users\admin\AppData\Roaming\npm\node_modules\cordova\node_modules\execa\index
.js:347
throw err;
^
Error: Command failed: wmic os get Caption
'wmic' is not recognized as an internal or external command,
operable program or batch file.
at makeError (C:\Users\admin\AppData\Roaming\npm\node_modules\cordova\node_m
odules\execa\index.js:174:9)
at Function.module.exports.sync (C:\Users\admin\AppData\Roaming\npm\node_mod
ules\cordova\node_modules\execa\index.js:338:15)
at windowsRelease (C:\Users\admin\AppData\Roaming\npm\node_modules\cordova\n
ode_modules\windows-release\index.js:34:24)
at osName (C:\Users\admin\AppData\Roaming\npm\node_modules\cordova\node_modu
les\os-name\index.js:39:18)
at new Insight (C:\Users\admin\AppData\Roaming\npm\node_modules\cordova\node
_modules\insight\lib\index.js:37:13)
at Object.<anonymous> (C:\Users\admin\AppData\Roaming\npm\node_modules\cordo
va\src\telemetry.js:26:15)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
Information
Command or Code
cordova -v cordova help cordova build android
Version information
Cordova 9.0.0 Window 7 64x
Checklist
- [x ] I searched for existing GitHub issues
- [x ] I updated all Cordova tooling to most recent version
- [x ] I included all the necessary information above
Issue Analytics
- State:
- Created 4 years ago
- Comments:31 (5 by maintainers)
Top Results From Across the Web
"wmic is not recognized as an internal or external command ...
Open Control Panel > System > Advanced System settings. · Click Environment variables button and select the System Variables section. · Edit Path ......
Read more >'wmic' is not recognized as an internal or external command ...
But I get this error: 'wmic' is not recognized as an internal or external command, operable program or batch file. I ensured that...
Read more >WMIC is not recognized as an internal or external command
The error states that the WMIC is not recognized as an internal or external command. Windows displays this error message when it does...
Read more >'C:\wmic' is not recognized as an internal or external command ...
'C:\wmic' is not recognized as an internal or external command, operable program or batch file · 2 · What is wmic ? ·...
Read more >FIX 'wmic' is not recognized as an internal or ... - YouTube
FIX ' wmic ' is not recognized as an internal or external command, operable program or batch file.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
thanks @janpio, adding “c:\Windows\System32\wbem” to my path environnement variable solved this problem
Related: https://github.com/sindresorhus/windows-release/issues/10
Do you have
c:\Windows\System32\wbem\WMIC.exe
? Then this might help: https://superuser.com/a/1434268/25933