I'm writing a batch file to import power plans in windows 10. My script is mostly done but I need a way to alert the user if there is an error. Ideally, the script would echo the exact error and prompt the user to hit a key to acknowledge it. Here's my code so far:
powercfg -import "%UserProfile%\Desktop\Powercfg CMIT Defalut\CMIT Win10 Power Plan.pow"
******ERROR CODE PROBABLY SHOULD GO HERE?********
start "" cmd /c "echo CMIT Win10 PowerCFG Imported &echo(&pause"