Problem with CMD and BAT

  • Thread starter Thread starter Robert Fuchs
  • Start date Start date
R

Robert Fuchs

Hi,

on my Vista Ultimate SP1 I have the problem that I can't run batches by
double-clicking in Explorer.
The same problem is with shortcuts to batches.
Instead of executing the batch, a cmd.exe console window is opened - that's
it.
No error message, nothing.
I also don't find a place where I could fix it.

thanks, Robert
 
Possibly a malware which messed up your .bat and .cmd file association. You
can try to reset the association from the command prompt by running the
following:

assoc .bat=batfile
assoc .cmd=cmdfile

On the following registry keys:

HKEY_CLASSES_ROOT\cmdfile\shell\open\command
HKLM\SOFTWARE\Classes\batfile\shell\open\command

verify that the Reg_Sz (default) value data is set to "%1" %*
 
assoc .bat=batfile
assoc .cmd=cmdfile

OK, done.
On the following registry keys:

HKEY_CLASSES_ROOT\cmdfile\shell\open\command
HKLM\SOFTWARE\Classes\batfile\shell\open\command

verify that the Reg_Sz (default) value data is set to "%1" %*

verified, everything is ok.
BTW, shell\runas is set to %SystemRoot%\System32\cmd.exe /C "%1" %*

But it still does not work.

Any more ideas?

regards, Robert
 
depending on what you are trying to do, you might need to make the cmd
window and/or bat file run as admin
in the shortcut properties>advanced
 
Back
Top