Manual Start:
You could start cmd and passing parameters to start the file.
From http://ss64.com/nt/cmd.html:
Options:
/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"
For example:
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
assoc.cmd=cmdfile
Reset registry
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.
Goto: HKEY_CLASSES_ROOT\.cmd
and check if the (Default)
String contains the data cmdfile
Also check if HKEY_CLASSES_ROOT\cmdfile\shell\open\command
contains the (Default)
String "%1" %*
.
If so, go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.cmd
.cmd
should contain 2 Keys: OpenWithList
and OpenWithProgids
. If there is an UserChoice
key, delete it with all its contents.
The OpenWithList
should only contain a (Default)
String with an empty value. It should say (value not set). Delete any other values within OpenWithList
.
The 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 OpenWithProgids
.