You could start cmd and passing parameters to start the file.
/C Run Command and then terminate
Command : The command, program or batch script to be run...
Open up the run command (WIN+R) and type in
cmd /C "Path_to_your_file"
cmd /C "C:\Users\name\Desktop\script.cmd"
Reset .cmd to cmdfile association
You could also reset the file association of .cmd files to cmdfile, assuming this is what caused your .cmd files to be opened in vim:
Start up the cmd as administrator and type
This one can cause harm to your computer if you do something wrong since you're working on the registry.
Open up regedit (WIN+R: regedit)
First we want to check if .cmd art associated with cmdfiles.
HKEY_CLASSES_ROOT\.cmd and check if the
(Default) String contains the data
Also check if
HKEY_CLASSES_ROOT\cmdfile\shell\open\command contains the
If so, go to
.cmd should contain 2 Keys:
OpenWithProgids. If there is an
UserChoice key, delete it with all its contents.
OpenWithList should only contain a
(Default) String with an empty value. It should say (value not set). Delete any other values within
OpenWithProgids should only contain a
(Default) String with an empty value and a binary value with the name
cmdfile. Again, delete any other values within