Windows user - I made the mistake of associating a batch file with Sublime so each time I open it, instead of running, it opens in Sublime

I have not access to the command prompt (hence the reason to use batch files) or to edit the registry (work laptop, locked down)

How would I reverse this so double clicking the batch file runs it instead of opening in Sublime?



You could use .cmd which is the same thing as .bat (see link).

If you can run as Administrator, you could restore the .bat association by running a .cmd file containing the following command:

assoc .bat=batfile
| improve this answer | |
  • Thanks - this works - unfortunately some startup scripts are .bat so can't be amended and they just end up opening in Sublime – pee2pee Nov 4 '19 at 11:19

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.