DYK that a PC started with Win98SE DOS startup diskette...
DYK that a PC started with Win98SE DOS startup diskette...
Did you know that a PC started with DOS bootable diskette (formatted using Windows Explorer in Win98SE) can read files on a USB flash drive?
Several weeks ago, I learned that "HP USB Disk Storage Format Tool" easily creates a DOS bootable USB flash drive. Not only is the USB drive bootable, but it enables you to select the version of DOS of your choice. The user is required to provide his own licensed version of DOS. I prefer DOS from Win98SE DOS startup diskette.
By accident, I left my DOS bootable USB flash drive in my PC while "tinkering with" config.sys and autoexec.bat file on my Win98SE DOS startup diskette. Guess what? Drive C: was assigned to my DOS bootable USB 2GB flash drive. I powered-down my PC and swapped with non-modified USB 2GB flash drive. Drive C: disappeared.
----------------------
My newly discovered DOS bootable USB flash drive has brought life back to my old DOS-based Personal DB programs.
I've learned that Win98SE DOS startup diskette uses "RAMDRIVE.SYS" to create a RAM drive with a unused drive letter and a unique volume name. Then, it uses "SETRAMD.BAT" and "FINDRAMD.EXE" to set DOS variable - %RAMD% - to corresponding letter of RAM drive.
I would like to set another DOS variable - e.g. %FLASHD% - to the corresponding letter of USB Flash Drive. Yes, I know that, in all probability, it will be "Drive C:" More specifically, I would like to test, in DOS Batch file, whether user remembered to place the correct flash drive (i.e. volume name) in the USB port.
Is anyone aware of any other DOS programs similar to "FINDRAMD.EXE"?
Several weeks ago, I learned that "HP USB Disk Storage Format Tool" easily creates a DOS bootable USB flash drive. Not only is the USB drive bootable, but it enables you to select the version of DOS of your choice. The user is required to provide his own licensed version of DOS. I prefer DOS from Win98SE DOS startup diskette.
By accident, I left my DOS bootable USB flash drive in my PC while "tinkering with" config.sys and autoexec.bat file on my Win98SE DOS startup diskette. Guess what? Drive C: was assigned to my DOS bootable USB 2GB flash drive. I powered-down my PC and swapped with non-modified USB 2GB flash drive. Drive C: disappeared.
----------------------
My newly discovered DOS bootable USB flash drive has brought life back to my old DOS-based Personal DB programs.
I've learned that Win98SE DOS startup diskette uses "RAMDRIVE.SYS" to create a RAM drive with a unused drive letter and a unique volume name. Then, it uses "SETRAMD.BAT" and "FINDRAMD.EXE" to set DOS variable - %RAMD% - to corresponding letter of RAM drive.
I would like to set another DOS variable - e.g. %FLASHD% - to the corresponding letter of USB Flash Drive. Yes, I know that, in all probability, it will be "Drive C:" More specifically, I would like to test, in DOS Batch file, whether user remembered to place the correct flash drive (i.e. volume name) in the USB port.
Is anyone aware of any other DOS programs similar to "FINDRAMD.EXE"?
Tuus-built T61: T8100 2.1 GHz, SXGA+, NVS140M, Patriot 4GB PC2-6400 DDR2-800, Samsung 840 120GB; Thinkpad T30: P4M 1.8 GHz, HYNIX 512 MB PC2700S DDR, Hitachi Travelstar 7K100 100GB; SilverStone Raven RVS01; 97 Volvo 850-R, 85 Mitsubishi Starion-ES, Keilwerth SX-90R, Ensoniq TS-12, Kawai EP-608
Re: DYK that a PC started with Win98SE DOS startup diskette...
Google says:
------------------
@echo off
if "%1"=="ReCuRs" goto loop (Recursion Handler)
set ramd=
%0 ReCuRs c d e f g h i j k l m n o p q r s t u v w x y z
:loop
echo "*** B4 Shift ***"
echo " Perc0 = " %0%
echo " Perc1 = " %1%
echo " Comspec= " %comspec%
pause
shift
echo "*** Af Shift ***"
echo " Perc0 = " %0%
echo " Perc1 = " %1%
echo " Comspec= " %comspec%
pause
if "%1"=="" goto end
%comspec% /f /cvol %1: |find /i "ramdrive" >nul
if errorlevel=1 goto loop
set ramd=%1
:end
if not "%ramd%"=="" echo. Ram drive is %ramd%
if "%ramd%"=="" echo. Ram drive not found
----------------------
Apparently "command.com" has three parmeters:
/f - I don't know
/cvol - displays volume label name
<drive>: - desired drive
| - "pipe" the displayed data to the next DOS command
Apparently "Find.exe" is a DOS command. I received a DOS "Bad command or filename" error message, until I finally figured out that I needed to copy it over from my Win98SE machine.
/i - not case sensitive
<string> - string contents
Now, I can modify the string parameter:
"MS-RAMDRIVE" -- when found, set %RAMD% to %1
"PDB_DATA" -- when found, set %FLASHD% to %1
"Invalid Drive Specification" -- when found, set %CDROM% to %1.
Later, assign drive letter to CD drive:
LoadHigh MSCDEX.EXE /D:mscd001 /L:%CDROM%
------------------
@echo off
if "%1"=="ReCuRs" goto loop (Recursion Handler)
set ramd=
%0 ReCuRs c d e f g h i j k l m n o p q r s t u v w x y z
:loop
echo "*** B4 Shift ***"
echo " Perc0 = " %0%
echo " Perc1 = " %1%
echo " Comspec= " %comspec%
pause
shift
echo "*** Af Shift ***"
echo " Perc0 = " %0%
echo " Perc1 = " %1%
echo " Comspec= " %comspec%
pause
if "%1"=="" goto end
%comspec% /f /cvol %1: |find /i "ramdrive" >nul
if errorlevel=1 goto loop
set ramd=%1
:end
if not "%ramd%"=="" echo. Ram drive is %ramd%
if "%ramd%"=="" echo. Ram drive not found
----------------------
Apparently "command.com" has three parmeters:
/f - I don't know
/cvol - displays volume label name
<drive>: - desired drive
| - "pipe" the displayed data to the next DOS command
Apparently "Find.exe" is a DOS command. I received a DOS "Bad command or filename" error message, until I finally figured out that I needed to copy it over from my Win98SE machine.
/i - not case sensitive
<string> - string contents
Now, I can modify the string parameter:
"MS-RAMDRIVE" -- when found, set %RAMD% to %1
"PDB_DATA" -- when found, set %FLASHD% to %1
"Invalid Drive Specification" -- when found, set %CDROM% to %1.
Later, assign drive letter to CD drive:
LoadHigh MSCDEX.EXE /D:mscd001 /L:%CDROM%
Tuus-built T61: T8100 2.1 GHz, SXGA+, NVS140M, Patriot 4GB PC2-6400 DDR2-800, Samsung 840 120GB; Thinkpad T30: P4M 1.8 GHz, HYNIX 512 MB PC2700S DDR, Hitachi Travelstar 7K100 100GB; SilverStone Raven RVS01; 97 Volvo 850-R, 85 Mitsubishi Starion-ES, Keilwerth SX-90R, Ensoniq TS-12, Kawai EP-608
-
RealBlackStuff
- Admin
- Posts: 17512
- Joined: Mon Sep 18, 2006 5:17 am
- Location: Mt. Cobb, PA USA
- Contact:
Re: DYK that a PC started with Win98SE DOS startup diskette...
No offense meant, but rather than bore us to death with ancient DOS stuff, go read up on it e.g. here: http://www.computerhope.com/overview.htm
Lovely day for a Guinness! (The Real Black Stuff)
Check out The Boardroom for Parts, Mods and Other Services.
Check out The Boardroom for Parts, Mods and Other Services.
Re: DYK that a PC started with Win98SE DOS startup diskette...
Clarification --
Any Windows XP DOS bootable startup CD can read files on any USB FAT16 or FAT32 partitioned Flash Drive. Typically, the USB Flash Drive remains hidden behind the NTFS partitioned C: Drive. By moving the USB FLash Drive ahead of the primary HDD in Bios setup, the USB Flash Drive suddenly appears. The USB Flash Drive does NOT have to be formatted with HP USB Format Tool as I originally posted.
This post is provided for anyone who uses "Google" to learn how to identify which drive letters are assigned during the DOS start-up process.
Windows 98 startup disk contains a *.bat (SETRAMD.BAT) which identifies the drive letter that was assigned to the RAM Disk. However, it produces an error message when the primary HDD is partitioned in NTFS, instead of FAT32. Here is an updated version.
:: SETRAMD.BAT
@echo off
set LglDrv=27 * 26 Z 25 Y 24 X 23 W 22 V 21 U 20 T 19 S 18 R 17 Q 16 P 15
set LglDrv=%LglDrv% O 14 N 13 M 12 L 11 K 10 J 9 I 8 H 7 G 6 F 5 E 4 D 3 C
if %1==StOpReCuRs goto findramd (stop recursion when %0 calls itself)
%0 StOpReCuRs %LglDrv%
:findramd
echo
echo Assigning Letters for both RAM and CD drives. Please wait...
echo.
set RAMD=
set CDROM=
shift
rem search for string "RAMDRIVE" in volume label and
rem return errorlevel=3 when ram drive is C:
rem errorlevel=4 when ram drive is D:
rem errorlevel=5 when ram drive is E:
findramd.exe
if errorlevel 255 goto no_ramdrive
rem if not errorlevel 3 goto no_ramdrive
:do_shift
set CDROM=%2
shift
shift
if %1*==* goto no_ramdrive
if errorlevel %1 goto no_shift
goto do_shift
:no_shift
set RAMD=%2
if "%RAMD%"=="C" goto c_drive
goto success
:c_drive
echo The startup disk has detected that drive (C:) does not
echo not contain a valid FAT or FAT32 partition.
echo Most likely, it contains a valid NTFS partition.
echo.
goto success
:no_ramdrive
echo The startup disk could not create a temporary RAM drive
echo for the diagnostic tools. This may be because this computer has
echo less than 4 MB of extended memory.
echo.
set RAMD=
set CDROM=
:success
set LglDrv=
Any Windows XP DOS bootable startup CD can read files on any USB FAT16 or FAT32 partitioned Flash Drive. Typically, the USB Flash Drive remains hidden behind the NTFS partitioned C: Drive. By moving the USB FLash Drive ahead of the primary HDD in Bios setup, the USB Flash Drive suddenly appears. The USB Flash Drive does NOT have to be formatted with HP USB Format Tool as I originally posted.
This post is provided for anyone who uses "Google" to learn how to identify which drive letters are assigned during the DOS start-up process.
Windows 98 startup disk contains a *.bat (SETRAMD.BAT) which identifies the drive letter that was assigned to the RAM Disk. However, it produces an error message when the primary HDD is partitioned in NTFS, instead of FAT32. Here is an updated version.
:: SETRAMD.BAT
@echo off
set LglDrv=27 * 26 Z 25 Y 24 X 23 W 22 V 21 U 20 T 19 S 18 R 17 Q 16 P 15
set LglDrv=%LglDrv% O 14 N 13 M 12 L 11 K 10 J 9 I 8 H 7 G 6 F 5 E 4 D 3 C
if %1==StOpReCuRs goto findramd (stop recursion when %0 calls itself)
%0 StOpReCuRs %LglDrv%
:findramd
echo
echo Assigning Letters for both RAM and CD drives. Please wait...
echo.
set RAMD=
set CDROM=
shift
rem search for string "RAMDRIVE" in volume label and
rem return errorlevel=3 when ram drive is C:
rem errorlevel=4 when ram drive is D:
rem errorlevel=5 when ram drive is E:
findramd.exe
if errorlevel 255 goto no_ramdrive
rem if not errorlevel 3 goto no_ramdrive
:do_shift
set CDROM=%2
shift
shift
if %1*==* goto no_ramdrive
if errorlevel %1 goto no_shift
goto do_shift
:no_shift
set RAMD=%2
if "%RAMD%"=="C" goto c_drive
goto success
:c_drive
echo The startup disk has detected that drive (C:) does not
echo not contain a valid FAT or FAT32 partition.
echo Most likely, it contains a valid NTFS partition.
echo.
goto success
:no_ramdrive
echo The startup disk could not create a temporary RAM drive
echo for the diagnostic tools. This may be because this computer has
echo less than 4 MB of extended memory.
echo.
set RAMD=
set CDROM=
:success
set LglDrv=
Last edited by robert213 on Tue Apr 05, 2011 11:34 am, edited 1 time in total.
Tuus-built T61: T8100 2.1 GHz, SXGA+, NVS140M, Patriot 4GB PC2-6400 DDR2-800, Samsung 840 120GB; Thinkpad T30: P4M 1.8 GHz, HYNIX 512 MB PC2700S DDR, Hitachi Travelstar 7K100 100GB; SilverStone Raven RVS01; 97 Volvo 850-R, 85 Mitsubishi Starion-ES, Keilwerth SX-90R, Ensoniq TS-12, Kawai EP-608
Re: DYK that a PC started with Win98SE DOS startup diskette...
If anyone knows of any other tools for creating an installation CD (besides DOS Batch Files), please point me in the right direction.
------------------------
This post is provided for anyone who uses "Google" to learn how to identify which drive letters are assigned during the DOS start-up process.
This *.bat file (FFLASHD.BAT) identifies the drive letter that was assigned to a Flash Drive. Also, it determines whether user inserted correct Flash Drive required by a Personal DB application (i.e. volume label equals "PDB_DATA"). Also, it finds the next "free" and "available" drive letter, neccessary when assigning a drive letter to a CD-ROM drive.
rem FFLASHD.BAT
rem
rem (Recursion Handler) stop fdrives.bat (i.e. %0) from calling itself
if "%1"=="StOpReCuRs" goto initloop
set LglDrv=C D E F G H I J K L M N O P Q R S T U V W X Y Z
rem
%0 StOpReCuRs %LglDrv%
rem
rem
:initloop
echo.
echo Assigning Letters for both Flash and CD-ROM drives. Please wait...
echo.
rem
set FIRSTD=
set LASTD=
set FLASHD=
set CDROM=
set FLASHD2=
set CDROM2=
shift
rem
:loop
if "%1"=="" goto fail
rem if %1*==* goto fail
rem
%comspec% /f /cvol %1: |find /i "Volume" >nul
if errorlevel=1 goto setCDROM
rem ---- --------
If %FIRSTD%*==* Set FIRSTD=%1
set LASTD=%1
rem
%comspec% /f /cvol %1: |find /i "pdb_data" >nul
if not errorlevel=1 goto setFLASH
rem
:shift
shift
goto loop
rem ---- ----
rem
:setFLASH
If %FLASHD%*==* Set FLASHD=%1
Set FLASHD2=%1
echo ...Flash drive is assigned to: (%FLASHD%:)
goto shift
rem
:setCDROM
If %CDROM%*==* Set CDROM=%1
Set CDROM2=%1
echo ...CD-ROM drive is assigned to: (%CDROM%:)
goto success
:fail
echo The startup disk encountered an unexpected event.
echo Press [Ctrl][C] or [Ctrl][Break] and notify your local
echo technical support person.
echo.
Pause
:success
set LglDrv=
echo First drive is : (%FIRSTD%:)
echo Last drive is : (%LASTD%:)
echo Flash drive is : (%FLASHD%:)
echo CD-ROM drive is: (%CDROM%:)
--------------------
Wierd Stuff
-- Command.com doesn't work when it has system and hidden attribute bytes.
-- I was able to use DOS Vol command instead.
-- Pipe requires SET Temp=c:\Temp, otherwise it produces "write protection" error when using a bootable CD
-- I prefer using If Not exist %1:\nul goto setCDROM
and If exist %1:\PDB_DATA goto setFLASH
-------------------------
------------------------
This post is provided for anyone who uses "Google" to learn how to identify which drive letters are assigned during the DOS start-up process.
This *.bat file (FFLASHD.BAT) identifies the drive letter that was assigned to a Flash Drive. Also, it determines whether user inserted correct Flash Drive required by a Personal DB application (i.e. volume label equals "PDB_DATA"). Also, it finds the next "free" and "available" drive letter, neccessary when assigning a drive letter to a CD-ROM drive.
rem FFLASHD.BAT
rem
rem (Recursion Handler) stop fdrives.bat (i.e. %0) from calling itself
if "%1"=="StOpReCuRs" goto initloop
set LglDrv=C D E F G H I J K L M N O P Q R S T U V W X Y Z
rem
%0 StOpReCuRs %LglDrv%
rem
rem
:initloop
echo.
echo Assigning Letters for both Flash and CD-ROM drives. Please wait...
echo.
rem
set FIRSTD=
set LASTD=
set FLASHD=
set CDROM=
set FLASHD2=
set CDROM2=
shift
rem
:loop
if "%1"=="" goto fail
rem if %1*==* goto fail
rem
%comspec% /f /cvol %1: |find /i "Volume" >nul
if errorlevel=1 goto setCDROM
rem ---- --------
If %FIRSTD%*==* Set FIRSTD=%1
set LASTD=%1
rem
%comspec% /f /cvol %1: |find /i "pdb_data" >nul
if not errorlevel=1 goto setFLASH
rem
:shift
shift
goto loop
rem ---- ----
rem
:setFLASH
If %FLASHD%*==* Set FLASHD=%1
Set FLASHD2=%1
echo ...Flash drive is assigned to: (%FLASHD%:)
goto shift
rem
:setCDROM
If %CDROM%*==* Set CDROM=%1
Set CDROM2=%1
echo ...CD-ROM drive is assigned to: (%CDROM%:)
goto success
:fail
echo The startup disk encountered an unexpected event.
echo Press [Ctrl][C] or [Ctrl][Break] and notify your local
echo technical support person.
echo.
Pause
:success
set LglDrv=
echo First drive is : (%FIRSTD%:)
echo Last drive is : (%LASTD%:)
echo Flash drive is : (%FLASHD%:)
echo CD-ROM drive is: (%CDROM%:)
--------------------
Wierd Stuff
-- Command.com doesn't work when it has system and hidden attribute bytes.
-- I was able to use DOS Vol command instead.
-- Pipe requires SET Temp=c:\Temp, otherwise it produces "write protection" error when using a bootable CD
-- I prefer using If Not exist %1:\nul goto setCDROM
and If exist %1:\PDB_DATA goto setFLASH
-------------------------
Tuus-built T61: T8100 2.1 GHz, SXGA+, NVS140M, Patriot 4GB PC2-6400 DDR2-800, Samsung 840 120GB; Thinkpad T30: P4M 1.8 GHz, HYNIX 512 MB PC2700S DDR, Hitachi Travelstar 7K100 100GB; SilverStone Raven RVS01; 97 Volvo 850-R, 85 Mitsubishi Starion-ES, Keilwerth SX-90R, Ensoniq TS-12, Kawai EP-608
-
- Similar Topics
- Replies
- Views
- Last post
-
- 0 Replies
- 319 Views
-
Last post by mdvaldosta
Sat Jan 14, 2017 11:15 am
-
-
Hardware Maintenance Diskette for UEFI BIOS - Replacing S/N on UEFI Machines
by TPCollector » Fri Jan 13, 2017 9:13 pm » in Thinkpad - General HARDWARE/SOFTWARE questions - 10 Replies
- 2415 Views
-
Last post by TPCollector
Sat Jan 14, 2017 7:49 pm
-
-
- 25 Replies
- 2170 Views
-
Last post by T3f4l
Tue Feb 07, 2017 4:18 pm
Who is online
Users browsing this forum: No registered users and 4 guests




