PC Review


Reply
Thread Tools Rate Thread

.bat not defined; can't add it

 
 
Richard
Guest
Posts: n/a
 
      12th Jul 2007
I wrote a .bat script SayHello.bat amd got (essentially): "C:
\SayHello.bat is not a valid Win32 application."

The two line script was simply:
@echo Hello
@pause

To my surprise, "Windows Explorer | Tools | Folder options | File
types" reported consecutively: AWB, B64, BHX ... but no BAT.

I attempted to add BAT by clicking New, providing the extension
"BAT" (without the quotes), and clicking Advanced. In a moment, the
Associated File Type :MS-DOS Batch File" was reported. I clicked OK.
and Close. But I got the same symptom!

I checked to see whether BAT had, in fact, been added to XP's
registered types. It reported the same trio as shown above; no BAT.

I'm running WinXP/SP2, which is up-to-date with Windows Update.

Any ideas?

TIA,
Richard

 
Reply With Quote
 
 
 
 
SingaporeWebDesign
Guest
Posts: n/a
 
      12th Jul 2007
Hello,

Download the Batch File Association Fix here
http://www.dougknox.com/xp/file_assoc.htm

--
Singapore Web Design
http://www.bootstrike.com/Webdesign/
Singapore Web Hosting
http://www.bootstrike.com/WinXP/faq.html
Windows XP FAQ

"Richard" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I wrote a .bat script SayHello.bat amd got (essentially): "C:
> \SayHello.bat is not a valid Win32 application."
>
> The two line script was simply:
> @echo Hello
> @pause
>
> To my surprise, "Windows Explorer | Tools | Folder options | File
> types" reported consecutively: AWB, B64, BHX ... but no BAT.
>
> I attempted to add BAT by clicking New, providing the extension
> "BAT" (without the quotes), and clicking Advanced. In a moment, the
> Associated File Type :MS-DOS Batch File" was reported. I clicked OK.
> and Close. But I got the same symptom!
>
> I checked to see whether BAT had, in fact, been added to XP's
> registered types. It reported the same trio as shown above; no BAT.
>
> I'm running WinXP/SP2, which is up-to-date with Windows Update.
>
> Any ideas?
>
> TIA,
> Richard
>



 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      12th Jul 2007
Try this:
- Click Start / Run / cmd {OK}
- Type these commands and report in each case what you see:
type c:\SayHello.bat{Enter}
assoc .bat{Enter}


"Richard" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I wrote a .bat script SayHello.bat amd got (essentially): "C:
> \SayHello.bat is not a valid Win32 application."
>
> The two line script was simply:
> @echo Hello
> @pause
>
> To my surprise, "Windows Explorer | Tools | Folder options | File
> types" reported consecutively: AWB, B64, BHX ... but no BAT.
>
> I attempted to add BAT by clicking New, providing the extension
> "BAT" (without the quotes), and clicking Advanced. In a moment, the
> Associated File Type :MS-DOS Batch File" was reported. I clicked OK.
> and Close. But I got the same symptom!
>
> I checked to see whether BAT had, in fact, been added to XP's
> registered types. It reported the same trio as shown above; no BAT.
>
> I'm running WinXP/SP2, which is up-to-date with Windows Update.
>
> Any ideas?
>
> TIA,
> Richard
>



 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      12th Jul 2007
On Jul 12, 12:20 pm, "SingaporeWebDesign"
<SingaporeWebDesign_...@bootstrike.com> wrote:
> Hello,
>
> Download the Batch File Association Fix herehttp://www.dougknox.com/xp/file_assoc.htm
>
> --
> Singapore Web Designhttp://www.bootstrike.com/Webdesign/
> Singapore Web Hostinghttp://www.bootstrike.com/WinXP/faq.html
> Windows XP FAQ
>
> "Richard" <RichardDummyMailbox58...@USComputerGurus.com> wrote in message
>
> news:(E-Mail Removed)...
>
> >I wrote a .bat script SayHello.bat amd got (essentially): "C:
> > \SayHello.bat is not a valid Win32 application."

>
> > The two line script was simply:
> > @echo Hello
> > @pause

>
> > To my surprise, "Windows Explorer | Tools | Folder options | File
> > types" reported consecutively: AWB, B64, BHX ... but no BAT.

>
> > I attempted to add BAT by clicking New, providing the extension
> > "BAT" (without the quotes), and clicking Advanced. In a moment, the
> > Associated File Type :MS-DOS Batch File" was reported. I clicked OK.
> > and Close. But I got the same symptom!

>
> > I checked to see whether BAT had, in fact, been added to XP's
> > registered types. It reported the same trio as shown above; no BAT.

>
> > I'm running WinXP/SP2, which is up-to-date with Windows Update.

>
> > Any ideas?

>
> > TIA,
> > Richard


Thanks to both of you for your guidance.

I downloaded/extracted/ran .reg to repair the registration. It
reported success. However, double-clicking SayHello.bat in a new
Windows Explorer window failed. Also, the new window's File Types
displayed no BAT.

Maybe a reboot is necessary to 'clear XP's head". :-)

But the good news is that running SayHello.bat in a Command window
worked now!! (It had not earlier today.)

Here's the results requested by Pegasus:

K:\_Projects\JavaScript\ScriptValidation>SayHello.bat
Hello
Press any key to continue . . .

K:\_Projects\JavaScript\ScriptValidation>assoc.bat
..bat=batfile

K:\_Projects\JavaScript\ScriptValidation>

I'll reboot just for kicks to see if that's relevant.

Best wishes,
Richard

 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      12th Jul 2007
You don't appear to have a problem any more.


"Richard" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Jul 12, 12:20 pm, "SingaporeWebDesign"
> <SingaporeWebDesign_...@bootstrike.com> wrote:
>> Hello,
>>
>> Download the Batch File Association Fix
>> herehttp://www.dougknox.com/xp/file_assoc.htm
>>
>> --
>> Singapore Web Designhttp://www.bootstrike.com/Webdesign/
>> Singapore Web Hostinghttp://www.bootstrike.com/WinXP/faq.html
>> Windows XP FAQ
>>
>> "Richard" <RichardDummyMailbox58...@USComputerGurus.com> wrote in message
>>
>> news:(E-Mail Removed)...
>>
>> >I wrote a .bat script SayHello.bat amd got (essentially): "C:
>> > \SayHello.bat is not a valid Win32 application."

>>
>> > The two line script was simply:
>> > @echo Hello
>> > @pause

>>
>> > To my surprise, "Windows Explorer | Tools | Folder options | File
>> > types" reported consecutively: AWB, B64, BHX ... but no BAT.

>>
>> > I attempted to add BAT by clicking New, providing the extension
>> > "BAT" (without the quotes), and clicking Advanced. In a moment, the
>> > Associated File Type :MS-DOS Batch File" was reported. I clicked OK.
>> > and Close. But I got the same symptom!

>>
>> > I checked to see whether BAT had, in fact, been added to XP's
>> > registered types. It reported the same trio as shown above; no BAT.

>>
>> > I'm running WinXP/SP2, which is up-to-date with Windows Update.

>>
>> > Any ideas?

>>
>> > TIA,
>> > Richard

>
> Thanks to both of you for your guidance.
>
> I downloaded/extracted/ran .reg to repair the registration. It
> reported success. However, double-clicking SayHello.bat in a new
> Windows Explorer window failed. Also, the new window's File Types
> displayed no BAT.
>
> Maybe a reboot is necessary to 'clear XP's head". :-)
>
> But the good news is that running SayHello.bat in a Command window
> worked now!! (It had not earlier today.)
>
> Here's the results requested by Pegasus:
>
> K:\_Projects\JavaScript\ScriptValidation>SayHello.bat
> Hello
> Press any key to continue . . .
>
> K:\_Projects\JavaScript\ScriptValidation>assoc.bat
> .bat=batfile
>
> K:\_Projects\JavaScript\ScriptValidation>
>
> I'll reboot just for kicks to see if that's relevant.
>
> Best wishes,
> Richard
>



 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      13th Jul 2007
On Jul 12, 6:03 pm, "Pegasus \(MVP\)" <I....@fly.com> wrote:
> You don't appear to have a problem any more.
>
> "Richard" <RichardDummyMailbox58...@USComputerGurus.com> wrote in message
>
> news:(E-Mail Removed)...
>
> > On Jul 12, 12:20 pm, "SingaporeWebDesign"
> > <SingaporeWebDesign_...@bootstrike.com> wrote:
> >> Hello,

>
> >> Download the Batch File Association Fix
> >> herehttp://www.dougknox.com/xp/file_assoc.htm

>
> >> --
> >> Singapore Web Designhttp://www.bootstrike.com/Webdesign/
> >> Singapore Web Hostinghttp://www.bootstrike.com/WinXP/faq.html
> >> Windows XP FAQ

>
> >> "Richard" <RichardDummyMailbox58...@USComputerGurus.com> wrote in message

>
> >>news:(E-Mail Removed)...

>
> >> >I wrote a .bat script SayHello.bat amd got (essentially): "C:
> >> > \SayHello.bat is not a valid Win32 application."

>
> >> > The two line script was simply:
> >> > @echo Hello
> >> > @pause

>
> >> > To my surprise, "Windows Explorer | Tools | Folder options | File
> >> > types" reported consecutively: AWB, B64, BHX ... but no BAT.

>
> >> > I attempted to add BAT by clicking New, providing the extension
> >> > "BAT" (without the quotes), and clicking Advanced. In a moment, the
> >> > Associated File Type :MS-DOS Batch File" was reported. I clicked OK.
> >> > and Close. But I got the same symptom!

>
> >> > I checked to see whether BAT had, in fact, been added to XP's
> >> > registered types. It reported the same trio as shown above; no BAT.

>
> >> > I'm running WinXP/SP2, which is up-to-date with Windows Update.

>
> >> > Any ideas?

>
> >> > TIA,
> >> > Richard

>
>
> Thanks to both of you for your guidance.
>
> > I downloaded/extracted/ran .reg to repair the registration. It
> > reported success. However, double-clicking SayHello.bat in a new
> > Windows Explorer window failed. Also, the new window's File Types
> > displayed no BAT.

>
> > Maybe a reboot is necessary to 'clear XP's head". :-)

>
> > But the good news is that running SayHello.bat in a Command window
> > worked now!! (It had not earlier today.)

>
> > Here's the results requested by Pegasus:

>
> > K:\_Projects\JavaScript\ScriptValidation>SayHello.bat
> > Hello
> > Press any key to continue . . .

>
> > K:\_Projects\JavaScript\ScriptValidation>assoc.bat
> > .bat=batfile

>
> > K:\_Projects\JavaScript\ScriptValidation>

>
> > I'll reboot just for kicks to see if that's relevant.

>
> > Best wishes,
> > Richard


Hi Pegasus,

Perhaps my last post was unclear. I ran the .reg and got confirmation
that the Registry had been updated.

Apparently that led to a 50% improvement: my SayHello.bat executed
successfully when invoked in a Command window. Prior to the .reg
update, attempting to run the .bat file in a Command window was
rejected.

However, I still have 50% failure, even after re-booting: (1) Double-
clicking the .bat file's name in an Explorer window still fails; (2)
the File Types in the Explorer window still omits BAT; and (3) when I
add BAT and accept the "advanced" recommendation "MS-DOS Batch File"
by clicking OK, it get added at the top of the list but apparently
disappears after I close the Folder Options dialog.

Now I've gone a little further: After adding the BAT extension and
seeing it on the top of the Extensions list, I:
(1) clicked the Advance button
(2) noted that the edit action defaults to [[.....System32\Notepad.exe
%1]] use "Use DDE" checked
(3) noted that the open action defaults to [["%1" %*]]

I think the edit action is correct.

I think the open action is wrong, so before closing the Edit File Type
dialog, I changed the open action to
[[.....System32\cmd.exe /C "%1" %*]]

That seemed to come close to working: I double-clicked SayHello.bat
AND GOT A NOTEPAD WINDOW TO OPEN!

 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      13th Jul 2007
On Jul 12, 6:03 pm, "Pegasus \(MVP\)" <I....@fly.com> wrote:
> You don't appear to have a problem any more.
>
> "Richard" <RichardDummyMailbox58...@USComputerGurus.com> wrote in message
>
> news:(E-Mail Removed)...
>
> > On Jul 12, 12:20 pm, "SingaporeWebDesign"
> > <SingaporeWebDesign_...@bootstrike.com> wrote:
> >> Hello,

>
> >> Download the Batch File Association Fix
> >> herehttp://www.dougknox.com/xp/file_assoc.htm

>
> >> --
> >> Singapore Web Designhttp://www.bootstrike.com/Webdesign/
> >> Singapore Web Hostinghttp://www.bootstrike.com/WinXP/faq.html
> >> Windows XP FAQ

>
> >> "Richard" <RichardDummyMailbox58...@USComputerGurus.com> wrote in message

>
> >>news:(E-Mail Removed)...

>
> >> >I wrote a .bat script SayHello.bat amd got (essentially): "C:
> >> > \SayHello.bat is not a valid Win32 application."

>
> >> > The two line script was simply:
> >> > @echo Hello
> >> > @pause

>
> >> > To my surprise, "Windows Explorer | Tools | Folder options | File
> >> > types" reported consecutively: AWB, B64, BHX ... but no BAT.

>
> >> > I attempted to add BAT by clicking New, providing the extension
> >> > "BAT" (without the quotes), and clicking Advanced. In a moment, the
> >> > Associated File Type :MS-DOS Batch File" was reported. I clicked OK.
> >> > and Close. But I got the same symptom!

>
> >> > I checked to see whether BAT had, in fact, been added to XP's
> >> > registered types. It reported the same trio as shown above; no BAT.

>
> >> > I'm running WinXP/SP2, which is up-to-date with Windows Update.

>
> >> > Any ideas?

>
> >> > TIA,
> >> > Richard

>
> > Thanks to both of you for your guidance.

>
> > I downloaded/extracted/ran .reg to repair the registration. It
> > reported success. However, double-clicking SayHello.bat in a new
> > Windows Explorer window failed. Also, the new window's File Types
> > displayed no BAT.

>
> > Maybe a reboot is necessary to 'clear XP's head". :-)

>
> > But the good news is that running SayHello.bat in a Command window
> > worked now!! (It had not earlier today.)

>
> > Here's the results requested by Pegasus:

>
> > K:\_Projects\JavaScript\ScriptValidation>SayHello.bat
> > Hello
> > Press any key to continue . . .

>
> > K:\_Projects\JavaScript\ScriptValidation>assoc.bat
> > .bat=batfile

>
> > K:\_Projects\JavaScript\ScriptValidation>

>
> > I'll reboot just for kicks to see if that's relevant.

>
> > Best wishes,
> > Richard


The problem is half solved: SayHello.bat now runs from within a
Command window. However, double-clicking SayHello.bat's name in an
Explorer window still produces the "not a Win32 program" complaint ...
despite the fact that I had rebooted :-(

I again looked at File Types and saw no BAT extension. I added it
again, and it appeared as the first item on the extensions list. This
time I clicked the Advanced button in File Types tab.

The action for "edit" invoked Notepad with a %1 argument ... looks
right to me.
The "open" action merely invoked %1 with some argument ... that looks
circular to me.

I modified the open action to "(fully qualified) cmd.exe /c
%1" (without the quotes). Now when I double-clicked SayHello.bat, I
didn't get the "Win32" complaint. Instead a got an empty Notepad
window. That's wrong, of course, but it's *progress* :-)

I tried to go back and edit the .bat definition, but cannot find it
when I list the extensions alphabetically. When I try to re-enter BAT
as a new extension, I'm informed that "Extension bat is already
associated with File Type MS-DOS Batch File. I elected to un-
associate BAT, in which case it re-appeared at the top of the list.

This time, I clicked change but didn't get option to accept File Type
MS-DOS Batch File. I'm deleting the BAT extension and rerunning
the .reg file and see if things get any better.



 
Reply With Quote
 
Ramesh, MS-MVP
Guest
Posts: n/a
 
      13th Jul 2007
Richard,

>> I'm deleting the BAT extension and rerunning the .reg file and see if things get any better.


In case that does not help, post the .BAT file association details here.

1. Download FileExtInfo.zip from here:
http://windowsxp.mvps.org/fileextinfo.htm

2. Unzip the utility and extract the files to Desktop.
3. Double-click "FileExtInfo.exe" to run it.
4. Select ".BAT" from the list
5. Click "View file association report"
6. Copy the contents of the report and include it in your reply.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
Windows® Troubleshooting http://www.winhelponline.com


"Richard" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
On Jul 12, 6:03 pm, "Pegasus \(MVP\)" <I....@fly.com> wrote:
> You don't appear to have a problem any more.
>
> "Richard" <RichardDummyMailbox58...@USComputerGurus.com> wrote in message
>
> news:(E-Mail Removed)...
>
> > On Jul 12, 12:20 pm, "SingaporeWebDesign"
> > <SingaporeWebDesign_...@bootstrike.com> wrote:
> >> Hello,

>
> >> Download the Batch File Association Fix
> >> herehttp://www.dougknox.com/xp/file_assoc.htm

>
> >> --
> >> Singapore Web Designhttp://www.bootstrike.com/Webdesign/
> >> Singapore Web Hostinghttp://www.bootstrike.com/WinXP/faq.html
> >> Windows XP FAQ

>
> >> "Richard" <RichardDummyMailbox58...@USComputerGurus.com> wrote in message

>
> >>news:(E-Mail Removed)...

>
> >> >I wrote a .bat script SayHello.bat amd got (essentially): "C:
> >> > \SayHello.bat is not a valid Win32 application."

>
> >> > The two line script was simply:
> >> > @echo Hello
> >> > @pause

>
> >> > To my surprise, "Windows Explorer | Tools | Folder options | File
> >> > types" reported consecutively: AWB, B64, BHX ... but no BAT.

>
> >> > I attempted to add BAT by clicking New, providing the extension
> >> > "BAT" (without the quotes), and clicking Advanced. In a moment, the
> >> > Associated File Type :MS-DOS Batch File" was reported. I clicked OK.
> >> > and Close. But I got the same symptom!

>
> >> > I checked to see whether BAT had, in fact, been added to XP's
> >> > registered types. It reported the same trio as shown above; no BAT.

>
> >> > I'm running WinXP/SP2, which is up-to-date with Windows Update.

>
> >> > Any ideas?

>
> >> > TIA,
> >> > Richard

>
> > Thanks to both of you for your guidance.

>
> > I downloaded/extracted/ran .reg to repair the registration. It
> > reported success. However, double-clicking SayHello.bat in a new
> > Windows Explorer window failed. Also, the new window's File Types
> > displayed no BAT.

>
> > Maybe a reboot is necessary to 'clear XP's head". :-)

>
> > But the good news is that running SayHello.bat in a Command window
> > worked now!! (It had not earlier today.)

>
> > Here's the results requested by Pegasus:

>
> > K:\_Projects\JavaScript\ScriptValidation>SayHello.bat
> > Hello
> > Press any key to continue . . .

>
> > K:\_Projects\JavaScript\ScriptValidation>assoc.bat
> > .bat=batfile

>
> > K:\_Projects\JavaScript\ScriptValidation>

>
> > I'll reboot just for kicks to see if that's relevant.

>
> > Best wishes,
> > Richard


The problem is half solved: SayHello.bat now runs from within a
Command window. However, double-clicking SayHello.bat's name in an
Explorer window still produces the "not a Win32 program" complaint ...
despite the fact that I had rebooted :-(

I again looked at File Types and saw no BAT extension. I added it
again, and it appeared as the first item on the extensions list. This
time I clicked the Advanced button in File Types tab.

The action for "edit" invoked Notepad with a %1 argument ... looks
right to me.
The "open" action merely invoked %1 with some argument ... that looks
circular to me.

I modified the open action to "(fully qualified) cmd.exe /c
%1" (without the quotes). Now when I double-clicked SayHello.bat, I
didn't get the "Win32" complaint. Instead a got an empty Notepad
window. That's wrong, of course, but it's *progress* :-)

I tried to go back and edit the .bat definition, but cannot find it
when I list the extensions alphabetically. When I try to re-enter BAT
as a new extension, I'm informed that "Extension bat is already
associated with File Type MS-DOS Batch File. I elected to un-
associate BAT, in which case it re-appeared at the top of the list.

This time, I clicked change but didn't get option to accept File Type
MS-DOS Batch File. I'm deleting the BAT extension and rerunning
the .reg file and see if things get any better.



 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      13th Jul 2007
On Jul 12, 6:03 pm, "Pegasus \(MVP\)" <I....@fly.com> wrote:
> You don't appear to have a problem any more.
>
> "Richard" <RichardDummyMailbox58...@USComputerGurus.com> wrote in message
>
> news:(E-Mail Removed)...
>
> > On Jul 12, 12:20 pm, "SingaporeWebDesign"
> > <SingaporeWebDesign_...@bootstrike.com> wrote:
> >> Hello,

>
> >> Download the Batch File Association Fix
> >> herehttp://www.dougknox.com/xp/file_assoc.htm

>
> >> --
> >> Singapore Web Designhttp://www.bootstrike.com/Webdesign/
> >> Singapore Web Hostinghttp://www.bootstrike.com/WinXP/faq.html
> >> Windows XP FAQ

>
> >> "Richard" <RichardDummyMailbox58...@USComputerGurus.com> wrote in message

>
> >>news:(E-Mail Removed)...

>
> >> >I wrote a .bat script SayHello.bat amd got (essentially): "C:
> >> > \SayHello.bat is not a valid Win32 application."

>
> >> > The two line script was simply:
> >> > @echo Hello
> >> > @pause

>
> >> > To my surprise, "Windows Explorer | Tools | Folder options | File
> >> > types" reported consecutively: AWB, B64, BHX ... but no BAT.

>
> >> > I attempted to add BAT by clicking New, providing the extension
> >> > "BAT" (without the quotes), and clicking Advanced. In a moment, the
> >> > Associated File Type :MS-DOS Batch File" was reported. I clicked OK.
> >> > and Close. But I got the same symptom!

>
> >> > I checked to see whether BAT had, in fact, been added to XP's
> >> > registered types. It reported the same trio as shown above; no BAT.

>
> >> > I'm running WinXP/SP2, which is up-to-date with Windows Update.

>
> >> > Any ideas?

>
> >> > TIA,
> >> > Richard

>
> > Thanks to both of you for your guidance.

>
> > I downloaded/extracted/ran .reg to repair the registration. It
> > reported success. However, double-clicking SayHello.bat in a new
> > Windows Explorer window failed. Also, the new window's File Types
> > displayed no BAT.

>
> > Maybe a reboot is necessary to 'clear XP's head". :-)

>
> > But the good news is that running SayHello.bat in a Command window
> > worked now!! (It had not earlier today.)

>
> > Here's the results requested by Pegasus:

>
> > K:\_Projects\JavaScript\ScriptValidation>SayHello.bat
> > Hello
> > Press any key to continue . . .

>
> > K:\_Projects\JavaScript\ScriptValidation>assoc.bat
> > .bat=batfile

>
> > K:\_Projects\JavaScript\ScriptValidation>

>
> > I'll reboot just for kicks to see if that's relevant.

>
> > Best wishes,
> > Richard


Sorry for posting a half completed message.

Problem solved.

IMHO, the following lines in the .reg script are wrong:

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

I used regedit to modify the default for that entry to:

%SystemRoot%\system32\Cmd.exe /C "%1" %*

(Actually, I had to substitute the value of %SystemRoot% on my system
because I couldn't figure out how to change the type from REG_SZ to
REG_EXPAND_SZ.).

Thanks for all your help.

Best wishes,
Richard

 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      13th Jul 2007
On Jul 13, 12:25 am, "Ramesh, MS-MVP" <ram...@XOX.mvps.org> wrote:
> Richard,
>
> >> I'm deleting the BAT extension and rerunning the .reg file and see if things get any better.

>
> In case that does not help, post the .BAT file association details here.
>
> 1. Download FileExtInfo.zip from here:
> http://windowsxp.mvps.org/fileextinfo.htm
>
> 2. Unzip the utility and extract the files to Desktop.
> 3. Double-click "FileExtInfo.exe" to run it.
> 4. Select ".BAT" from the list
> 5. Click "View file association report"
> 6. Copy the contents of the report and include it in your reply.
>
> --
> Regards,
>
> Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
> Windows® Troubleshootinghttp://www.winhelponline.com
>
> "Richard" <RichardDummyMailbox58...@USComputerGurus.com> wrote in messagenews:(E-Mail Removed)...
>
> On Jul 12, 6:03 pm, "Pegasus \(MVP\)" <I....@fly.com> wrote:
>
>
>
> > You don't appear to have a problem any more.

>
> > "Richard" <RichardDummyMailbox58...@USComputerGurus.com> wrote in message

>
> >news:(E-Mail Removed)...

>
> > > On Jul 12, 12:20 pm, "SingaporeWebDesign"
> > > <SingaporeWebDesign_...@bootstrike.com> wrote:
> > >> Hello,

>
> > >> Download the Batch File Association Fix
> > >> herehttp://www.dougknox.com/xp/file_assoc.htm

>
> > >> --
> > >> Singapore Web Designhttp://www.bootstrike.com/Webdesign/
> > >> Singapore Web Hostinghttp://www.bootstrike.com/WinXP/faq.html
> > >> Windows XP FAQ

>
> > >> "Richard" <RichardDummyMailbox58...@USComputerGurus.com> wrote in message

>
> > >>news:(E-Mail Removed)...

>
> > >> >I wrote a .bat script SayHello.bat amd got (essentially): "C:
> > >> > \SayHello.bat is not a valid Win32 application."

>
> > >> > The two line script was simply:
> > >> > @echo Hello
> > >> > @pause

>
> > >> > To my surprise, "Windows Explorer | Tools | Folder options | File
> > >> > types" reported consecutively: AWB, B64, BHX ... but no BAT.

>
> > >> > I attempted to add BAT by clicking New, providing the extension
> > >> > "BAT" (without the quotes), and clicking Advanced. In a moment, the
> > >> > Associated File Type :MS-DOS Batch File" was reported. I clicked OK.
> > >> > and Close. But I got the same symptom!

>
> > >> > I checked to see whether BAT had, in fact, been added to XP's
> > >> > registered types. It reported the same trio as shown above; no BAT.

>
> > >> > I'm running WinXP/SP2, which is up-to-date with Windows Update.

>
> > >> > Any ideas?

>
> > >> > TIA,
> > >> > Richard

>
> > > Thanks to both of you for your guidance.

>
> > > I downloaded/extracted/ran .reg to repair the registration. It
> > > reported success. However, double-clicking SayHello.bat in a new
> > > Windows Explorer window failed. Also, the new window's File Types
> > > displayed no BAT.

>
> > > Maybe a reboot is necessary to 'clear XP's head". :-)

>
> > > But the good news is that running SayHello.bat in a Command window
> > > worked now!! (It had not earlier today.)

>
> > > Here's the results requested by Pegasus:

>
> > > K:\_Projects\JavaScript\ScriptValidation>SayHello.bat
> > > Hello
> > > Press any key to continue . . .

>
> > > K:\_Projects\JavaScript\ScriptValidation>assoc.bat
> > > .bat=batfile

>
> > > K:\_Projects\JavaScript\ScriptValidation>

>
> > > I'll reboot just for kicks to see if that's relevant.

>
> > > Best wishes,
> > > Richard

>
> The problem is half solved: SayHello.bat now runs from within a
> Command window. However, double-clicking SayHello.bat's name in an
> Explorer window still produces the "not a Win32 program" complaint ...
> despite the fact that I had rebooted :-(
>
> I again looked at File Types and saw no BAT extension. I added it
> again, and it appeared as the first item on the extensions list. This
> time I clicked the Advanced button in File Types tab.
>
> The action for "edit" invoked Notepad with a %1 argument ... looks
> right to me.
> The "open" action merely invoked %1 with some argument ... that looks
> circular to me.
>
> I modified the open action to "(fully qualified) cmd.exe /c
> %1" (without the quotes). Now when I double-clicked SayHello.bat, I
> didn't get the "Win32" complaint. Instead a got an empty Notepad
> window. That's wrong, of course, but it's *progress* :-)
>
> I tried to go back and edit the .bat definition, but cannot find it
> when I list the extensions alphabetically. When I try to re-enter BAT
> as a new extension, I'm informed that "Extension bat is already
> associated with File Type MS-DOS Batch File. I elected to un-
> associate BAT, in which case it re-appeared at the top of the list.
>
> This time, I clicked change but didn't get option to accept File Type
> MS-DOS Batch File. I'm deleting the BAT extension and rerunning
> the .reg file and see if things get any better.


Hi Ramesh,

Thanks for your offer of additional help. Please refer to my last
reply to Pegasus where I spell out my solution.

Best wishes,
Richard

 
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
Run-time error '50290': Application-defined or object-defined erro Macro button Microsoft Excel Misc 1 12th Mar 2009 10:59 AM
User defined type not defined error in mail merge from Access 2003 Caroline Higson Microsoft Access 1 2nd Nov 2006 02:44 PM
Copying A Range of Cells From one Sheet to Another - Error Application Defined or Object Defined Matt Microsoft Excel Programming 3 25th Jul 2006 01:13 AM
RE: Runtime error 1004- application defined or object defined erro =?Utf-8?B?Tm92aWNl?= Microsoft Excel Programming 0 6th Feb 2006 09:34 PM
RE: Runtime error 1004- application defined or object defined erro =?Utf-8?B?Tm92aWNl?= Microsoft Excel Programming 1 6th Feb 2006 09:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:27 AM.