PC Review


Reply
Thread Tools Rate Thread

Cannot run batch files (.bat)

 
 
SSC Mike
Guest
Posts: n/a
 
      4th Dec 2007
I have an XP machine that can no longer run .BAT files. When you double
click them the message "Windows Cannot find <filename.bat with path> ...".
This happens with shortcuts and the original file. Strangely, if I start a
command prompt and cd to the folder, the script will run.

I have done the virus scan, and it was negative. Best I can tell, no new
software has been installed recently.

I am assuming something is corrupted, but I am not sure where to start
looking.

Any help would be appreciated.
 
Reply With Quote
 
 
 
 
Poprivet`
Guest
Posts: n/a
 
      4th Dec 2007
SSC Mike wrote:
> I have an XP machine that can no longer run .BAT
> files. When you
> double click them the message "Windows Cannot find
> <filename.bat with
> path> ...". This happens with shortcuts and the
> original file.
> Strangely, if I start a command prompt and cd to the
> folder, the
> script will run.
>
> I have done the virus scan, and it was negative.
> Best I can tell, no
> new software has been installed recently.
>
> I am assuming something is corrupted, but I am not
> sure where to start
> looking.
>
> Any help would be appreciated.


Sounds like the shortcuts aren't pointing to the bat
file anymore. Has the path to them changed? Check the
shortcut Icon properties, make sure they point to the
bat file/s.



 
Reply With Quote
 
SSC Mike
Guest
Posts: n/a
 
      4th Dec 2007


"Poprivet`" wrote:

> SSC Mike wrote:
> > I have an XP machine that can no longer run .BAT
> > files. When you
> > double click them the message "Windows Cannot find
> > <filename.bat with
> > path> ...". This happens with shortcuts and the
> > original file.
> > Strangely, if I start a command prompt and cd to the
> > folder, the
> > script will run.
> >
> > I have done the virus scan, and it was negative.
> > Best I can tell, no
> > new software has been installed recently.
> >
> > I am assuming something is corrupted, but I am not
> > sure where to start
> > looking.
> >
> > Any help would be appreciated.

>
> Sounds like the shortcuts aren't pointing to the bat
> file anymore. Has the path to them changed? Check the
> shortcut Icon properties, make sure they point to the
> bat file/s.
>
>
>
>Problem occurs even if I don't use a shortcut and double click the .bat in Windows explorer.

 
Reply With Quote
 
Thee Chicago Wolf
Guest
Posts: n/a
 
      4th Dec 2007
>>Problem occurs even if I don't use a shortcut and double click the .bat in Windows explorer.

Not sure if it's 100% relevant to your situation but you might want to
see what's going on in this KB article:
http://support.microsoft.com/kb/943854

- Thee Chicago Wolf
 
Reply With Quote
 
SSC Mike
Guest
Posts: n/a
 
      4th Dec 2007


"Thee Chicago Wolf" wrote:

> >>Problem occurs even if I don't use a shortcut and double click the .bat in Windows explorer.

>
> Not sure if it's 100% relevant to your situation but you might want to
> see what's going on in this KB article:
> http://support.microsoft.com/kb/943854
>
> - Thee Chicago Wolf
>


Looking at the symptoms listed, the hot fix probably would not help. No
messages in the event log either.

Thanks for the thought though.
 
Reply With Quote
 
Thee Chicago Wolf
Guest
Posts: n/a
 
      4th Dec 2007
>> Not sure if it's 100% relevant to your situation but you might want to
>> see what's going on in this KB article:
>> http://support.microsoft.com/kb/943854
>>
>> - Thee Chicago Wolf
>>

>
>Looking at the symptoms listed, the hot fix probably would not help. No
>messages in the event log either.
>
>Thanks for the thought though.


No problem. Saw it a couple days ago and your .bat issue clicked
something in my head. Have you tried to re-create the shortcuts
already?

- Thee Chicago Wolf
 
Reply With Quote
 
SSC Mike
Guest
Posts: n/a
 
      4th Dec 2007


"Thee Chicago Wolf" wrote:

> >> Not sure if it's 100% relevant to your situation but you might want to
> >> see what's going on in this KB article:
> >> http://support.microsoft.com/kb/943854
> >>
> >> - Thee Chicago Wolf
> >>

> >
> >Looking at the symptoms listed, the hot fix probably would not help. No
> >messages in the event log either.
> >
> >Thanks for the thought though.

>
> No problem. Saw it a couple days ago and your .bat issue clicked
> something in my head. Have you tried to re-create the shortcuts
> already?
>
> - Thee Chicago Wolf
>


Problem is still there even if I don't use a shortcut and double click the
..bat in Windows explorer.
 
Reply With Quote
 
Thee Chicago Wolf
Guest
Posts: n/a
 
      4th Dec 2007
>Problem is still there even if I don't use a shortcut and double click the
>.bat in Windows explorer.


Ok, let's do a file association check. If you open Control Panel >
File Types, you shouldn't see anything for BAT extension on the
visible list.

Try the following:

From a command prompt;
assoc .bat
should return with
...bat=batfile
If not
assoc .bat=batfile
to restore the default file type association.

ftype batfile
should return with
batfile="%1" %*
If not
ftype batfile="%1" %*
to restore the default "Open" action for the file type.

- Thee Chicago Wolf
 
Reply With Quote
 
Thee Chicago Wolf
Guest
Posts: n/a
 
      4th Dec 2007
>Problem is still there even if I don't use a shortcut and double click the
>.bat in Windows explorer.


Additionally, verify the following:

HKLM\SOFTWARE\Classes\batfile\shell\open\command
make sure the Reg_Sz
(default)
value data is exactly;
"%1" %*

HKLM\SOFTWARE\Classes\batfile\shell\edit\command
make sure the Reg_Expand_Sz
(default)
value data is exactly;
%SystemRoot%\System32\NOTEPAD.EXE %1


Also look for the key;
...BAT
under
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts
and delete the key named
...BAT

- Thee Chicago Wolf
 
Reply With Quote
 
Thee Chicago Wolf
Guest
Posts: n/a
 
      4th Dec 2007
>Problem is still there even if I don't use a shortcut and double click the
>.bat in Windows explorer.


Here's a faster solution. Copy and paste the following into notepad
and save it as a .reg file. Then, double-slick the .reg and import it
into your system. I deleted my association to .BAT, tested it and
confirmed it broken, and then ran the .reg file import and it was
restored.


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.bat]
@="batfile"

[HKEY_CLASSES_ROOT\.bat\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"

[HKEY_CLASSES_ROOT\batfile]
@="MS-DOS Batch File"
"EditFlags"=hex:30,04,00,00

[HKEY_CLASSES_ROOT\batfile\DefaultIcon]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\

00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,68,00,\

65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,31,00,35,\
00,33,00,00,00

[HKEY_CLASSES_ROOT\batfile\shell]

[HKEY_CLASSES_ROOT\batfile\shell\edit]

[HKEY_CLASSES_ROOT\batfile\shell\edit\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\

00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\

54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,25,00,31,00,00,\
00

[HKEY_CLASSES_ROOT\batfile\shell\open]
"EditFlags"=hex:00,00,00,00

[HKEY_CLASSES_ROOT\batfile\shell\open\command]
@="%1" %*"

[HKEY_CLASSES_ROOT\batfile\shell\print]

[HKEY_CLASSES_ROOT\batfile\shell\print\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\

00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\

54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,2f,00,70,00,20,\
00,25,00,31,00,00,00

[HKEY_CLASSES_ROOT\batfile\shellex]

[HKEY_CLASSES_ROOT\batfile\shellex\DropHandler]
@="{86C86720-42A0-1069-A2E8-08002B30309D}"

[HKEY_CLASSES_ROOT\batfile\shellex\PropertySheetHandlers]

[HKEY_CLASSES_ROOT\batfile\shellex\PropertySheetHandlers\PifProps]
@="{86F19A00-42A0-1069-A2E9-08002B30309D}"

[HKEY_CLASSES_ROOT\batfile\shellex\PropertySheetHandlers\ShimLayer
Property Page]
@="{513D916F-2A8E-4F51-AEAB-0CBC76FB1AF8}"

- Thee Chicago Wolf
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I batch convert 97-2003 .xls files to 2007 .xlsx files =?Utf-8?B?RGF2ZSBOdXR0YWxs?= Microsoft Excel Misc 4 3rd Aug 2009 11:38 PM
How can I convert a batch of .wpd files to Word 2007 files? SPW Microsoft Word New Users 3 15th Jul 2008 05:10 AM
calling multiple batch files from within a batch file yawnmoth Windows XP General 3 26th May 2008 06:47 PM
Re: In Vista, can .wps files be converted to .rtf files as a batch i.e. instead of one at a time? DL Windows Vista General Discussion 0 20th Mar 2008 12:57 PM
Photo Editor Batch supporting batch compression JPG files 29150 Freeware 2 23rd Jun 2003 06:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:33 AM.