Creating Network Component .inf File for Unattended SetupLast reviewed: February 4, 1998Article ID: Q155099 |
The information in this article applies to:
SUMMARYFor a network component (adapters, services, or protocols) to be installed using the Unattended Setup mechanism, its Oemnxxxx.inf file must check certain INF symbols and react accordingly. These symbols (STF_UNATTENDED, STF_GUI_UNATTENDED, and STF_UNATTENDED_SECTION) inform Windows NT Setup whether the installation is being run in unattended mode or not. In order to perform these modifications, you must be familiar with the Windows NT- style INF formats.
MORE INFORMATIONTo find out which mode Setup is running in, your .inf file must contain code similar to the following code:
ifstr(I) $(!STF_GUI_UNATTENDED) == "YES" ifstr(I) $(!AutoNetInterfaceType) != "" set BusInterfaceType = $(!AutoNetInterfaceType) else set BusInterfaceType = 1 endif ifstr(I) $(!AutoNetBusNumber) != "" set BusNumber = $(!AutoNetBusNumber) else set BusNumber = 0 endif goto adapterverify endifIf Setup is running in Unattended mode, you must skip the commands that open the user interface (UI), dialog boxes, and so on. These commands are usually of the form:
read-syms FileDependentDlg$(!STF_LANGUAGE) ui start "InputDlg"Once the network component .inf file has verified that Setup is running in Unattended mode, it can use the STF_UATTENDED symbol to get the unattended file name. The STF_UATTENDED_SECTION symbol will be set by Setup so the .inf file code can read it as needed.
Setting Parameters for Network Adapter CardsIf the component is an adapter card, the .inf file will have to pass the parameter section for the card through the AddDefaultNetCardParameters in the Utility.inf file that is included with Windows NT. To do this, the following key will be specified:
ifstr(I) $(!STF_GUI_UNATTENDED) == "YES" Shell $(Utililty.Inf), AddDefaultNetCardParameters, $(KeyParams) endifThis causes the parameters listed in the Unattend.txt file to be written to the registry. Note that this code must be implemented after the default network adapter parameters have been written to the registry. See the Oemnade2.inf file included in Windows NT 4.0
Setting Parameters for Network Protocols or Services.inf files for network protocols or services normally do most of their configuration from UI configuration DLLs. The following sample is an example of an .inf file code fragment from a network protocol .inf file. This code fragment handles most of the work that will otherwise be done by the .inf file code.
LoadLibrary "x" $(!STF_CWDDIR)\mycfg.dll CFG_HANDLE LibraryProcedure ResultList, $(CFG_HANDLE), Properties, $(!STF_HWND), $(!STF_GUI_UNATTENDED), $(!STF_UNATTENDED), $(!STF_UNATTENDED_SECTION) FreeLibrary $(CFG_HANDLE)This causes the component DLL (Mycfg.dll in this case) to call the Setup APIs from the Config.dll file to perform any necessary operations. See the Oemnsvra.inf and Oemnxptc.inf files for examples of .inf files that install services and protocols.
Verifying and Testing Component .inf FilesNetwork Adapters:
|
Additional query words: 4.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |