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.

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.
Too many email signature changes to deal with?

Are you constantly being asked to update your organization's email signatures? Do they take up too much of your time? Wouldn't you love to be able to manage all signatures from one central location, easily design them and deploy them quickly to users. Well, you can!

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
How to record audio from input sources to your PC – connected devices, connected preamp to record vinyl discs, streaming media, that play through your audio card: Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10 – both 32 bit & 64.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

867 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now