running batch files in XP Pro

G

Guest

So I've taken an extremely simply batch file (that runs fine in W2k), and
receive the error "[.bat filename] is not recognized as an internal or
external command...". What gives? What do I need to do in order to run
simple bat scripts in XP?
 
D

David H. Lipman

You should have to do nothing. Batch files should run equally well under either OS.

Have you done something to AUTOEXEC.NT and/or CONFIG.NT ?

--
Dave




| So I've taken an extremely simply batch file (that runs fine in W2k), and
| receive the error "[.bat filename] is not recognized as an internal or
| external command...". What gives? What do I need to do in order to run
| simple bat scripts in XP?
 
T

Tim Slattery

kevmo said:
So I've taken an extremely simply batch file (that runs fine in W2k), and
receive the error "[.bat filename] is not recognized as an internal or
external command...". What gives? What do I need to do in order to run
simple bat scripts in XP?

Put it on your PATH, or modify your PATH to include the directory
where the batch file lives. Control Panel|System|Advanced, click
"Environment Variables". Select "Path", click "Edit...".
 
D

David H. Lipman

How are you calling the batch file, explicitly or implicitly ?

That is do you just execute; MyBatch.bat or do you run it fully qualified; c:\my batch
files\MyBatch.bat ?

--
Dave




| That's what I thought...no, I haven't touched either files.
|
| "David H. Lipman" wrote:
|
| > You should have to do nothing. Batch files should run equally well under either OS.
| >
| > Have you done something to AUTOEXEC.NT and/or CONFIG.NT ?
| >
| > --
| > Dave
| >
| >
| >
| >
| > | > | So I've taken an extremely simply batch file (that runs fine in W2k), and
| > | receive the error "[.bat filename] is not recognized as an internal or
| > | external command...". What gives? What do I need to do in order to run
| > | simple bat scripts in XP?
| >
| >
| >
 
R

Rich

Besides the other things that people have said you should also look at your
file settings and you might have hide extensions for known file types (under
tools, folder options, view) checked and when this is active you can write a
batch file in notepad and save it as a batch file but what happens is its
saved as dothis.bat.txt instead of dothis.bat as you expect. So it won't
work as you expect.

Rich
 
G

Guest

I tried both - ended in same result. I'll put it in the PATH as Tim
mentioned and see if that does the trick. As for Rich's reply, I first did
think that may have been the issue, but it was a bat file and not
bat.txt...thanks guys.
 
D

David H. Lipman

Did you loose the ability to execute BAT files ?

Install the following INF file. While I don't think you are infected with the Swen, it
cures problems where executables don't execute and if the ability to execute BAT files is
corrupted, the INF file will fix it.

http://download.nai.com/products/mcafee-avert/Fixswen.inf

[Version]
Signature="$CHICAGO$"

[DefaultInstall]
AddReg=FixSwen
DelReg=EnableRegTools

[FixSwen]
HKCR, "batfile\shell\open\command",,0,"""%1"" %*"
HKCR, "comfile\shell\open\command",,0,"""%1"" %*"
HKCR, "exefile\shell\open\command",,0,"""%1"" %*"
HKCR, "piffile\shell\open\command",,0,"""%1"" %*"
HKCR, "regfile\shell\open\command",,0,"regedit.exe "%1""
HKCR, "scrfile\shell\open\command",,0,"""%1"" /S"
HKCR, "scrfile\shell\config\command",,0,"%1"

[EnableRegTools]
HKCU, "software\microsoft\windows\currentversion\policies\system","DisableRegistryTools"


--
Dave




| I tried both - ended in same result. I'll put it in the PATH as Tim
| mentioned and see if that does the trick. As for Rich's reply, I first did
| think that may have been the issue, but it was a bat file and not
| bat.txt...thanks guys.
|
| "David H. Lipman" wrote:
|
| > How are you calling the batch file, explicitly or implicitly ?
| >
| > That is do you just execute; MyBatch.bat or do you run it fully qualified; c:\my
batch
| > files\MyBatch.bat ?
| >
| > --
| > Dave
| >
| >
| >
| >
| > | > | That's what I thought...no, I haven't touched either files.
| > |
| > | "David H. Lipman" wrote:
| > |
| > | > You should have to do nothing. Batch files should run equally well under either OS.
| > | >
| > | > Have you done something to AUTOEXEC.NT and/or CONFIG.NT ?
| > | >
| > | > --
| > | > Dave
| > | >
| > | >
| > | >
| > | >
| > | > | > | > | So I've taken an extremely simply batch file (that runs fine in W2k), and
| > | > | receive the error "[.bat filename] is not recognized as an internal or
| > | > | external command...". What gives? What do I need to do in order to run
| > | > | simple bat scripts in XP?
| > | >
| > | >
| > | >
| >
| >
| >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top