Running Batch File From CE Windows Explorer

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,

I'd like to know how to run a Batch file from CE Windows Explorer. I could
run
it from the CMD Prompt but not by double clicking the batch file inside
Windows Explorer. Pls repost.

Thanks,
Gee
 
You'd have to associate the extension .bat with cmd.exe (I think that's the
right EXE for it). What you want is, when the .bat file is opened, to pass
it on the command line to cmd.exe. You may have to set a command line
option on cmd.exe to make it run the batch file, too, but I'm not sure about
that. The basic registry entries are below:

[HKEY_CLASSES_ROOT\.bat]
@="batfile"
[HKEY_CLASSES_ROOT\batfile]
@="Batch File"
[HKEY_CLASSES_ROOT\batfile\DefaultIcon]
@="cmd.exe,-100" ; Note that I have no idea what icon you want to use.
Pick the right
; resource ID yourself.
[HKEY_CLASSES_ROOT\batfile\Shell\Open\Command]
@="\"cmd.exe\" \"%1\""

Paul T.
 
Back
Top