detecting boot option?

When Win95 boots, it presents a menu with several choices.  The "Normal" option runs the Win95 GUI and the "Command Prompt Only" stays at the DOS 7.1 prompt (I run OSR2).  The other options are not relevant to the question.

Now here is what I want to accomplish:

I would like to load real-mode drivers if the "Command Prompt Only" option is selected but not if the "Normal" option is selected.

Problem is, how do I detect the boot option from CONFIG.SYS?

Before you answer, there are several methods that I've already tried and rejected.  So unless you think I overlooked something, please don't bother repeating them:

* Use the "Previous DOS Version" setting.
I already use it for a previous version of (DOS 6.22).  I need to make the distinction under DOS 7.1 (that comes as a part of Win95/OSR2).

* Use the [menu] options in GONFIG.SYS.
I don't want to have *two* menus (I need the first one to boot to DOS 6.22 or for "Safe Mode").

* Buy a program that accomplishes it.
No thanks.

Any suggestions?
LVL 11
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Virtual drivers are necessary for certain function of windows.
Can you tell me which drivers you want to load.

One for instance is vcache.vxd.
95 is not going to run very well without it.
the same with   vmm32.
take a look at the bootstrap at;
-----here's an excerpt.
Real-mode VxDs can be loaded into memory in any of the following ways:

- Real-mode device drivers or TSRs that respond to the Windows 95
INT2F broadcast load their embedded VxDs when Windows 95 starts.

- Drivers internal to the Vmm32.vxd file that are not "marked" are
loaded from the following registry key:


If the real-mode virtual device driver loader finds a "marked"
driver, it changes its registry entry from a VxD (a driver preceded
with an asterix "*") to a file with a .vxd extension so that the
external driver is found in the Windows\System\Vmm32 folder. When
the external driver is found, it is loaded into memory.

- VxDs that are not already loaded by the Vmm32.vxd file are loaded
from the [386 Enh] section of the Windows\System.ini file.

- Some VxDs are required for Windows 95 to run properly. These
required VxDs are loaded automatically and do not require a registry
entry. The following VxDs are required by Windows 95:

*INT13      *IOS         *PAGESWAP
*SHELL      *V86MMGR     *VCD
*VDD        *VDMAD       *VFAT
*VKD        *VMCPD       *VPICD
*VTD        *VTDAPI      *VWIN32

5.The real-mode virtual device driver loader checks that all required VxDs loaded sucessfully. If not, it attempts
to load the drivers again.

6.Once the real-mode virtual device driver loading is logged, driver initialization occurs. If there are any VxDs
that require real-mode initialization, they begin their process in real-mode.

7.Vmm32 switches the computer's processor from real-mode to
protected- mode.

8.A three-phase VxD initialization process occurs in which
the drivers are loaded according to their InitDevice
instead of the order in which they are loaded into memory.
The VxDs are carried out in the following


Interrupts are disabled during this phase. This gives VxDs
time to prepare for device initialization without being
interrupted by the system. No file I/O is allowed during
SYSCRITINIT, so all SYSCRITINITs are not written to the
Bootlog.txt file until after SYSCRITINIT is complete for
all VxDs.


The bulk of the VxD initialization takes place during this phase. File I/O is allowed during DEVICEINIT, so each
VxD's DEVICEINIT is logged as it occurs. The one exception is during Ifsmgr's DEVICEINIT. Ifsmgr takes over the
real-mode file system, and disk I/O is not allowed until Ifsmgr's DEVICEINIT succeeds. For this reason, Ifsmgr does
not appear in the DEVICEINIT phase.

When a DevLoader VxD is called, it loads other drivers it is responsible for, regardless of their InitDevice order. The
DevLoader examines the Registry and finds drivers (for example, portdrivers [such as.mpd files]) and any associated
support drivers. It then initializes the device associated with these drivers. During this phase, if a VxD failed to
initialize, it was unable to properly communicate with the hardware or service it drives. Typically, this is due to
incorrect hardware settings or the service not being installed.

The remaining static VxDs continue with the initialization phase. Also, dynamic VxDs may begin initializing during
this phase. They do not have a SYSCRITINIT phase. However, a dynamic VxD may also load anytime after Windows
95 has started.


VxDs that successfully pass the InitComplete phase should be working properly. If a VxD was listed in one of the
previous phases but is not successful in this phase, that VxD is unloaded from memory.

GUI Components:

After all the static VxDs are loaded, the Krnl32.dll, Gdi.exe, User.exe, and Explorer.exe (the default Windows 95
shell) files are loaded.

Network Environment and Multi-User Profiles:

The next step in the startup process is to load the network environment. Once this occurs, the user is prompted to log
on to the network that is installed.

Windows 95 allows multiple users to save their custom desktop settings. When a user logs on to Windows 95, their
desktop settings are loaded from the registry. If the user does not log on, the desktop configuration uses a default

StartUp Group and RunOnce Programs:

Programs in the StartUp group and the RunOnce registry key are run during the last phase of the startup process.
After each program in the RunOnce registry key is started, the program is removed from the key.
That's a lot of [Real mode Virtual] drivers. Sounds rather paradoxical don't you think:)

However, your [386 Enh] section of the Windows\System.ini file
seem to be the KEY here, rather than your config.sys.

I'd be tickled to help you work on this as it's a new one on me.

alexoAuthor Commented:
Smeebud, thanx for the detailed explanation.
However it is irrelevant to the question.

I am asking about real-mode *DOS* drivers, not Windows VxDs.


If the user selects "command prompt only", I'd like to load a DOS ASPI driver, a DOS SCSI CD-ROM driver and (later, in autoexec) MSCDEX.

Otherwise, If the user selects "normal", I know that Win95 will handle the devices and I don't need DOS-level drivers.

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

OK. it took a while for that to sink in but here's what I do as i boot with a menu also;
See if this is acceptable.
You make a batch/.bat file. for instance, i named this one
When I boot to prompt and need my mouse i only have to type
O then {enter)

One extra stroke of the key.
Let me know if one extra key stroke is acceptable and I'll proceed.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
I'm brainstorming. Think with me alexo.
Take a look at the properties of your "".
1st. We can run "without a extra keystroke" a .bat file
Or at.
Program Tab/Advanced/Specify a new MSDOS configuration.

Why not boot through to Windows 95 and use a Dos pif (shortcut) with dedicated autoexec.bat and config.sys files to do as you require in real mode. It would be so much easier than re-inventing the wheel! In this manner you could move easily back and forth between Win95 and Dos 7.1.
I think we are talking about the same thing aren't we Dennis.
I'm speaking of the pif.
alexoAuthor Commented:
The batch file approach is not acceptable since I have yet to find a way to load a SCSI driver from a batch file.

About the WIN.COM properties - I don't understand the suggestion.  Please give more details.

The basic requirement is:

* When I'm in DOS 7.1, I need some real-mode drivers loaded.
* When I'm in Win95 GUI, none of the above drivers shall be in memory.
* Both modes also have different EMM386 switches, etc.

Now, about Dennis'es suggestion:

If I have a DOS-mode PIF with dedicated startup files, what happens when I return to Win95 GUI?
My guess is that the drivers and TSRs loaded by the dedicated startup files will remain resident, which is unacceptable.


Alex. Not true, when you establish dedicated files to be used with a windows 95 dos session, windows loads them for that session and unloads them when the session is completed.

Bud, actually no, there is a difference. Your moving to a dos session then implementing the batch. I'm talking about a dos session implemented through a pif that has dedicated files such as a dedicated config.sys and autoexec.bat associated with it to alter the real mode state of the machine while in Dos which can then be unloaded when the Dos session terminates.
alexoAuthor Commented:
I'll try that and get back to you.
If not a Advanced section where alexo can define his
example, C:\xxx\autoexec and config.
Then where. I know I'm missing something here???
Bud: Create a simple batch file, it doesn't have to have anything really in it other than maybe a simple parameter or nothing at all. Create a shortcut to it, Windows 95 creates the Dos pif for it. Open the properties of the Dos pif, go to the Programs Tab and you can add an additional batch file if need be, and/or click Advanced and add a batch specific autoexec.bat and config.sys. The eliminates the need to make any changes in that may prove to be a problem later. Also, this will permit Windows to unload anything loaded by the batch, the config.sys and autoexec.bat.
alexoAuthor Commented:
Is there a URL when the mechanism details are documented in depth?
I'm not talking about "how-to" stuff.  I want to get technical.
Pardon me?
alexoAuthor Commented:
Never mind, I found an answer at
Wouldn't mind a pointer to something that goes deeper in detail but that'll suffice.

I'll try it on the Win95 machine when I have some free time (might take a few days).

That leaves open the question of 100 points.  Who should get it?
Smeebud's comment came first, Dennis'es was more detailed.

Be back sunday.
I don't mind leaving this hang until you have you problem fixed
alexo. But you do what you heart tells you. If I'm to get a poor grade, well I'd rather not have it.
I'm not concerned about the points issue either. I rather the issue be resolved.
alexoAuthor Commented:
Poor grade?  Nahhh...  I won't ruin your reputation.
Although the original question remains unanswered (I still think it is possible), this is an interesting solution.  Thus, I think, a B.
(BTW, got a bunch of "autograded" C's lately.  Yuck!).


It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.