I am using steam to execute games and one game's execution start is a CMD file. However, it is opening in notepad rather than executing.

Somewhere along the way I did this. How do I fix it to execute the CMD.

I tried instructions from being having the same issue as BAT files but the CMD change is not in the same place. Batch files don't run - they're being opened with notepad

Also, I have the option set to display file extensions. So it is not a case of FILE.CMD.TXT

  • What instructions did you try before? The ones here? superuser.com/questions/1167421/…? Something else? – ernie Jan 15 '17 at 2:50
  • set pathext&assoc .cmd&for /F "tokens=2 delims==" %G in ('assoc .cmd') do @ftype %G Run above from an open cmd prompt. Run reg query hkcr\cmdfile\shell -ve and reg query hkcr\cmdfile\shell\open\command -ve as well. Then, edit your question and share the result. – JosefZ Jan 15 '17 at 3:42
  • Get the .CMD file association registry fix here – w32sh Jun 28 '17 at 4:27

go to the CMD file you want to steam run that for you and right click on it and change the default application ( open with ) to the CMD and check the use this app instead or use this app always . maybe you changed the default app for cmd file into notepad by mistake when u wanted edit cmd files in notepad ! easy . go to windows settings and search for default apps ( try this one too there - reset to the microsoft recommended defaults ) click on the choose default apps by file type and u will get a full list of file extension and the default app that are opening them so u can change from notepad into the cmd and here is the address of the cmd if its hard for you to find it :


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.