Computing.Net > Forums > Disk Operating System > Windows XP MS-DOS Startup Disk

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

Windows XP MS-DOS Startup Disk

Reply to Message Icon

Original Message
Name: WhoAmI
Date: August 2, 2005 at 09:06:20 Pacific
Subject: Windows XP MS-DOS Startup Disk
OS: Windows XP Pro
CPU/Ram: P4-M 2ghz, 512 mb ram
Comment:

I'm trying to make a universal network boot disk which is based off of the XP MS-DOS Startup disk (see http://www.netbootdisk.com/). The problem is that the ERRORLEVEL variable is never set when using this bootdisk (which I need for testing in a batch file).

Example:
- Open up command.com (or cmd.com) in XP.
- type in "dir"
- type in "echo %errorlevel%"

This should output the number 0 (saying that the dir command had no error's of course).

Now do the same thing using the boot disk created with XP (right click floppy drive, select Format, select "Create and MS-DOS startup disk.").

All this outputs is "ECHO is on" - the same thing if you just typed in "echo."

Does anyone have any ideas? Thanks!

(BTW: so far I'm having the same problem when using a PC-DOS 7 bootdisk as well)


Report Offensive Message For Removal


Response Number 1
Name: Mechanix2Go
Date: August 2, 2005 at 09:50:31 Pacific
Reply: (edit)

I don't know what king of DOS disk XP creates.

But AFAIK, no DOS command interpreter has %errorlevel% built in.

The XP cmd.exe & command.com do.

So you're stuck with the klunky DOS approach.

::== some.bat
@echo off
someapp
if errorlevel 4 goto :4
if errorlevel 3 goto :3
[and so on]

:4
set errorlevel=4
goto :eof
:3
set errorlevel=3
goto :eof
[and so on]

:eof
::===


M2


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


Report Offensive Follow Up For Removal

Response Number 2
Name: WhoAmI
Date: August 2, 2005 at 11:01:24 Pacific
Reply: (edit)

I was so close too! I had tried doing what you had, only I didn't have the errorlevel's in descending order. Thank you very much!


Report Offensive Follow Up For Removal

Response Number 3
Name: Mechanix2Go
Date: August 2, 2005 at 11:08:32 Pacific
Reply: (edit)

Hi,

I learned that a long time ago; the hard way.

good luck

M2


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


Report Offensive Follow Up For Removal







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








Do you have a Desktop Computer anymore?

No
Yes, but only at work
Yes, but its rarely used
Yes, and its a workhorse


View Results

Poll Finishes Today.
Discuss in The Lounge
Poll History




Data Recovery Software