From: Bill Wandel [bwandel@smart.net] Sent: Monday, December 06, 1999 8:02 PM To: 'DraytonGL@moore-solutions.com'; ntdev@atria.com Subject: RE: [ntdev] Installing network components on Windows NT4.0 The functions to install network components are in NETCFG.DLL. These functions are not documented. A complete network install can be done with these functions including binding review. Note that you still need an inf file with these functions. Bill Wandel -----Original Message----- From: DraytonGL@moore-solutions.com [SMTP:DraytonGL@moore-solutions.com] Sent: Monday, December 06, 1999 10:49 AM To: ntdev@atria.com Subject: RE: [ntdev] Installing network components on Windows NT4.0 Sorry, your boss is not insane, or at least you can easily give him 90% of what he wants. If someone can give the answer for the for the other 10% here, I would gladly award him/her 1 (one) atta boy(girl), having zero face value, and not redeemable anywhere. The following sample uses information provided in MS Technical artical Q162771, Dec. 1997 The following batch file (would you believe it...) will first install a NIC and then a protocol. It will then invoke the control panel so that the user can complete the final 10% manual work. The manual work includes selecting the "Bindings" tab and THEN pressing OK. Selecting the binding tab is required. This could obviously be implemented as a DLL but makes more sense to be part of an install script. I fully and completely acknowledge that this is "Low Tech" and not great coding but it works and guides the user most of the way. The {OPTION} is exactly what you think it is, found in the OEMSETUP.INF file. One Registry entry is cleared (using REGEDIT) to "almost force" NCPA to do the binding process. If someone can figure out how to force the binding process, this will be 100% ****************** Start Setup.bat ********************************************** @echo off if "%2" == "MBUSNICMBI" goto INSTALL if "%2" == "MBUSNICMNI" goto INSTALL if "%2" == "MBUSNICPCI" goto INSTALL @echo. @echo This setup script requires two input parameters. @echo. @echo setup {Source Directory} {OPTION} @echo. @echo THE {OPTION} PARAMETER MUST BE TYPED IN UPPER CASE! @echo The following are valid {OPTION} values: @echo. @echo MBUSNICMBI = "M-BUS ISA Adapter (MBI P/N 16249-51)" @echo MBUSNICMNI = "M-NET ISA Adapter (MNI P/N 16267-1)" @echo MBUSNICPCI = "M-BUS/M-NET PCI Adapter (MBI/MNI P/N 16309-1)" @echo. @echo The following example installs an ISA M-BUS adapter when the @echo install media is on a floppy disk in the A: drive. @echo. @echo setup A: MBUSNICMBI @echo. goto END :INSTALL if exist %SystemRoot%\system32\drivers\mbusnic.sys goto NOT_AGAIN if exist %SystemRoot%\system32\drivers\mbusprot.sys goto NOT_AGAIN @echo. @echo Installing the M-BUS/M-NET Adapter ... %SystemRoot%\system32\setup /f /i%systemroot%\system32\ncpashel.inf /T NTN_InstallMode = Install /T NTN_Origination = install /T NTN_Infname = OEMSETUP.INF /T NTN_SRCPATH = %1 /T NTN_InfOption = %2 @echo. @echo Installing the M-BUS/M-NET Protocol ... %systemroot%\system32\setup /f /i%systemroot%\system32\ncpashel.inf /T NTN_InstallMode = Install /T NTN_Origination = install /T NTN_Infname = OEMSETNT.INF /T NTN_SRCPATH = %1 /T NTN_InfOption = MBUSPROT @echo. @echo Updating network binding registry settings ... %SystemRoot%\regedit mbsclear.reg @echo. @echo The Windows NT Network control panel application will now be shown. @echo You MUST!!! select the "Bindings" tab to complete the adapter binding @echo process. ONLY after you do this can you close the Network panel by @echo clicking on the "OK" button. DO NOT close with the canel button. @echo If you don't do this now, it can be done at a later time. Reboot @echo your system when asked in order to complete the installation. @echo. pause Press Enter to continue... %systemroot%\system32\rundll32 shell32.dll,Control_RunDLL %systemroot%\system32\ncpa.cpl goto END :NOT_AGAIN @echo. @echo M-BUS driver binaries have been found !!! @echo Updating M-BUS driver binaries ... if exist %SystemRoot%\system32\drivers\mbusnic.sys attrib -r %SystemRoot%\system32\drivers\mbusnic.sys xcopy mbusnic.sys %SystemRoot%\system32\drivers /D if exist %SystemRoot%\system32\drivers\mbusprot.sys attrib -r %SystemRoot%\system32\drivers\mbusprot.sys xcopy mbusprot.sys %SystemRoot%\system32\drivers /D @echo. @echo This script can not be used to re-install M-BUS driver software a @echo second time. If this is what you desire, use the Network control panel @echo to first delete, and then add the M-BUS protocol and adapter software. @echo When asked by the Network control panel for the location of your drivers, @echo select "Have Disk", and provide the location of this script. @echo. :END pause Hit enter to exit the installation ... @echo. *************************** End Setup.bat ***************************************** *************************** Start of MBSCLEAR.REG ********************************* REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ncpa\CurrentVersion] "BindFile"="" *************************** End *************************************************** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [ To unsubscribe, send email to ntdev-request@atria.com with body UNSUBSCRIBE (the subject is ignored). ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [ To unsubscribe, send email to ntdev-request@atria.com with body UNSUBSCRIBE (the subject is ignored). ]