Customizing Detection for NetWare Networks

This section describes the format of NETDET.INI, which is used to detect NetWare components and TSRs during Windows 95 Setup. You can use this information to add custom entries for detecting components on NetWare networks and defining actions to be taken during Setup based on detection results.

Note If you do not need to modify the default detection behavior for setting up Windows 95 on NetWare networks, you can skip this section.

The NETDET.INI and related NETOS.DLL files are stored in the PRECOPY2.CAB file on the Windows 95 floppy disks or compact disc. The version used by Windows 95 Setup is stored in the Windows directory on the local computer. If you modify this file, you can place the revised version of NETDET.INI in the Windows directory on the server that contains the Windows 95 source files.

Each component section in NETDET.INI consists of one or more detection entries, and one or more event entries. A detection entry has the following format:

detectionN=method1[,method2...]

Alternate detection entries can be used to define different actions to be taken, depending on how a component is detected. For example, a TSR detected in memory but not in a batch file might require different actions from the actions required when an entry for the TSR is found in AUTOEXEC.BAT. For example:


detection0=mcb
detection1=autoexec.bat
full_install0=migrate full_install1=prevent

Each method# parameter in the detection statement defines a detection method, as listed in the following table. Setup assumes that the component has been detected if one method detects it.

Detection method

Meaning

assumed

Always detected; used to force an action unconditionally

autoexec.bat

Detected in an uncommented line in AUTOEXEC.BAT

config.sys

Detected in an uncommented line in CONFIG.SYS

custom_dll

Detected by calling external DLL detection code

mcb

Detected by checking the list of TSRs maintained by MS-DOS in the memory control blocks (MCB)

mcb_nobat

Detected in the MCB chain but not in AUTOEXEC.BAT

system.ini

Detected in an uncommented line in SYSTEM.INI


The special detection method custom_dll requires two additional entries: detection_dll, which contains the filename of the DLL to be loaded, and detection_call, which contains the name of the entry point consistent with the following typedef:


typedef BOOL (WINAPI *LPDCALL)(LPSTR)

Adding custom entries based on this detection method requires that you have sufficient programmatic understanding of the calls made in the relevant DLLs. For an example of required entries for custom_dll, see the example entry for VLM later in this section.

The NETDET.INI file includes one or more event entries grouped by numerical suffixes that match the suffixes in detection entries (that is, N must be 0 or 1). Each event entry contains a list of actions to be performed if the associated detection action was successful. The following shows the form of event entries:

eventN=action1[(parameter)][,action2[(parameter)]...]

The event name is the name of the Setup code for handling installation of components related to the detected TSR or NetWare component. The following list shows the defined events.

Event

Meaning

protstack_installN

The protected-mode protocol will be installed

nwredir_installN

The protected-mode network client will be installed

full_installN

The protected-mode protocol and network client will be installed


The following table lists the defined action codes related to events in NETDET.INI.

Action code

Meaning

none

Do not do anything (NOP)

prevent

Recommend against using during recommendation phase

remove

Comment out using REM in AUTOEXEC.BAT or a batch file called from AUTOEXEC.BAT

unremove

Remove REM comment from AUTOEXEC.BAT or a batch file called from AUTOEXEC.BAT

migrate

Comment out using REM in AUTOEXEC.BAT, and add to WINSTART.BAT

unmigrate

Remove REM comment in AUTOEXEC.BAT, and remove from WINSTART.BAT

install_devnode(devnode)

Cause specified device node to be installed

uninstall_devnode(devnode)

Cause specified device node to be removed

gen_install(section)

Cause action in an install section to run (see the example for Source Routing for NetWare later in this section)


Notice that the event named prevent is a special case that is used during the recommendation phase when Setup is determining which new Windows 95 components can be installed without interfering with TSR dependencies defined in NETDET.INI. If a component is detected by the defined method and the prevent action is associated with the related event, then Setup will recommend against the usual Setup action for the event.

The following shows some examples of entries in NETDET.INI:


;;;;;; VLM 4.x ;;;;;;;;
; prevents installation of Client for NetWare Networks
; if Novell NDS is used
[VLM]
detection0=custom_dll
detection_dll=NETOS.DLL
detection_call=NW_IsNDSinUsefull_install0=prevent 

;;;;;; Btrieve ;;;;;;;;;; [Brequest.exe] detection0=mcb; installs all protected-mode components full_install0=migrate; if Btrieve is present
;;;;;; NOVELL NETBIOS ;;;;;;;;;;;;;;;;;; ; installs NETBIOS over IPX if Novell NETBIOS is present [NETBIOS] detection0=mcb full_install0=remove,install_devnode(NWNBLINK)
;;;;;;;;;; SOURCE ROUTING FOR NETWARE ;;;;;;;;; ; adds cache size for Source Routing [ROUTE] detection0=mcb full_install0=remove,gen_install(NWSRCR)
[NWSRCR] AddReg=NWSRCR.reg
[NWSRCR.reg] HKLM,System\CurrentControlSet\Services\VxD\NWLINK,cachesize,,"16" HKLM,System\CurrentControlSet\Services\VxD\NWLINK\Ndi\params
\cachesize,"",,"16"