There is a program that can detect CD drives (FINDCD.EXE
) that comes on some boot disks (including the Windows 98 Emergency Boot Disk) which you can use in a batch file to skip them:
@echo off
findcd.exe
if (%1)==() goto start
:dirit
if not exist %1:\*.* goto done
if (%1)==(%CDROM%) goto done
dir /a/s/o %1:\*.* >> c:\Files.txt
goto done
:start
for %i in (c d e f g h i j k l m n o p q r s t u v w x y z) do call %0 %i
goto done
:done
I just threw this together off the top of my head (with no testing since I am currently in Windows), but it should do the trick for the most part. Note that floppy drives are always assigned a drive letter starting with A while hard-drives always start at C, so this skips A and B.
There is also a program that can detect RAM drives (FINDRAMD.EXE
) which you can use to detect and skip RAM drives if you have those, but that requires more work (and a separate batch file). Look at SETRAMD.BAT
which is usually included for an example.
The Windows registry was created long after DOS was discontinued. As such, there is no native way to do it, and (not surprisingly) there do not seem to be any DOS programs to do it. Aside from perhaps FreeDOS or ReactOS, it is unlikely that anybody will ever bother to write a Windows registry-editor for DOS.
That said, there is a way you can access and even edit the Windows registry from DOS, but it is not pretty. You would have to use a file-editor (edit.com
is not going to cut it) to access the registry hive files directly. For example, to access HKLM\Software
, you would open C:\Windows\Config\Software
, or to access a user’s hive, you would open C:\Users\<username>\NTUSER.dat
. And this is all assuming that the Windows system drive is even FAT32 since DOS cannot access NTFS without a special driver, most of which only allow read-only access.
Like I said, this method is not pretty because you would need to be familiar with the raw file-format of the Windows registry, be wary of entries that are visible in the file but marked as deleted, and be incredibly careful making any modifications because doing it like that is super risky. As such, this method is highly unadvised (even I don’t bother with it, and I like to crack everything open to look inside).
A much easier and safer method is to simply copy the hive files to another Windows system and mount them (e.g., reg load hku\zzz x:\ntuser.dat
), do whatever you need to, then unmount them (e.g., reg unload hku\zzz
), and copy them back.
Best Answer
You can use
HWiNFO
, available for DOS.Download
here
(Look HWiNFO v5.5 for DOS).