Computing.Net > Forums > Disk Operating System > Dos usb autoexec problem

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Dos usb autoexec problem

Reply to Message Icon

Name: imweso
Date: August 8, 2008 at 12:45:42 Pacific
OS: XP
CPU/Ram: INTEL 512
Product: HP
Comment:

I boot into DOS. The computer, using DI1000DD.SYS and USBASPI.SYS at boot finds the USB stick and assigns a drive letter. D: in this case. And gives me the c: prompt.

The first time I try to change to D:, I get
"Invalid media type Reading drive D"
"Abort, Retry, Fail" If I type Retry, return,everything works from there on.

Now, I would like to use the autoexec.bat file to change to drive d:, handle the "invalid media type reading drive D: Abort, Retry, Fail" error by entering retry and a return then load and run a program that uses data from Drive D:.

I can't figure out how to do this. Can anybody help me out.

I found a post that recommends using a bat file from USB.ZIP but I can't find this ZIP file or the Bat file.

Thanks much
IMWESO




Sponsored Link
Ads by Google

Response Number 1
Name: itguru
Date: August 8, 2008 at 13:27:31 Pacific
Reply:

What version of **-DOS ?? You state O/S XP which has no MS-DOS !!

Does the version of **-DOS support reading the file system the Flash Media is formatted with ?

Last but not least the USBASPI drivers are not mature, Linux is a better solution...


0

Response Number 2
Name: Mechanix2Go
Date: August 8, 2008 at 13:28:56 Pacific
Reply:

Trying to change to a drive which is not ready usually results in grief. Try this in you bat:

:tryagain
dir d:
if errorlevel 1 goto :tryagain


=====================================
If at first you don't succeed, you're about average.

M2


0

Response Number 3
Name: imweso
Date: August 8, 2008 at 15:09:53 Pacific
Reply:

itguru

I'm playing with a little computer with a small flash drive. Using DOS 6.22. trying to do a JPG display. I need to put the pictures on a large flash drive. Ive tried formating the stick in DOS. Does not help. I still get the error.

Mechanix2Go

Could it be that easy? What I have tried so far sends me into never, never land. I've also tried walking through an errorlevel 1 and a goto but It stops and displays the error message. Never gets to the errorlevel line.

Any other ideas? Ive been trying to beat this for a week now. Don't know much about batch files.

IMWESO


0

Response Number 4
Name: imweso
Date: August 8, 2008 at 19:14:52 Pacific
Reply:

Mechanix2Go

Tried this autoexec.bat

@echo off
path=c:\;c:\dos
:tryagain
dir d:
if errorlevel 1 goto :tryagain
c:\lxpic.com d:\ /13 /A /y


Boots, finds stick, assigns drive D:,
prints to screen
"Invalid media type Reading drive D"
"Abort, Retry, Fail"
I type "r". The directory of D: prints to screen then the last line of the bat runs and the program runs fine.

I'm trying to run this without a keyboard. I need to find a way to get the autoexec.bat
to do it all.

Or, find out why I'm getting the error in the first place. Apparently most people don't get this error.

Any help would be appreciated.

Thanks much
IMWESO


0

Response Number 5
Name: itguru
Date: August 8, 2008 at 21:27:54 Pacific
Reply:

MS-DOS 6.22 natively supports FAT12 & FAT16 and max 2GB FAT16 Partition Size...........


0

Related Posts

See More



Response Number 6
Name: Mechanix2Go
Date: August 9, 2008 at 02:56:40 Pacific
Reply:

Since you said it worked after responding "R", my theory was to give it time to 'wake up'.

Try to pipe a retry:

echo r | d:


=====================================
If at first you don't succeed, you're about average.

M2


0

Response Number 7
Name: imweso
Date: August 14, 2008 at 12:59:33 Pacific
Reply:

Well I finally found a way to boot into my DOS program with the autoexec.bat file without getting the error message.
I found a check drive batch file on the net at---
"//home7.inet.tele.dk/batfiles/batfiles.htm".
(Left off the HTTP. Don't know what your rules are on this site.)

I installed this batch file on drive C:.

ISDRIVE.BAT (The second rem line tells you to replace the 1 after the % sign with the drive letter of the drive to be checked. In my case %D without the colon.)

:: isdrive.bat
:: parm1 is drive letter without colon
@ECHO off
CTTY nul
%COMSPEC%/F/CDIR/ADH/W/-P %D: |FIND.EXE ":\" >nul
CTTY con
:: %opt%ECHO Esc[2A
IF not errorlevel=1 ECHO. drive %D valid
IF errorlevel=1 ECHO. drive %D invalid
::

Then, called the batch file from within the autoexec.bat.

autoexec.bat

@echo off
path=c:\;c:\dos
call c:\isdrive.bat
c:\lxpic.com d:\ /13 /A /y

The computer boots and runs my program without stopping the batch file for an "r" input from the keyboard.

I don't know why this works but I'm tickled pink.

By the way, the LZPIC.COM program makes a great JPG slideshow on an old DOS computer.

IMWESO


0

Response Number 8
Name: Mechanix2Go
Date: August 14, 2008 at 14:15:34 Pacific
Reply:

I don't know why either.

Some of those comspec switches are news to me.

This bit won't do much of anything:

IF not errorlevel=1 ECHO. drive %D valid
IF errorlevel=1 ECHO. drive %D invalid

To test for equality you need DOUBLE =, like this:

IF not errorlevel==1 ECHO. drive %D valid
IF errorlevel==1 ECHO. drive %D invalid


=====================================
If at first you don't succeed, you're about average.

M2


0

Response Number 9
Name: imweso
Date: August 14, 2008 at 23:00:05 Pacific
Reply:

I ran isdrive.bat outside of the autoexec.bat and it returned "drive d valid"
so that line must be working. Or maybe I'm missing something.

I do have one question though. Isn't this line remed out? :: %opt%ECHO Esc[2A
If not what does it do?

IMWESO


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Dos usb autoexec problem

NT DOS external Command Problem Need mor www.computing.net/answers/dos/nt-dos-external-command-problem-need-mor/8371.html

DOS USB driver for Dell E1505 www.computing.net/answers/dos/dos-usb-driver-for-dell-e1505-/16201.html

DOS USB CD boot disk www.computing.net/answers/dos/dos-usb-cd-boot-disk/16163.html