PSS ID Number: 194640
Article Last Modified on 10/20/1999
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SETUP\ OptionalComponentsThere are values under this key that point to subkeys, and each subkey contains information on the optional components installed, as well as information needed to install a new optional component. For example, suppose you want to install Games as an optional component. To see if Games is installed, look for the following subkey value under the OptionalComponents key:
"Games"="Games"
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SETUP\
OptionalComponents\Games
"INF"="applets.inf"
"Section"="games"
"Installed"="0"
This shows that the Games optional component is not installed on this
Windows 95 computer because the "Installed" flag is set to 0.
RunDll setupx.dll,InstallHinfSection <section> <reboot-mode> <inf-name>The values of the <section> and <inf-name> parameters are those found in the registry key described above. For example, the following CreateProcess call installs the Games optional component (if Windows 95 setup determines that you must restart the computer, it asks the user if he or she wants the computer to restart immediately after the installation is complete. NOTE: The meaning of the <reboot-mode> parameter values is described in the "Using the Reboot Mode Parameter" section of this article):
RunDll setupx.dll,InstallHinfSection games 4 applets.inf
define HOW_NEVER_REBOOT 0 define HOW_ALWAYS_SILENT_REBOOT 1 define HOW_ALWAYS_PROMPT_REBOOT 2 define HOW_SILENT_REBOOT 3 define HOW_PROMPT_REBOOT 4If <inf-name> specifies your .inf file instead of a Windows 95 .inf file, add 128 to the values shown above. In the previous example that installs the Games optional component, <reboot-mode> is set to 4. This is because Applets.inf is a Windows 95 .inf file. If you were installing an optional component that has its own .inf file, you would set <reboot-mode> to 132. If you add 128 to the <reboot-mode> parameter, all the files you are installing must be in the same directory location as your .inf file on the installation disk.
Set <reboot-mode> to 0 or 128. Whatever happens, the computer will not be rebooted. It is up to the client to determine if the computer should be rebooted. For setup, this means there is a file C:\Windows\WinInit.ini that is not zero bytes in size.
Set <reboot-mode> to 1 or 129. The user will not be prompted with a "Reboot the machine, Yes/No" dialog box and the computer will always reboot.
Set <reboot-mode> to 2 or 130. The user will always be asked to respond to a "Reboot the machine, Yes/No" dialog box. Setup does not attempt to determine if a reboot is necessary.
Set <reboot-mode> to 3 or 131. If setup determines that the computer needs to reboot, there is no user interaction.
Set <reboot-mode> to 4 or 132. If setup determines that the computer needs to reboot, it prompts the user with a "Reboot the machine, Yes/No" dialog box.
Include=<list of inf-files>
Needs=<list of sections>
Include=mos.inf, msmail.inf
Needs=MSMAIL, MAPI, MicrosoftNetwork
[InstallMyToys]
.
.
.
Include=mos.inf, msmail.inf
Needs=MSMAIL, MAPI, MicrosoftNetwork
[DefaultInstall]
CopyFiles=QCD.copy.prog, QCD.copy.hlp, QCD.copy.win, QCD.copy.sys,
QCD.copy.inf
UpdateInis=QCD.Links
AddReg=QCD.reg, QCD.run
Uninstall=FlexiCD_remove
Keywords: kbhowto KB194640
Technology: kbAudDeveloper kbWin32DDK95 kbWin32DDKSearch kbWin32sSearch kbWin95search kbWinDDKSearch