detecting boot option?

Posted on 1998-01-05
Last Modified: 2013-12-16
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?
Question by:alexo
  • 7
  • 6
  • 5
LVL 14

Expert Comment

ID: 1753029
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.
LVL 14

Expert Comment

ID: 1753030
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.

LVL 11

Author Comment

ID: 1753031
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.

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

LVL 14

Accepted Solution

smeebud earned 100 total points
ID: 1753032
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.
LVL 14

Expert Comment

ID: 1753033
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.

LVL 25

Expert Comment

ID: 1753034
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.
LVL 14

Expert Comment

ID: 1753035
I think we are talking about the same thing aren't we Dennis.
I'm speaking of the pif.
LVL 11

Author Comment

ID: 1753036
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.


LVL 25

Expert Comment

ID: 1753037
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.
LVL 11

Author Comment

ID: 1753038
I'll try that and get back to you.
LVL 14

Expert Comment

ID: 1753039
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???
LVL 25

Expert Comment

ID: 1753040
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.
LVL 11

Author Comment

ID: 1753041
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.
LVL 25

Expert Comment

ID: 1753042
Pardon me?
LVL 11

Author Comment

ID: 1753043
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.
LVL 14

Expert Comment

ID: 1753044
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.
LVL 25

Expert Comment

ID: 1753045
I'm not concerned about the points issue either. I rather the issue be resolved.
LVL 11

Author Comment

ID: 1753046
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!).



Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows command prompt command to set default sound 4 45
Selecting Right Partition 6 71
Win 10...Some user folders missing location tab 7 84
Windows 10 bootup error 22 53
NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question