Home / Microsoft / Microsoft DOS / "Bad command or file name" during system restore
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: 1 2 [All] - (Bottom) Print
Author Topic: "Bad command or file name" during system restore  (Read 2594 times)
tom97531
Topic Starter
Rookie



Posts: 11


« on: March 07, 2010, 09:19:56 AM »

I have an Emachine T2542 Desktop. I'm trying to do a complete restore using the Restore CD's that came with the computer. After inserting the disk, I reboot the computer and get the following:

System Restore Menu/ WIndows XP
1. Restore WIndows Xp
2. Boot to command prompt from CD-ROM

Please select 1 or 2: [1,2]? 2

No matter which one I select, I get "Bad command or file name"

A:\> <<(What do I type here?)

Whenever I type something in the provided space, I get the same message. Please help.
IP logged
mat123
Hopeful



Thanked: 16
Posts: 228

Experience: Familiar
OS: Windows XP

1 1 1
« Reply #1 on: March 07, 2010, 05:09:07 PM »

Do you have a floppy
IP logged



tom97531
Topic Starter
Rookie



Posts: 11


« Reply #2 on: March 07, 2010, 08:34:32 PM »

The computer has a floppy drive, but I don't have a floppy disk to restore the computer.
IP logged
mat123
Hopeful



Thanked: 16
Posts: 228

Experience: Familiar
OS: Windows XP

1 1 1
« Reply #3 on: March 07, 2010, 09:09:05 PM »

if you have a blank floppy than download this file run it and let the computer boot from the floppy run restore from there
http://www.allbootdisks.com/downloads/Disks/Windows_98_Boot_Disk_Download49/Automatic%20Boot%20Disk/Windows98.exe :)
IP logged



BC_Programmer
Mastermind


Thanked: 697
Posts: 15,865

Computer: Specs
Experience: Beginner
OS: Windows 7


Pinkie Pie is best pony

BC-Programming.com 1 1
« Reply #4 on: March 08, 2010, 04:20:51 AM »

how are you supposed to run a Windows XP restore from a Windows 98 Boot disk?
IP logged

My Blog

BASeBlock 2.3.0 (NOW WITH MACGUFFINS!)
mat123
Hopeful



Thanked: 16
Posts: 228

Experience: Familiar
OS: Windows XP

1 1 1
« Reply #5 on: March 08, 2010, 06:05:19 PM »

that error message sounds like a missing command interpreter
IP logged



BC_Programmer
Mastermind


Thanked: 697
Posts: 15,865

Computer: Specs
Experience: Beginner
OS: Windows 7


Pinkie Pie is best pony

BC-Programming.com 1 1
« Reply #6 on: March 09, 2010, 12:36:47 AM »

that error message sounds like a missing command interpreter

Well it's not. Windows NT doesn't have a command interpreter that is required for boot-up.

Whenever I type something in the provided space, I get the same message. Please help.

type "dir" and report what it says.
IP logged

My Blog

BASeBlock 2.3.0 (NOW WITH MACGUFFINS!)
tom97531
Topic Starter
Rookie



Posts: 11


« Reply #7 on: March 09, 2010, 08:05:09 PM »

After typing "dir" I get a very long list "country, bug, display, etc." followed by

27 files   1,422,108 bytes
0 dirs          28,672 bytes free

Do I scrap mat123's idea about the floppy? Finally got a hold of one today but seems to be a bad disk. I can get more tomorrow.
IP logged
Geek-9pm
Sage



Thanked: 373
Posts: 8,916

Computer: Specs
Experience: Expert
OS: Windows XP


Geek After Dark

Geek 9pm blog
« Reply #8 on: March 10, 2010, 01:27:01 AM »

Try it again.
Do NOT use the number pad.
Use the numbers at the top of the keyboard.


IP logged

tom97531
Topic Starter
Rookie



Posts: 11


« Reply #9 on: March 10, 2010, 08:51:39 AM »

"Use the numbers at the top of the keyboard."


Already tried that and just tried it again. Still get "Bad command or file name".
IP logged
Geek-9pm
Sage



Thanked: 373
Posts: 8,916

Computer: Specs
Experience: Expert
OS: Windows XP


Geek After Dark

Geek 9pm blog
« Reply #10 on: March 10, 2010, 10:51:15 AM »

I was guessing. Bad guess.
You said you can do the 'DIR' command, so the system is there and reads your keyboard OK.
Is there an AUTOEXEC.BAT file present?'
If so, Do this: (the purple letters.)
A:>type autoexec.bat
Also:
A:>type config.sys

Maybe  that will provide a clue.
 
IP logged

patio
Moderator
Genius



Thanked: 1069
Posts: 11,344

Experience: Beginner
OS: Windows 7


Maud' Dib

« Reply #11 on: March 10, 2010, 10:58:19 AM »

dir with the p switch lets you use the spacebar to scroll thru all  the info...
Usage : dir /p Enter...
IP logged

   
"
All generalizations are false, including this one.  "
tom97531
Topic Starter
Rookie



Posts: 11


« Reply #12 on: March 10, 2010, 02:17:00 PM »

Following "type autoexec.bat":

(Missing some info off top of screen), then

:Restore

@echo off
ghost -clone,mode=load,src=R:\T2542.gho,dst=1 -sure -ntil

cls

ECHO.

WINDOWS XP RESTORE COMPLETE
THE HARD DISK CONTENTS HAVE BEEN RESTORED.

** STORE THIS CD-ROM IN A SAFE LOCATION! **

ECHO REMOVE THIS CD ROM FROM THE TRAY AND PRESS ANY KEY TO REBOOT THE SYSTEM..

a:\EJECTCD.exe r:

pause
a:\Reboot.exe

goto exit

:exit

A:\>


Pressing any key does nothing


Following "type config.sys":

BUFFERS=20
FILES=60
DOS=HIGH,UMB
stacks=9,256
lastdrive=z
shell=a:\command.com a:\ /p
devicehigh=ansi.sys
devicehigh=oakcdrom.sys /D:GEMCD001
REM Uncomment4UK
rem devicehigh=display.sys con=(ega,,1)
rem country=044,850,country.sys
A:\>



Following "dir /p":

ANSI SYS 9,719
AUTOEXEC BAT 2,134
CHKDSK EXE 27,968
CHOICE COM 1,754
COMMAND COM 93,040
CONFIG SYS 242
COUNTRY SYS 30,722
DEBUG EXE 20,490
DISPLAY SYS 13,207
DOSKEY COM 15,495
EDIT COM 69,854
EGA CPI 58,870
EJECTCD EXE 8,603
EM_LOCK EXE 7,729
FDISK EXE 66,060
FORMAT COM 64,247
GHOST EXE 644,976
HIMEM SYS 4,768
IO SYS 116,736
KEYB COM 12,187
KEYBOARD SYS 34,566
MODE COM 29,239
MSCDEX EXE 25,473
MSDOS SYS 9
OAKCDROM SYS 41,302
REBOOT EXE 755
SYS COM 21,943

27 FILES 1,422,108 BYTES
0 DIRS 28,672 BYTES FREE
IP logged
Veltas
Intermediate



Thanked: 7
Posts: 154

Certifications: List
Computer: Specs
Experience: Experienced
OS: Windows 7

1
« Reply #13 on: March 11, 2010, 03:53:49 AM »

Try:
A:/>TYPE AUTOEXEC.BAT|MORE

This will show contents of AUTOEXEC.BAT file in the MORE utility, press spacebar to advance a screen's information, and enter to advance a line.
IP logged
tom97531
Topic Starter
Rookie



Posts: 11


« Reply #14 on: March 11, 2010, 08:45:09 AM »

Try:
A:/>TYPE AUTOEXEC.BAT|MORE

Says:

Write protect error writing drive A
IP logged
BC_Programmer
Mastermind


Thanked: 697
Posts: 15,865

Computer: Specs
Experience: Beginner
OS: Windows 7


Pinkie Pie is best pony

BC-Programming.com 1 1
« Reply #15 on: March 11, 2010, 10:03:39 AM »

Quote
ghost -clone,mode=load,src=R:\T2542.gho,dst=1 -sure -ntil

if you want to restore, run that command.


IP logged

My Blog

BASeBlock 2.3.0 (NOW WITH MACGUFFINS!)
Veltas
Intermediate



Thanked: 7
Posts: 154

Certifications: List
Computer: Specs
Experience: Experienced
OS: Windows 7

1
« Reply #16 on: March 11, 2010, 11:06:20 AM »

What problem are you actually having that is causing you to use recovery?

If your OS doesn't load and you just get a flashing line, then you can remedy this with the A:\> thing you have, type 'FDISK /CMBR C' (without apostrophes)

(if that fails try 'FDISK /CMBR C:')
(if even that fails try 'C:' and then 'FDISK /MBR')
IP logged
BC_Programmer
Mastermind


Thanked: 697
Posts: 15,865

Computer: Specs
Experience: Beginner
OS: Windows 7


Pinkie Pie is best pony

BC-Programming.com 1 1
« Reply #17 on: March 11, 2010, 12:31:12 PM »

What problem are you actually having that is causing you to use recovery?

If your OS doesn't load and you just get a flashing line, then you can remedy this with the A:\> thing you have, type 'FDISK /CMBR C' (without apostrophes)

(if that fails try 'FDISK /CMBR C:')
(if even that fails try 'C:' and then 'FDISK /MBR')

It's FDISK /MBR C:

And unless you want to clobber the Windows XP MBR code with a windows 9x/DOS version it's probably not a good idea.
IP logged

My Blog

BASeBlock 2.3.0 (NOW WITH MACGUFFINS!)
tom97531
Topic Starter
Rookie



Posts: 11


« Reply #18 on: March 11, 2010, 04:43:34 PM »

What problem are you actually having that is causing you to use recovery?

My computer has a 40 GB hard drive. I did a restore a while back, now it shows the only drive as:

2.57 GB USED
3.19 GB FREE
5.77 GB TOTAL CAPACITY

I get a low memory warning very quickly.

This has happened to me once before when it was under warranty and tech support helped me increase my drive capacity by doing another restore, but I don't remember exactly what he did. I am trying to do another restore hoping it will fix the problem.


                 --UPDATE--

BC_Programmer 's suggestion (ghost -clone,mode=load,src=R:\T2542.gho,dst=1 -sure -ntil) did the trick. Unfortunately, it's still showing the hard drive as 5.77 GB. I'm going to consider this topic resloved since I was able to complete my restore and will now repost my new problem (low capacity hard drive) under another topic.

Thanks to all!
IP logged
Veltas
Intermediate



Thanked: 7
Posts: 154

Certifications: List
Computer: Specs
Experience: Experienced
OS: Windows 7

1
« Reply #19 on: March 12, 2010, 01:17:28 AM »

It's FDISK /MBR C:

And unless you want to clobber the Windows XP MBR code with a windows 9x/DOS version it's probably not a good idea.

You sure about that?  I thought an XP recovery disc allowed an XP MBR to be made, oh well; best not to try it!

:Restore
@echo off
ghost -clone,mode=load,src=R:\T2542.gho,dst=1 -sure -ntil


Nice one BC_Programmer, didn't spot that (although the 'XP RESTORE COMPLETE' afterwards probably should have rung bells in my head.

Also, what on earth is this bit for:
goto exit

:exit

Looks like space wasn't an issue, eh?
IP logged
BC_Programmer
Mastermind


Thanked: 697
Posts: 15,865

Computer: Specs
Experience: Beginner
OS: Windows 7


Pinkie Pie is best pony

BC-Programming.com 1 1
« Reply #20 on: March 12, 2010, 07:09:59 AM »

You sure about that?  I thought an XP recovery disc allowed an XP MBR to be made, oh well; best not to try it!

The only thing that would even remotely possibly make a XP MBR would be the recovery console. And that doesn't have a FDISK command; the proper way is FIXMBR.

In this case, it looks more like a DOS installation booting to run ghost, in which case FDISK (if present) would write a DOS MBR.

basically, for windows and DOS from windows 9x/ME and earlier, you would use FDISK /MBR; for Windows NT (including XP) you use FIXMBR. Except for Vista and Windows 7, since I've never had to run a recovery of any sort on those systems (it's probably part of the "repair" on the discs, though).

Of course, this little "recovery" disc is a bit strange- It's really just a shell around ghost. I was going to say I was surprised but then I saw this was an eMachines - (which also explains why they didn't create the menu properly, heh)

Another thing that half-confirms that this is a rather standard MS-DOS OS, rather then some sort of recovery console thingamajig, was the seemingly peculiar operation of "MORE". with Pre-NT "command.com" the pipe redirection character would be performed via the creation of some temporary files. Normally, these are created in the "TEMP" directory (that is, using the environment variable). However, when no TEMP variable is set, it just uses the current directory. In this case, since the installation is really running off of a read-only media, it can't.


Quote

Also, what on earth is this bit for:

My guess is the batch wasn't written by a human but by a program or something, which might explain that.





IP logged

My Blog

BASeBlock 2.3.0 (NOW WITH MACGUFFINS!)
Geek-9pm
Sage



Thanked: 373
Posts: 8,916

Computer: Specs
Experience: Expert
OS: Windows XP


Geek After Dark

Geek 9pm blog
« Reply #21 on: March 12, 2010, 11:02:21 AM »

Quote
My guess is the batch wasn't written by a human but by a program programmerr or something, which might explain that.
Yes, not written by a human!
But maybe a programmer!
IP logged

Pages: 1 2 [All] - (Top) Print 
Home / Microsoft / Microsoft DOS / "Bad command or file name" during system restore « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.134 seconds with 19 queries.