home *** CD-ROM | disk | FTP | other *** search
/ Encyclopédie Hachette Multimédia 1999 / EHM99_Ext.iso / pc / INTERNET / RNIS / USR / TA_NTBIS.EXE / TA_NT_1.1 / OEMSETNT.INF next >
Encoding:
INI File  |  1997-07-31  |  68.6 KB  |  1,869 lines

  1. ;---------------------------------------------------------------------------
  2. ; FileName     : OEMNADTI.INF
  3. ; Created      : 12/12/94
  4. ; Version      : 1.01
  5. ; Copyright    : (C) OEM 1994-1997
  6. ; Environment  : Windows NT kernel mode
  7. ; Contents     : OEM ISDN card Windows NT Setup File.
  8. ; Note         :
  9. ; Changed      :
  10. ;---------------------------------------------------------------------------
  11.  
  12. [Identification]
  13.     OptionType = NetAdapter
  14.  
  15. [PlatformsSupported]
  16.     ISA
  17.     EISA
  18.  
  19. [LanguagesSupported]
  20.     ENG
  21.  
  22. [PreferredLanguage]
  23.     language = ENG
  24.  
  25. [Options]
  26.     usrwmac
  27.  
  28. [OptionsTextENG]
  29.     usrwmac             = "U.S. Robotics Sportster ISDN-TA"
  30.  
  31. [Source Media Descriptions]
  32.     1  = "U.S. Robotics Windows NT ISDN-TA Setup Disk" , TAGFILE = usrwmac.sy_
  33.  
  34.  
  35. [FileConstantsENG]
  36.     ProCaption          = "Windows NT Setup"
  37.     ProCancel           = "Cancel"
  38.     ProCancelMsg        = "Windows NT Networking is not correctly installed.  "+
  39.                           "Are you sure you want to cancel copying files?"
  40.     ProCancelCap        = "Network Setup Message"
  41.     ProText1            = "Copying:"
  42.     ProText2            = "To:"
  43.  
  44.     ShellCodeErrorTitle = "Error: "$(FunctionTitle)$(Option))
  45.     ShellCodeErrorText  = "Shell Code Error."
  46.  
  47. ;----------------------------------------------------------------------------
  48. ;
  49. ;----------------------------------------------------------------------------
  50. [FileConstants]
  51.    ; Product Info
  52.     driverName                   = "usrwmac"
  53.     messageDLLName               = "usrmsg"
  54.     configDLLName                = "usrcfg"
  55.     helpfileName                 = "usrcfg"
  56.  
  57.     internalVersion              = "(V 1.10")
  58.     ProductSoftwareName          = $(driverName)
  59.     Manufacturer                 = "U.S. Robotics"
  60.     pnpID                        = ""
  61.     ProductMajorVersion          = "1"
  62.     ProductMinorVersion          = "10"
  63.  
  64.     NetEventDLL                  = "%SystemRoot%\System32\"$(messageDLLName).dll
  65.     IoLogMsgDLL                  = "%SystemRoot%\System32\"$(messageDLLName).dll
  66.  
  67.     oemDriverPath                = $(!STF_WINDOWSSYSPATH)"\drivers"
  68.     oemUtilPath                  = $(!STF_WINDOWSSYSPATH)
  69.  
  70.     FunctionTitle                = "U.S. Robotics ISDN-TA card setup"
  71.     ProductSoftwareDescription   = "U.S. Robotics ISDN-TA driver "$(internalVersion)
  72.     ProductHardwareDescription   = "U.S. Robotics ISDN-TA adapter "$(internalVersion)
  73.     ProductSoftwareTitle         = "U.S. Robotics ISDN-TA driver "$(internalVersion)
  74.     ProductHardwareTitle         = "U.S. Robotics ISDN-TA adapter "$(internalVersion)
  75.  
  76.     ; ---- end of OEM depenend section
  77.  
  78.     ProductVersion               = $(ProductMajorVersion)"."$(ProductMinorVersion)
  79.     ProductLogo                  = $(ProductSoftwareName)" Driver (c) "$(Manufacturer)
  80.     ProductDiskLogo              = $(ProductHardwareTitle)" Windows NT Setup Disk #1"
  81.  
  82.    ; -----   Software ------
  83.  
  84.     SoftwareName                = $(ProductSoftwareName)
  85.     SoftwareServiceName         = $(SoftwareName)
  86.     SoftwareTitle               = $(ProductSoftwareTitle)
  87.     SoftwareType                = "driver"
  88.     SoftwareImagePath           = "%SystemRoot%\System32\drivers\"$(SoftwareName)".sys"
  89.     SoftwareServiceGroup        = "NDIS"
  90.     SoftwareServiceType         = "kernel"
  91.     SoftwareServiceTypeDisabled = "kerneldisable"
  92.     SoftwareBase                = $(!NTN_SoftwareBase)"\"$(Manufacturer)
  93.     SoftwareKeyName             = $(SoftwareBase)"\"$(ProductSoftwareName)"\CurrentVersion"
  94.  
  95.     NetRuleSoftwareType         = $(ProductSoftwareName)"Sys "$(ProductSoftwareName)"Driver"
  96.     NetRuleSoftwareUse          = $(SoftwareType)
  97.     NetRuleSoftwareBindForm     = """"$(ProductSoftwareName)"Driver"" yes no container"
  98.     NetRuleSoftwareClass        = {$(ProductSoftwareName)"Driver basic"}
  99.     NetRuleSoftwareBindable     = { $(ProductSoftwareName)"Driver "$(ProductSoftwareName)"Adapter non exclusive 100"}
  100.  
  101.   ; -------------  product hardware ----------------------------------
  102.  
  103.     ProductHardwareName     = $(ProductSoftwareName)
  104.  
  105.     NetRuleHardwareType     = $(ProductSoftwareName)" "$(ProductSoftwareName)"Adapter"
  106.     NetRuleHardwareBindForm = " yes yes container"
  107.     NetRuleHardwareClass    = {$(ProductSoftwareName)"Adapter basic"}
  108.  
  109.    ; INF file names
  110.  
  111.     InfName                 = "OEMNADTI.INF"
  112.     UtilityInf              = "UTILITY.INF"
  113.     ParamInf                = "NCPARAM.INF"
  114.     subroutineinf           = "SUBROUTN.INF"
  115.  
  116.    ; Service
  117.  
  118.     CurrentControlSet       = "SYSTEM\CurrentControlSet"
  119.     ServiceBase             = $(CurrentControlSet)"\Services"
  120.     ServicePath             = $(ServiceBase)"\"$(SoftwareServiceName)
  121.     ServiceParameters       = $(ServicePath)"\Parameters"
  122.     ControlBase             = $(CurrentControlSet)"\Control"
  123.     ServiceGroupOrder       = $(ControlBase)"\ServiceGroupOrder"
  124.     TapiDevicesPath         = "HARDWARE\DEVICEMAP\TAPI DEVICES"
  125.  
  126.     DeviceMap               = "HARDWARE\DEVICEMAP"
  127.     TapiDevices             = "TAPI DEVICES"
  128.     TapiDeviceKey           = $(ProductHardwareName)
  129.     TapiMediaType           = "ISDN"
  130.  
  131.     ParamKeyName            = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  132.  
  133.     ; FIXME - Set to zero before release
  134.  
  135.     DebugFlags              = 4294967295
  136.     DebugOutput             = 3
  137.     DebugBuffer             = 100
  138.  
  139.     isdn1TR6                = "1TR6"
  140.     isdnDSS1                = "DSS1"
  141.     isdnNI12                = "NI-1/2"
  142.     isdnDMS100              = "DMS 100"
  143.     isdnJATE                = "INS-Net (Jate)"
  144.     isdnATT                 = "AT & T"
  145.     isdnVN45                = "VN-4/5"
  146.  
  147.     idDSS1                  = 128
  148.     id1TR6                  = 32
  149.     idNI12                  = 4
  150.     idJATE                  = 16
  151.     idATT                   = 2
  152.     idVN45                  = 64
  153.  
  154.     isdnProtocolType        = $(idDSS1)
  155.     fwType                  = $(isdnDSS1)
  156.  
  157.     b3Protocol              = 4
  158.     b2Protocol              = 2
  159.     msnInNumber             = "4"
  160.     msnOutNumber            = "1"
  161.  
  162.     capiControllerNumber    = 1
  163.     lineType                = 0
  164.     TapiAddressList         = ""
  165.     ndisAdapterNumber       = 1
  166.     tapiInfoOption          = 0
  167.     capiMaxApplication      = 3
  168.     capiMaxChannel          = 9
  169.     ioBaseAddress2          = 0
  170.     ioBaseAddress3          = 0
  171.     capiSPID1               = ""
  172.     capiSPID2               = ""
  173.  
  174.  
  175.     InterruptNumber         = 10
  176.     RAM_Hex_Value           = 616
  177.     RAM_Addr_List           = {616}
  178.     IRQ_List                = {15, 14, 12, 11, 10, 7, 5}
  179.     firmwareList            = { +
  180.                                 $(isdnDSS1),   +
  181.                                 $(isdn1TR6),   +
  182.                                 ,  +
  183.                                }
  184.  
  185.     msnInList               = {"all","1","2","1+2"}
  186.     msnOutList              = {"1","2"}
  187.     phoneID1                = ""
  188.     phoneID2                = ""
  189.  
  190.     callControlList         = {"*"}
  191.     callControlEnabled      = 1
  192.     shortHold               = 0
  193.     shortHoldTime           = 0
  194.  
  195.     tapiMsnOutKey           = "tapi.msnOut"
  196.     tapiMsnInKey            = "tapi.msnIn"
  197.     tapiLineTypeKey         = "tapi.lineType"
  198.     tapiB2ProtocolKey       = "tapi.b2Protocol"
  199.     tapiB3ProtocolKey       = "tapi.b3Protocol"
  200.     tapiMediaTypeKey        = "tapi.mediaType"
  201.     tapiAddressListKey      = "tapi.addressList"
  202.     tapiInfoOptionKey       = "tapi.infoOption"
  203.     tapiCallControlKey      = "tapi.callControl"
  204.     tapiCallControlEnableKey= "tapi.callControl.enabled"
  205.     shortHoldKey            = "shortHold.enabled"
  206.     shortHoldTimeKey        = "shortHold.time"
  207.  
  208.     capiMaxApplicationKey   = "capi.maxApplication"
  209.     capiMaxChannelKey       = "capi.maxChannel"
  210.     capiControllerNumberKey = "capi.controllerNumber"
  211.  
  212.     capiIsdnProtocolKey     = "line0.switchType"
  213.     capiSPID1Key            = "line0.channel0.SPID"
  214.     capiSPID2Key            = "line0.channel1.SPID"
  215.     phoneID1Key             = "line0.channel0.Phone"
  216.     phoneID2Key             = "line0.channel1.Phone"
  217.     hConfig                 = 0
  218.     dummyValue              = ""
  219.  
  220. [OptionsTextENG]
  221.     pctwmac             = $(ProductHardwareTitle)
  222.  
  223. ;----------------------------------------------------------------------------
  224. ;
  225. ;----------------------------------------------------------------------------
  226. [GeneralConstants]
  227.     from                    = ""
  228.     to                      = ""
  229.     ExitCodeOk              = 0
  230.     ExitCodeCancel          = 1
  231.     ExitCodeFatal           = 2
  232.     KeyNull                 = ""
  233.     MAXIMUM_ALLOWED         = 33554432
  234.     RegistryErrorIndex      = NO_ERROR
  235.     KeyProduct              = ""
  236.     KeyParameters           = ""
  237.     TRUE                    = 1
  238.     FALSE                   = 0
  239.     NoTitle                 = 0
  240.     ExitState               = "Active"
  241.     OldVersionExisted       = $(FALSE)
  242.  
  243.  
  244. ;----------------------------------------------------------------------------
  245. ;
  246. ;----------------------------------------------------------------------------
  247. [Date]
  248.     ; Now is a list which contains:
  249.     ;       Sec from 1-1-1970, Year, Month, Day, Hour, Minute, Second
  250.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  251.  
  252.  
  253. ;---------------------------------------------------------------------------
  254. ; 1. Identify
  255. ;
  256. ; DESCRIPTION:   To verify that this INF deals with the same type of options
  257. ;                as we are choosing currently.
  258. ;
  259. ; INPUT:         None
  260. ;
  261. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL
  262. ;                $($R1): Option Type (COMPUTER ...)
  263. ;                $($R2): Diskette description
  264. ;---------------------------------------------------------------------------
  265. [Identify]
  266.     Read-Syms Identification
  267.     Set Status      = STATUS_SUCCESSFUL
  268.     Set Identifier  = $(OptionType)
  269.     Set Media       = #("Source Media Descriptions", 1, 1)
  270.     Return $(Status) $(Identifier) $(Media)
  271.  
  272. ;------------------------------------------------------------------------
  273. ; 2. ReturnOptions:
  274. ;
  275. ; DESCRIPTION:   To return the option list supported by this INF and the
  276. ;                localised text list representing the options.
  277. ;
  278. ; INPUT:         $($0):  Language used. ( ENG | GER | FRN ... )
  279. ;
  280. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  281. ;                                STATUS_NOLANGUAGE
  282. ;                                STATUS_FAILED
  283. ;                                STATUS_NOTSUPPORTED
  284. ;
  285. ;                $($R1): Option List
  286. ;                $($R2): Option Text List
  287. ;------------------------------------------------------------------------
  288.  
  289. [ReturnOptions]
  290.  
  291.     ; Check if the language requested is supported
  292.  
  293.         read-syms PreferredLanguage
  294.  
  295.         ifstr $(Language) == ""
  296.                 set Language = "ENG"
  297.                 set LanguageList = ^(LanguagesSupported, 1)
  298.                 ifcontains(i) $($0) IN $(LanguageList)
  299.                         set Language = $($0)
  300.                 endif
  301.     endif
  302.  
  303.         set OptionList     = ^(Options, 1)
  304.         set OptionTextList = ^(OptionsText$(Language), 1)
  305.  
  306.         ; Don't check the platform, we are hardware independent
  307.  
  308.         set printparms = no
  309.         ifstr $(printparms) == yes
  310.                         set parms = "ReturnOptions: Lang="$($0)" Platform="$($1)""$(!LF)+
  311.                                                 $(OptionList)$(!LF)$(OptionTextList)
  312.                         Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"STATUS",$(parms)
  313.         endif
  314.  
  315.         return STATUS_SUCCESSFUL $(OptionList) $(OptionTextList)
  316.  
  317.  
  318. ;------------------------------------------------------------------------
  319. ;
  320. ; InstallOption:
  321. ;
  322. ;      This section is shelled to by main installation processing
  323. ;      or by NCPASHEL.INF during reconfig, removal, update, etc.
  324. ;
  325. ; FUNCTION:  To copy files representing Options
  326. ;            To configure the installed option
  327. ;            To update the registry for the installed option
  328. ;
  329. ; INPUT:     $($0):  Language to use
  330. ;            $($1):  Option, i.e name of card type to install
  331. ;            $($2):  SourceDirectory
  332. ;            $($3):  AddCopy  (YES | NO)
  333. ;            $($4):  DoCopy   (YES | NO)
  334. ;            $($5):  DoConfig (YES | NO)
  335. ;
  336. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  337. ;                            STATUS_NOLANGUAGE |
  338. ;                            STATUS_USERCANCEL |
  339. ;                            STATUS_FAILED
  340. ;
  341. ;------------------------------------------------------------------------
  342. [InstallOption]
  343.  
  344.     Set Status   = STATUS_FAILED
  345.     Set Option   = $($1)
  346.     Set SrcDir   = $($2)
  347.     Set RasDir   = $($2)
  348.     Set AddCopy  = $($3)
  349.     Set DoCopy   = $($4)
  350.     Set DoConfig = $($5)
  351.  
  352.     set CallerOfThisScript = $($1)
  353.  
  354.     ; Check if the language requested is supported, if not use default
  355.  
  356.     read-syms PreferredLanguage
  357.  
  358.     ifstr $(Language) == ""
  359.        set Language = "ENG"
  360.        set LanguageList = ^(LanguagesSupported, 1)
  361.        ifcontains(i) $($0) IN $(LanguageList)
  362.           set Language = $($0)
  363.        endif
  364.     endif
  365.  
  366.     IfContains(i) $($0) NOT-IN $(LanguageList)
  367.         Return STATUS_NOLANGUAGE
  368.     endif
  369.  
  370.     ;------------------------------------------------------------
  371.     ;#??# FIXME - make sure this flag is disabled before shipping
  372.     ;-------------------------------------------------------------
  373.  
  374.     Set OldDebugControl = $(!DebugOutputControl)
  375.     Set !DebugOutputControl = 2
  376.  
  377.     Set-Subst LF = "\n"
  378.  
  379.     Read-Syms GeneralConstants
  380.     Read-Syms FileConstants
  381.     Read-Syms DialogConstants$(!STF_LANGUAGE)
  382.  
  383.     ifstr(i) $(!NTN_Origination) == "NCPA"
  384.         Set Continue = $(OK)
  385.     endif
  386.  
  387.     Read-Syms FileConstants$(!STF_LANGUAGE)
  388.     Detect Date
  389.     Set-Title  $(FunctionTitle)$(Option)
  390.  
  391.     Set to   = Begin
  392.     Set from = Begin
  393.     Set CommonStatus = STATUS_SUCCESSFUL
  394.  
  395.     EndWait
  396.  
  397. ;----------------------------------------------------------------------------
  398. ;
  399. ;----------------------------------------------------------------------------
  400. Begin = +
  401.     Set ActivateDetection = FALSE
  402.  
  403.     ifstr(i) $(!NTN_InstallMode) == deinstall
  404.         Set StartLabel = RemoveAdapter
  405.     else-ifstr(i) $(!NTN_InstallMode) == Update
  406.         Set StartLabel = UpgradeSoftware
  407.     else-ifstr(i) $(!NTN_InstallMode) == bind
  408.         Set StartLabel = BindingAdapter
  409.     else-ifstr(i) $(!NTN_InstallMode) == configure
  410.         Set StartLabel = ConfigureAdapter
  411.         Set ActivateDetection = TRUE
  412.         Set CommonStatus = STATUS_REBOOT
  413.         ifstr(i) $(SoftwareKeyName) == $(!NTN_RegBase)
  414.             Debug-Output $(InfName)": Cannot configure the PnP 128K driver software."
  415.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  416.             IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  417.                 Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  418.                 GoTo ShellCodeError
  419.             endif
  420.             Set Error = $($R0)
  421.             Set from = end
  422.             Set to = end
  423.             GoTo NonFatalInfo
  424.         endif
  425.     else
  426.         Set StartLabel = InstallAdapter
  427.         Set ActivateDetection = TRUE
  428.         Set OEM_ABANDON_OPTIONS = {}
  429.         Set OEM_ABANDON_SOFTWARE = FALSE
  430.         Set OEM_ABANDON_ON = TRUE
  431.     endif
  432.  
  433.     Debug-Output $(InfName)": =================================================="
  434.     Debug-Output $(InfName)": STF_CWDIR is: "$(!STF_CWDIR)
  435.     Debug-Output $(InfName)": STF_LANGUAGE is: "$(!STF_LANGUAGE)
  436.     Debug-Output $(InfName)": Option is: "$(Option)
  437.     Debug-Output $(InfName)": !STF_NCDETECT  is: "$(!STF_NCDETECT)
  438.     Debug-Output $(InfName)": !STF_NCOPTION  is: "$(!STF_NCOPTION)
  439.     Debug-Output $(InfName)": !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  440.     Debug-Output $(InfName)": !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  441.     Debug-Output $(InfName)": =================================================="
  442.  
  443.     ;
  444.     ; Now we don't validate the hardware parameter
  445.     ;
  446.     Set DetectedCard = FALSE
  447.     ifstr(i) $(ActivateDetection) != TRUE
  448.         GoTo $(StartLabel)
  449.     endif
  450.  
  451.     Debug-Output $(InfName)": Calling Param_SetDefaults"
  452.     Shell $(ParamInf) Param_SetDefaults {}
  453.  
  454.     Shell $(ParamInf) HexListFromDecList $(RAM_Addr_List)
  455.     Set RAM_Hex_List = $($R0)
  456.  
  457.     ifstr(i) $(!STF_NCDETECT) == YES
  458.         ifstr(i) $(!STF_NCOPTION) == $(Option)
  459.            Set DetectedCard = TRUE
  460.            Debug-Output $(InfName)": Setting DetectedCard to TRUE"
  461.         endif
  462.     endif
  463.  
  464.     Shell "" DebugConfiguration "After parameter querying"
  465.     Set from = FatalError
  466.     Set to = FatalError
  467.     GoTo $(StartLabel)
  468.  
  469. ;-----------------------------------------------------------------
  470. ; Installation Section, install a new or a second adapter
  471. ;------------------------------------------------------------
  472. InstallAdapter = +
  473.    Set dialogDLLName           = $(oemUtilPath)"\"$(configDLLName).dll
  474.  
  475.    ;
  476.    ; COPY CFG dll first for later access to PNPISA
  477.    ;
  478.  
  479.    Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  480.      Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  481.        Goto ShellCodeError
  482.      Else-Ifstr(i) $($R0) == STATUS_FAILED
  483.        Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  484.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  485.          goto ShellCodeError
  486.        endif
  487.        set Error = $($R0)
  488.        Goto fatal
  489.      Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  490.        Goto successful
  491.      Endif
  492.        Set SrcDir = $($R1)
  493.      Endif
  494.  
  495.    Install "Install-StartupFiles"
  496.  
  497.    ;
  498.    ; Open the System\CurrentControlSet\Services\$(ProductSoftwareName)\Parameters
  499.    ; key  and get some current service parameter settings
  500.    ;
  501.    ; "KeyServiceParameters" is not closed cause we need it once more later
  502.  
  503.    OpenRegKey $(!REG_H_LOCAL) "" $(SoftwareKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  504.    ifstr $(KeyProduct) != $(KeyNull)
  505.       CloseRegKey $(KeyProduct)
  506.         ifstr(i) !(NTN_RegBase) == $(SoftwareKeyName)
  507.            Shell $(UtilityInf), VerExistedDlg, $(SoftwareTitle),+
  508.                $(ProductVersion)
  509.            IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  510.                Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  511.                GoTo ShellCodeError
  512.            endif
  513.            GoTo end
  514.         else
  515.            Shell $(UtilityInf), CardExistedDlg
  516.            IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  517.                Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  518.                GoTo ShellCodeError
  519.            endif
  520.            ifstr(i) $($R1) != "OK"
  521.                Set CommonStatus = STATUS_USERCANCEL
  522.                GoTo end
  523.            endif
  524.            Set OldVersionExisted = $(TRUE)
  525.         endif
  526.     endif
  527.  
  528.     Set CurrParamSettings = {}
  529.     ifstr(i) $(DetectedCard) != TRUE
  530.         GoTo AdapterSetup
  531.     endif
  532.  
  533.     StartWait
  534.         Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  535.     EndWait
  536.  
  537.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  538.         GoTo AdapterSetup
  539.     endif
  540.  
  541.     Set DetectedParams = $($R1)
  542.     Debug-Output $(InfName)": Calling Param_SetDefaults to merge detected params"
  543.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  544.     GoTo AdapterSetup
  545.  
  546. ;-----------------------------------------------
  547. ; Configuration Section
  548. ;-----------------------------------------------
  549. ConfigureAdapter = +
  550.     Set dialogDLLName = $(oemUtilPath)"\"$(configDLLName).dll
  551.  
  552.     ifstr $(KeyProduct) == $(KeyNull)
  553.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  554.         ifstr $(KeyProduct) == $(KeyNull)
  555.             Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  556.             Debug-Output $(InfName)": Cannot find component product key"
  557.             GoTo FatalRegistry
  558.         endif
  559.     endif
  560.  
  561.     Debug-Output $(InfName)": Shelling to FindService"
  562.     Shell $(UtilityInf) FindService, $(KeyProduct)
  563.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  564.         Debug-Output $(InfName)": FindService shell failure"
  565.         GoTo ShellCodeError
  566.     endif
  567.     ifstr(i) $($R0) != NO_ERROR
  568.         Debug-Output $(InfName)": FindService Shell error: "$($R0)
  569.         GoTo FatalRegistry
  570.     endif
  571.  
  572.     Set KeyParameters = $($R2)
  573.     CloseRegKey $($R1)
  574.     ifstr $(KeyParameters) == $(KeyNull)
  575.         Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  576.         Debug-Output $(InfName)": Cannot find component service"
  577.         GoTo FatalRegistry
  578.     endif
  579.  
  580.     Set OldVersionExisted = $(TRUE)
  581.     Set ValueName = ""
  582.     Set ValueData = ""
  583.     Set ValueStr  = ""
  584.     Set ValueList = {}
  585.  
  586.     Debug-Output $(InfName)": Read current parameters"
  587.  
  588.     EnumRegValue $(KeyParameters) ValueList
  589.  
  590.     ForListDo $(ValueList)
  591.         Set ValueItem = $($)
  592.         Set ValueName = *($(ValueItem),1)
  593.         Set ValueData = *($(ValueItem),4)
  594.         Debug-Output $(InfName)":  "$(ValueName)" = "$(ValueData)
  595.  
  596.         ifstr(i) $(ValueName) == "ioBaseAddress"
  597.             Set ioBaseAddress = $(ValueData)
  598.  
  599.         else-ifstr(i) $(ValueName) == "InterruptNumber"
  600.             Set InterruptNumber = $(ValueData)
  601.  
  602.         else-ifstr(i) $(ValueName) == $(tapiLineTypeKey)
  603.             Set lineType = $(ValueData)
  604.  
  605.         else-ifstr(i) $(ValueName) == "BusNumber"
  606.             set BusNumber = $(ValueData)
  607.  
  608.         else-ifstr(i) $(ValueName) == "BusType"
  609.             set BusType = $(ValueData)
  610.  
  611.         else-ifstr(i) $(ValueName) == $(capiIsdnProtocolKey)
  612.             set isdnProtocolType  = $(ValueData)
  613.  
  614.             ifstr(i) $(ValueData) == $(idDSS1)
  615.               set fwType = $(isdnDSS1)
  616.             else-ifstr(i) $(ValueData) == $(id1TR6)
  617.               set fwType = $(isdn1TR6)
  618.             else-ifstr(i) $(ValueData) == $(idNI12)
  619.               set fwType = $(isdnNI12)
  620.             else-ifstr(i) $(ValueData) == $(idJATE)
  621.               set fwType = $(isdnJATE)
  622.             else-ifstr(i) $(ValueData) == $(idATT)
  623.               set fwType = $(isdnATT)
  624.             else-ifstr(i) $(ValueData) == $(idVN45)
  625.               set fwType = $(isdnVN45)
  626.             endif
  627.  
  628.         else-ifstr(i) $(ValueName) == $(tapiB2ProtocolKey)
  629.             set b2Protocol = $(ValueData)
  630.  
  631.         else-ifstr(i) $(ValueName) == $(tapiB3ProtocolKey)
  632.             set b3Protocol = $(ValueData)
  633.  
  634.         else-ifstr(i) $(ValueName) == $(tapiMsnInKey)
  635.             set msnInNumber = $(ValueData)
  636.  
  637.         else-ifstr(i) $(ValueName) == $(tapiMsnOutKey)
  638.             set msnOutNumber = $(ValueData)
  639.  
  640.         else-ifstr(i) $(ValueName) == $(tapiMediaTypeKey)
  641.             set mediaType = $(ValueData)
  642.  
  643.         else-ifstr(i) $(ValueName) == $(tapiCallControlKey)
  644.             set callControlList = $(ValueData)
  645.  
  646.         else-ifstr(i) $(ValueName) == $(tapiCallControlEnableKey)
  647.             set callControlEnabled = $(ValueData)
  648.  
  649.         else-ifstr(i) $(ValueName) == $(capiMaxApplicationKey)
  650.             set capiMaxApplication = $(ValueData)
  651.  
  652.         else-ifstr(i) $(ValueName) == $(capiMaxChannelKey)
  653.             set capiMaxChannel = $(ValueData)
  654.  
  655.         else-ifstr(i) $(ValueName) == $(capiSPID1Key)
  656.           set capiSPID1 = $(ValueData)
  657.  
  658.         else-ifstr(i) $(ValueName) == $(capiSPID2Key)
  659.           set capiSPID2 = $(ValueData)
  660.  
  661.         else-ifstr(i) $(ValueName) == $(phoneID1Key)
  662.           set phoneID1 = $(ValueData)
  663.  
  664.         else-ifstr(i) $(ValueName) == $(phoneID2Key)
  665.           set phoneID2 = $(ValueData)
  666.  
  667.         else-ifstr(i) $(ValueName) == $(capiControllerNumberKey)
  668.            ;Debug-Output $(InfName)": found capiControllerNumber "$(ValueData);
  669.            set capiControllerNumber = $(ValueData)
  670.  
  671.         else-ifstr(i) $(ValueName) == "ndisAdapterNumber"
  672.            ;Debug-Output $(InfName)": found ndisAdapterNumber "$(ValueData);
  673.            set ndisAdapterNumber = $(ValueData)
  674.  
  675.         else-ifstr(i) $(ValueName) == $(shortHoldKey)
  676.             set shortHold = $(ValueData)
  677.  
  678.         else-ifstr(i) $(ValueName) == $(shortHoldTimeKey)
  679.             set shortHoldTime = $(ValueData)
  680.  
  681.         endif
  682.     EndForListDo
  683.  
  684.     Shell $(ParamInf) Param_SaveValues
  685.     Set CurrParamSettings = $($R0)
  686.  
  687.     goto adapterSetup
  688.  
  689.  
  690. ;----------------------------------------------------------------------------
  691. ;
  692. ;----------------------------------------------------------------------------
  693.  
  694. AdapterSetup = +
  695.     Shell "" DebugConfiguration "before displaying dialog"
  696.     Set from = AdapterOptions
  697.  
  698.     ; later call here a dialog for automatic detection
  699.  
  700.     Set InterruptNumber = *($(IRQ_List), ~($(IRQ_List),$(InterruptNumber)))
  701.     Set RAM_Hex_Value   = *($(RAM_Hex_List), ~($(RAM_Addr_List),$(ioBaseAddress)))
  702.     Set fwType          = *($(firmwareList), ~($(firmwareList),$(fwType)))
  703.     Set msnInNumber     = *($(msnInList), ~($(msnInList),$(msnInNumber)))
  704.     Set msnOutNumber    = *($(msnOutList), ~($(msnOutList),$(msnOutNumber)))
  705.  
  706.     Shell $(ParamInf) Param_ParameterConfidence
  707.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  708.         Debug-Output $(InfName)": parameter confidence too low to bypass configuration"
  709.         GoTo AdapterOptions
  710.     endif
  711.     ifstr(i) $(DetectedCard) == TRUE
  712.         ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  713.             GoTo AdapterVerify
  714.         endif
  715.     endif
  716.  
  717. ;***********************************************************************
  718. ;
  719. ;***********************************************************************
  720. AdapterOptions = +
  721.     ;
  722.     ; Load DLL containing dialogs and verification routines
  723.     ;
  724.  
  725.     Debug-Output $(InfName)": Load config DLL <"$(dialogDLLName)">"
  726.  
  727.     LoadLibrary "ISDN-card Driver Disk" $(dialogDLLName) hConfig
  728.     Read-Syms FileDependentDlg$(!STF_LANGUAGE)
  729.  
  730.     Debug-Output $(InfName)": start dialog"
  731.  
  732.     UI Start "InputDlg" $(hConfig)
  733.  
  734.     FreeLibrary $(hConfig)
  735.  
  736.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  737.  
  738.         Set InterruptNumber = $(Combo1Out)
  739.         Set RAM_Hex_Value   = $(Combo2Out)
  740.         Set ioBaseAddress   = *($(RAM_Addr_List), ~($(RAM_Hex_List),$(RAM_Hex_Value)))
  741.         Set fwType          = $(Combo3Out)
  742.         Set msnInNumber     = $(Combo4Out)
  743.         Set msnOutNumber    = $(Combo5Out)
  744.  
  745.         Set capiSPID1       = *($(EditTextOut),1)
  746.         Set capiSPID2       = *($(EditTextOut),2)
  747.         Set phoneID1        = *($(EditTextOut),3)
  748.         Set phoneID2        = *($(EditTextOut),4)
  749.  
  750.         Debug-Output $(InfName)": Dialog result"
  751.         Debug-Output $(InfName)": spID1   "$(capiSPID1)
  752.         Debug-Output $(InfName)": spID2   "$(capiSPID2)
  753.         Debug-Output $(InfName)": msn 1   "$(phoneID1)
  754.         Debug-Output $(InfName)": msn 2   "$(phoneID2)
  755.         Debug-Output $(InfName)": fw      "$(fwType)
  756.         Debug-Output $(InfName)": msn in  "$(msnInNumber)
  757.         Debug-Output $(InfName)": msn out "$(msnOutNumber)
  758.  
  759.         ; DSS1 and dialup connection is always default
  760.  
  761.  
  762.         Set lineType        = "0"
  763.  
  764.         ;
  765.         ; set the isdn protocol type value depending on choosen firmware string
  766.         ;
  767.  
  768.         ifstr $(fwType) == $(isdnDSS1)
  769.           set isdnProtocolType = $(idDSS1)
  770.         else-ifstr $(fwType) == $(isdn1TR6)
  771.           set isdnProtocolType = $(id1TR6)
  772.         else-ifstr $(fwType) == $(isdnNI12)
  773.           set isdnProtocolType = $(idNI12)
  774.         else-ifstr $(fwType) == $(isdnDMS100)
  775.           set isdnProtocolType = $(idNI12)
  776.         else-ifstr $(fwType) == $(isdnJATE)
  777.           set isdnProtocolType = $(idJATE)
  778.         else-ifstr $(fwType) == $(isdnATT)
  779.           set isdnProtocolType = $(idATT)
  780.         else-ifstr $(fwType) == $(isdnVN45)
  781.           set isdnProtocolType = $(idVN45)
  782.         endif
  783.  
  784.         ui pop 1
  785.     else-ifstr(i) $(DLGEVENT) == "BACK"
  786.         Set CommonStatus = STATUS_USERCANCEL
  787.         Debug-Output $(InfName)": Action: user CANCEL, bye"
  788.         ui pop 1
  789.         GoTo end
  790.     else
  791.         Debug-Output $(InfName)": Action: unknown <"$(DLGEVENT)"> bye"
  792.         ui pop 1
  793.         GoTo end
  794.     endif
  795.  
  796.     ifstr(i) $(!STF_NCDETINFO) == {}
  797.         Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusType) $(BusNumber)
  798.         ifInt $($ShellCode) != $(!SHELL_CODE_OK)
  799.             Debug-Output $(InfName)": ShellCode error."
  800.             GoTo ShellCodeError
  801.         endif
  802.         Set BusType = $($R1)
  803.         Set BusNumber = $($R2)
  804.     else
  805.         Set BusType = *($(!STF_NCDETINFO),5)
  806.         Set BusNumber = *($(!STF_NCDETINFO),6)
  807.     endif
  808.  
  809. ;***********************************************************************
  810. ;
  811. ;***********************************************************************
  812. AdapterVerify = +
  813.     Shell "" DebugConfiguration "after running dialog"
  814.     ifstr(i) $(DetectedCard) != TRUE
  815.         Shell $(ParamInf) Param_SaveValues
  816.         Set NewParamSettings = $($R0)
  817.         ifstr(i) $(CurrParamSettings) == {}
  818.             Set DiffParamSettings = $(NewParamSettings)
  819.         else
  820.             Shell $(ParamInf) Param_DiffValues $(CurrParamSettings)
  821.             Set DiffParamSettings = $($R0)
  822.         endif
  823.         Debug-Output $(InfName)": Calling Param_VerifyResources"
  824.         Shell $(ParamInf) Param_VerifyResources $(DiffParamSettings)
  825.         ifstr(i) $($R0) == STATUS_SUCCESSFUL
  826.             Debug-Output $(InfName)": Param_VerifyResources succeeded"
  827.             GoTo SkipOptions
  828.         endif
  829.     else
  830.         Set CardVerifyIndex = $(!STF_NCDETCARD)
  831.         Debug-Output $(InfName)": Calling Param_VerifyCard"
  832.         Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  833.         ifstr(i) $($R0) == STATUS_SUCCESSFUL
  834.             Debug-Output $(InfName)": Param_VerifyCard succeeded"
  835.             GoTo SkipOptions
  836.         endif
  837.     endif
  838.  
  839.     Set from = AdapterOptions
  840.     Set to = SkipOptions
  841.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  842.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  843.         Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  844.         GoTo ShellCodeError
  845.     endif
  846.     Set Error = $($R0)
  847.     GoTo WarningMsg
  848.  
  849. ;----------------------------------------------------------------------
  850. ;
  851. ;----------------------------------------------------------------------
  852. SkipOptions =+
  853.     IfInt $(OldVersionExisted) == $(TRUE)
  854.         ifstr(i) $(!NTN_InstallMode) == configure
  855.             GoTo WriteParameters
  856.         endif
  857.     endif
  858.     StartWait
  859.     IfInt $(OldVersionExisted) == $(FALSE)
  860.         ifstr(i) $(!NTN_InstallMode) == "install"
  861.            ifstr(i) $(DoCopy) == "YES"
  862.               Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  863.               IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  864.                   GoTo ShellCodeError
  865.               else-ifstr(i) $($R0) == STATUS_FAILED
  866.                   Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  867.                   IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  868.                       GoTo ShellCodeError
  869.                   endif
  870.                   Set Error = $($R0)
  871.                   GoTo FatalError
  872.               else-ifstr(i) $($R0) == STATUS_USERCANCEL
  873.                   GoTo SuccessfulOption
  874.               endif
  875.               Set SrcDir = $($R1)
  876.            endif
  877.  
  878.            Install "Install-Option"
  879.            ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  880.               Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  881.               IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  882.                   GoTo ShellCodeError
  883.               endif
  884.               Set Error = $($R0)
  885.               GoTo FatalError
  886.            endif
  887.         endif
  888.  
  889.         Debug-Output $(InfName)": add software Component"
  890.         Debug-Output " manufacturer        - "$(Manufacturer)
  891.         Debug-Output " softwareName        - "$(SoftwareName)
  892.         Debug-Output " softwareServiceName - "$(SoftwareServiceName)
  893.         Debug-Output " softwaretitle       - "$(SoftwareTitle)
  894.         Debug-Output " imgagePath          - "$(SoftwareImagePath)
  895.         Debug-Output " serviceGroup        - "$(SoftwareServiceGroup)
  896.  
  897.  
  898.         Shell $(UtilityInf), AddSoftwareComponent, +
  899.             $(Manufacturer), +
  900.             $(ProductSoftwareName), +
  901.             $(SoftwareServiceName), +
  902.             $(SoftwareTitle), +
  903.             $(STF_CONTEXTINFNAME), +
  904.             $(SoftwareImagePath), +
  905.             "kernelautostart", +
  906.             $(SoftwareServiceGroup), +
  907.             {}, +
  908.             "",+
  909.             $(NetEventDLL)
  910.  
  911.  
  912.         set OEM_ABANDON_SOFTWARE = TRUE
  913.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  914.             Debug-Output $(InfName)": ShellCode error"
  915.             GoTo ShellCodeError
  916.         endif
  917.  
  918.         ; Return parameter:
  919.         ;   $R1 contains the product version key handle;
  920.         ;   $R2 contains the NetRules subkey handle;
  921.         ;   $R3 contains the new Services key handle;
  922.         ;   $R4 contains the new Services Parameters key handle
  923.         ;   $R5 contains the Linkage key handle
  924.  
  925.         Set RegistryErrorIndex = $($R0)
  926.         Set KeyProduct         = $($R1)
  927.         Set SoftNetRulesKey    = $($R2)
  928.         set KeyService         = $($R3)
  929.         CloseRegKey $($R3)
  930.         CloseRegKey $($R4)
  931.         CloseRegKey $($R5)
  932.  
  933.         ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  934.             EndWait
  935.             Debug-Output $(InfName)": Registry error "$(RegistryErrorIndex)" add software components "
  936.             CloseRegKey $(KeyProduct)
  937.             CloseRegKey $(SoftNetRulesKey)
  938.             GoTo FatalRegistry
  939.         endif
  940.  
  941.         Set NewValueList = {+
  942.                  {SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  943.                  {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  944.                  {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  945.                  {Title,$(NoTitle),$(!REG_VT_SZ),$(SoftwareTitle)},+
  946.                  {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  947.                  {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  948.                  {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}+
  949.                 }
  950.  
  951.         Debug-Output $(InfName)": create key "$(KeyProduct)
  952.         Debug-Output "  softwareType - "$(SoftwareType)
  953.         Debug-Output "  majorVersion - "$(ProductMajorVersion)
  954.         Debug-Output "  minorVersion - "$(ProductMinorVersion)
  955.         Debug-Output "  title        - "$(SoftwareTitle)
  956.         Debug-Output "  description  - "$(ProductSoftwareDescription)
  957.         Debug-Output "  serviceName  - "$(ProductSoftwareName)
  958.  
  959.  
  960.         Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  961.  
  962.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  963.             CloseRegKey $(KeyProduct)
  964.             CloseRegKey $(SoftNetRulesKey)
  965.             CloseRegKey $(KeyService)
  966.             Debug-Output $(InfName)": ShellCode error."
  967.             GoTo ShellCodeError
  968.         endif
  969.  
  970.         Set RegistryErrorIndex = $($R0)
  971.         ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  972.             EndWait
  973.             Debug-Output $(InfName)": Registry error: add value list."
  974.             CloseRegKey $(KeyProduct)
  975.             CloseRegKey $(SoftNetRulesKey)
  976.             CloseRegKey $(KeyService)
  977.             GoTo FatalRegistry
  978.         endif
  979.  
  980.         Set NewValueList = {+
  981.                     {type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  982.                     {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  983.                     {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  984.                     {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  985.                     {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  986.                     {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}+
  987.                    }
  988.  
  989.         Debug-Output $(InfName)": create key "$(SoftwareNetRulesKey)
  990.         Debug-Output " type      - "$(NetRuleSoftwareType)
  991.         Debug-Output " use       - "$(NetRuleSoftwareUse)
  992.         Debug-Output " bindform  - "$(NetRuleSoftwareBindForm)
  993.         Debug-Output " class     - "$(NetRuleSoftwareClass)
  994.         Debug-Output " bindable  - "$(NetRuleSoftwareBindable)
  995.         Debug-Output " InfOption - "$(Option)
  996.  
  997.         Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  998.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  999.             Debug-Output $(InfName)": ShellCode error."
  1000.             CloseRegKey $(KeyProduct)
  1001.             CloseRegKey $(SoftNetRulesKey)
  1002.             CloseRegKey $(KeyService)
  1003.             GoTo ShellCodeError
  1004.         endif
  1005.  
  1006.         ; update group dependency
  1007.  
  1008.         set NewValue = {"NdisWan"}
  1009.         GetRegValue $(KeyService) "DependOnGroup" Value
  1010.         ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  1011.                 set OldValue = *($(Value), 4)
  1012.                 ForListDo $(OldValue)
  1013.                         set Value = $($)
  1014.                         ifstr(i) $(Value) != "NdisWan"
  1015.                                 set NewValue = >($(NewValue),$(Value))
  1016.                         endif
  1017.                 EndForListDo
  1018.         endif
  1019.  
  1020.         SetRegValue $(KeyService) {DependOnGroup, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NewValue)}
  1021.  
  1022.         Set RegistryErrorIndex = $($R0)
  1023.         CloseRegKey $(KeyProduct)
  1024.         CloseRegKey $(SoftNetRulesKey)
  1025.         CloseRegKey $(KeyService)
  1026.  
  1027.         ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1028.             EndWait
  1029.             Debug-Output $(InfName)": Registry error: "$(RegistryErrorIndex)
  1030.             GoTo FatalRegistry
  1031.         endif
  1032.     endif
  1033.     ;
  1034.     ; Create the SOFTWARE\...\NetworkCards region and its corresponding service
  1035.     ;
  1036.  
  1037.     Debug-Output $(InfName)": add hardware component: "$(ProductHardwareName)
  1038.  
  1039.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(SoftwareKeyName)
  1040.  
  1041.     IfInt $($R4) != -1
  1042.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  1043.     endif
  1044.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1045.         Debug-Output $(InfName)": Cannot add hardware component"
  1046.         GoTo ShellCodeError
  1047.     endif
  1048.  
  1049.     set RegistryErrorIndex = $($R0)
  1050.     ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1051.         EndWait
  1052.         Debug-Output $(InfName)": Registry error: add hardware component"
  1053.         CloseRegKey $($R1)
  1054.         CloseRegKey $($R2)
  1055.         CloseRegKey $($R3)
  1056.         GoTo FatalRegistry
  1057.     endif
  1058.  
  1059.     ;  Return parameter:
  1060.     ;     $R1  Registry key variable for SOFTWARE\...\NetworkCards\<n>
  1061.     ;     $R2  Registry key variable for SOFTWARE\...\NetworkCards\<n>\NetRules
  1062.     ;     $R3  Registry key handle for Services\$(Packet)<n>\Parameters key
  1063.     ;     $R4  Adapter number assigned to adapter
  1064.     ;     $R5  Service name generated by combining svc name with adapter number
  1065.  
  1066.     set KeyParameters   = $($R3)
  1067.     Set KeyAdapterRules = $($R2)
  1068.     Set ndisAdapterNumber   = $($R4)
  1069.     ;
  1070.     ; \HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\NetworkCards
  1071.     ;      ndisAdapterNumber
  1072.     ;
  1073.  
  1074.     Set NewValueList = {+
  1075.                         {Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  1076. ;;                      {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  1077.                         {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
  1078.                         {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+
  1079.                         {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  1080.                         {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  1081.                         {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}+
  1082.                        }
  1083.  
  1084.     Debug-Output $(InfName)": add network card: "$($(R1)))
  1085.  
  1086.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  1087.  
  1088.  
  1089.  
  1090.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1091.         Debug-Output $(InfName)": ShellCode error"
  1092.         CloseRegKey $(KeyAdapterRules)
  1093.         CloseRegKey $(KeyParameters)
  1094.         GoTo ShellCodeError
  1095.     endif
  1096.     CloseRegKey $($R1)
  1097.  
  1098.     set RegistryErrorIndex = $($R0)
  1099.     ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1100.         CloseRegKey $(KeyAdapterRules)
  1101.         CloseRegKey $(KeyParameters)
  1102.         goto fatalregistry
  1103.     endif
  1104.  
  1105.     Set TempProdName = """"$(ProductHardwareName)$(ndisAdapterNumber)""""
  1106.     Set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  1107.  
  1108.     Set NewValueList = {+
  1109.                         {type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  1110.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  1111.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  1112.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}+
  1113.                        }
  1114.  
  1115.     Debug-Output $(InfName)": create key adapter rules "$(KeyAdapterRules)
  1116.     Debug-Output " type         - "$(NetRuleHardwareType)
  1117.     Debug-Output " bindform     - "$(TempBindForm)
  1118.     Debug-Output " class        - "$(NetRuleHardwareClass)
  1119.     Debug-Output " infOptions   - "$(Option)
  1120.  
  1121.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  1122.  
  1123.     CloseRegKey $(KeyAdapterRules)
  1124.  
  1125.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1126.         CloseRegKey $(KeyParameters)
  1127.         Debug-Output $(InfName)": ShellCode error."
  1128.         GoTo ShellCodeError
  1129.     endif
  1130.  
  1131.     Set RegistryErrorIndex = $($R0)
  1132.     ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1133.         EndWait
  1134.         Debug-Output $(InfName)": Registry error: add value list."
  1135.         CloseRegKey $(KeyParameters)
  1136.         GoTo FatalRegistry
  1137.     endif
  1138.  
  1139.     GoTo WriteParameters
  1140.  
  1141.  
  1142. ;---------------------------------------------------------------------
  1143. ; write the private global configuration parameters
  1144. ;---------------------------------------------------------------------
  1145. WriteParameters = +
  1146.  
  1147.     Set TapiAddressList = {$(ndisAdapterNumber)" 1 0"}
  1148.     Set TapiAddressList = >($(TapiAddressList),$(ndisAdapterNumber)" 2 0")
  1149.  
  1150.     Debug-Output $(InfName)": write private profile parameter"
  1151.     Debug-Output $(InfName)" address list     :"$(TapiAddressList)
  1152.     Debug-Output $(InfName)" interrupt number :"$(InterruptNumber)
  1153.     Debug-Output $(InfName)" io base address  :"$(ioBaseAddress)
  1154.     Debug-Output $(InfName)" msn              :"$(msnInNumber)
  1155.     Debug-Output $(InfName)" capi controller  :"$(capiControllerNumber)
  1156.     Debug-Output $(InfName)" ndisAdapter No.  :"$(ndisAdapterNumber)
  1157.     Debug-Output $(InfName)" SPID1            :"$(capiSPID1)
  1158.     Debug-Output $(InfName)" SPID2            :"$(capiSPID2)
  1159.  
  1160.     Set NewValueList = {+
  1161.                        {$(tapiAddressListKey),$(NoTitle),$(!REG_VT_MULTI_SZ),$(TapiAddressList)},+
  1162.                        {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  1163.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusType)},+
  1164.                        {ndisAdapterNumber,$(NoTitle),$(!REG_VT_DWORD),$(ndisAdapterNumber)},+
  1165.                        {$(capiControllerNumberKey),$(NoTitle),$(!REG_VT_DWORD),$(capiControllerNumber)},+
  1166.                        {$(capiIsdnProtocolKey),$(NoTitle),$(!REG_VT_DWORD),$(isdnProtocolType)},+
  1167.                        {$(capiMaxApplicationKey),$(NoTitle),$(!REG_VT_DWORD),$(capiMaxApplication)},+
  1168.                        {$(capiMaxChannelKey),$(NoTitle),$(!REG_VT_DWORD),$(capiMaxChannel)},+
  1169.                        {DeviceName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  1170.                        {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(InterruptNumber)},+
  1171.                        {ioBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(ioBaseAddress)},+
  1172.                        {ioBaseAddress2,$(NoTitle),$(!REG_VT_DWORD),$(ioBaseAddress2)},+
  1173.                        {ioBaseAddress3,$(NoTitle),$(!REG_VT_DWORD),$(ioBaseAddress3)},+
  1174.                        {$(tapiLineTypeKey),$(NoTitle),$(!REG_VT_DWORD),$(lineType)},+
  1175.                        {$(tapiMediaTypeKey),$(NoTitle),$(!REG_VT_SZ),$(TapiMediaType)},+
  1176.                        {$(tapiB2ProtocolKey),$(NoTitle),$(!REG_VT_DWORD),$(b2Protocol)},+
  1177.                        {$(tapiB3ProtocolKey),$(NoTitle),$(!REG_VT_DWORD),$(b3Protocol)},+
  1178.                        {$(tapiCallControlKey),$(NoTitle),$(!REG_VT_MULTI_SZ),$(callControlList)},+
  1179.                        {DebugFlags,$(NoTitle),$(!REG_VT_DWORD),$(DebugFlags)},+
  1180.                        {DebugOutput,$(NoTitle),$(!REG_VT_DWORD),$(DebugOutput)},+
  1181.                        {DebugBuffer,$(NoTitle),$(!REG_VT_DWORD),$(DebugBuffer)},+
  1182.                        {$(tapiMsnInKey),$(NoTitle),$(!REG_VT_SZ),$(msnInNumber)},+
  1183.                        {$(tapiMsnOutKey),$(NoTitle),$(!REG_VT_SZ),$(msnOutNumber)},+
  1184.                        {$(tapiInfoOptionKey),$(NoTitle),$(!REG_VT_DWORD),$(tapiInfoOption)},+
  1185.                        {$(capiIsdnProtocolKey),$(NoTitle),$(!REG_VT_DWORD),$(isdnProtocolType)},+
  1186.                        {$(capiSPID1Key),$(NoTitle),$(!REG_VT_SZ),$(capiSPID1)},+
  1187.                        {$(capiSPID2Key),$(NoTitle),$(!REG_VT_SZ),$(capiSPID2)},+
  1188.                        {$(phoneID1Key),$(NoTitle),$(!REG_VT_SZ),$(phoneID1)},+
  1189.                        {$(phoneID2Key),$(NoTitle),$(!REG_VT_SZ),$(phoneID2)},+
  1190.                        {$(shortHoldTimeKey),$(NoTitle),$(!REG_VT_DWORD),$(shortHoldTime)},+
  1191.                        {$(shortHoldKey),$(NoTitle),$(!REG_VT_DWORD),$(shortHold)},+
  1192.                        {$(tapiCallControlEnableKey),$(NoTitle),$(!REG_VT_DWORD),$(callControlEnabled)}+
  1193.                        }
  1194.  
  1195.     Debug-Output $(InfName)": write private profile parameter"
  1196.  
  1197.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  1198.  
  1199.     CloseRegKey $(KeyParameters)
  1200.  
  1201.     Debug-Output $(InfName)": returns with shell code "$(ShellCode)
  1202.  
  1203.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1204.         Debug-Output $(InfName)": ShellCode error."$(ShellCode)
  1205.         GoTo ShellCodeError
  1206.     endif
  1207.  
  1208.     Set RegistryErrorIndex = $($R0)
  1209.     ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1210.         Debug-Output $(InfName)": Registry error: Add value list"
  1211.         GoTo FatalRegistry
  1212.     endif
  1213.  
  1214.     ;
  1215.     ; Save NDIS driver name to manufacturer
  1216.     ;
  1217.  
  1218.     LoadLibrary "" $(dialogDLLName) hConfig
  1219.  
  1220.     LibraryProcedure Result, $(hConfig) setupNdisDriver, +
  1221.                              $(!STF_HWND) $(Option)  $(!NTN_InstallMode) +
  1222.                              $(ProductSoftwareName)  $(Manufacturer)
  1223.  
  1224.  
  1225.     FreeLibrary  $(hConfig)
  1226.  
  1227.     ifstr(i) $(Result) != "OK"
  1228.        Debug-Output " install ndis driver name failed"
  1229.        goto fatalregistry
  1230.     endif
  1231.  
  1232.     goto createTAPIInfo
  1233.  
  1234. ;----------------------------------------------------------------------------
  1235. ;
  1236. ;----------------------------------------------------------------------------
  1237. createTAPIInfo  = +
  1238.     ifstr(i) $(!NTN_InstallMode) == configure
  1239.        Debug-Output $(InfName)": configure option, dont create TAPI_DEVICE info"
  1240.         GoTo SuccessfulOption
  1241.     endif
  1242.  
  1243.     Debug-Output $(InfName)": create TAPI device info "
  1244.  
  1245.     ;
  1246.     ; Create the HARDWARE\DEVICEMAP\TAPI DEVICES\xxxWMAC key
  1247.     ;
  1248.  
  1249.     OpenRegKey $(!REG_H_LOCAL) "" "HARDWARE\DEVICEMAP" $(MAXIMUM_ALLOWED) BaseKey
  1250.     shell "" HtCreateRegKey $(BaseKey) "TAPI DEVICES\"$(driverName)
  1251.     ifstr(i) $($R0) != NO_ERROR
  1252.         Debug-Output $(InfName)": Error creating registry key!"
  1253.         GoTo FatalRegistry
  1254.     endif
  1255.     Set TapiDeviceKey = $($R1)
  1256.  
  1257.     ;
  1258.     ; Get old address list from given key
  1259.     ;
  1260.  
  1261.     Set ValueData      = {}
  1262.     Set ValueItem      = ""
  1263.     Set ValueList      = {}
  1264.  
  1265.     EnumRegValue $(TapiDeviceKey) ValueList
  1266.  
  1267.     ForListDo $(ValueList)
  1268.         Set ValueItem = $($)
  1269.         Set ValueName = *($(ValueItem),1)
  1270.         Set ValueData = *($(ValueItem),4)
  1271.         Debug-Output $(InfName)":  address "$(ValueData)
  1272.  
  1273.         ifstr(i) $(ValueName) == "Address"
  1274.           ForListDo $(ValueData)
  1275.             Set ValueItem = $($)
  1276.             Set ValueName = *($(ValueItem),1)
  1277.             Set TapiAddressList = >($(TapiAddressList),$(ValueName))
  1278.             Debug-Output $(InfName)":  tapi address list "$(TapiAddressList)
  1279.           EndForListDo
  1280.         endif
  1281.     EndForListDo
  1282.  
  1283.  
  1284.     Set NewValueList = {+
  1285.                         {Address,$(NoTitle),$(!REG_VT_MULTI_SZ),$(TapiAddressList)},+
  1286.                         {"Media Type",$(NoTitle),$(!REG_VT_SZ),$(TapiMediaType)}+
  1287.                        }
  1288.  
  1289.     Shell  $(UtilityInf), AddValueList, $(TapiDeviceKey), $(NewValueList)
  1290.  
  1291.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1292.         Debug-Output $(InfName)": ShellCode error."
  1293.         GoTo ShellCodeError
  1294.     endif
  1295.     Set RegistryErrorIndex = $($R0)
  1296.     ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1297.         Debug-Output $(InfName)": Registry error: Add value list"
  1298.         GoTo FatalRegistry
  1299.     endif
  1300.     CloseRegKey $(TapiDeviceKey)
  1301.     CloseRegKey $(BaseKey)
  1302.  
  1303. ;----------------------------------------------------------------------------
  1304.     ;
  1305.     ; if RAS is not installed, then shell ras setup INF file to install RAS
  1306.     ; else invoke RAS to allow user to configure RAS for the ISDN lines.
  1307.     ;
  1308.  
  1309.     Read-Syms InvokeRasDlg$(!STF_LANGUAGE)
  1310.     Shell "oemnsvra.inf" CheckRasInstalled
  1311.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1312.         Debug-Output $(InfName)": Error Shelling the RAS INF file oemnsvra.inf"
  1313.         Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE),  +
  1314.                 "STATUS", $(InvokeRasError)
  1315.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1316.             GoTo ShellCodeError
  1317.         EndIf
  1318.         GoTo SuccessfulOption
  1319.     EndIf
  1320.     Set RasInstalled = $($R0)
  1321.     Debug-Output $(InfName)": Is RAS Installed? "$(RasInstalled)
  1322.     ;
  1323.     ; display a message to the user that RAS setup will now be invoked
  1324.     ;
  1325.     IfStr(i) $(RasInstalled) == FALSE
  1326.         Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  1327.                 $(InvokeRasSetupMsg)
  1328.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1329.             GoTo SuccessfulOption
  1330.         EndIf
  1331.     Else
  1332.         Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  1333.                 $(InvokeRasConfigMsg)
  1334.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1335.             GoTo SuccessfulOption
  1336.         EndIf
  1337.     EndIf
  1338. ;
  1339. ; FIXME - RAS INF will not locate the files if it is spawned here.
  1340. ;
  1341.     EndWait
  1342.     GoTo SuccessfulOption
  1343.  
  1344.     ;
  1345.     ; Set the flags based on whether this is an IDW installation
  1346.     ;
  1347.     IfStr(i) $(!STF_IDW) == TRUE
  1348.         Set AddCopy  = NO
  1349.         Set DoCopy   = NO
  1350.         Set DoConfig = NO
  1351.     Else
  1352.         Set AddCopy  = YES
  1353.         Set DoCopy   = YES
  1354.         Set DoConfig = YES
  1355.     EndIf
  1356.     ;
  1357.     ; change the global install mode flag to configure if RAS is already installed
  1358.     ;
  1359.     IfStr(i) $(RasInstalled) == TRUE
  1360.             Set SaveNTN_InstallMode = $(!NTN_InstallMode)
  1361.             Set !NTN_InstallMode = configure
  1362.     EndIf
  1363.     ;
  1364.     ; now invoke RAS setup to do the right thing
  1365.     ;
  1366.     Shell "oemnsvra.inf" InstallOption $(!STF_LANGUAGE) "RAS" $(RasDir) $(AddCopy) $(DoCopy) $(DoConfig)
  1367.     ;
  1368.     ; restore the global instal mode flag if it was changed
  1369.     ;
  1370.     IfStr(i) $(RasInstalled) == TRUE
  1371.             Set !NTN_InstallMode = $(SaveNTN_InstallMode)
  1372.     EndIf
  1373.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1374.         Debug-Output $(InfName)": Error Shelling the RAS INF file oemnsvra.inf"
  1375.         Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS",  +
  1376.                 $(InvokeRasError)
  1377.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1378.             GoTo ShellCodeError
  1379.         EndIf
  1380.         GoTo SuccessfulOption
  1381.     EndIf
  1382.  
  1383.     EndWait
  1384.     GoTo SuccessfulOption
  1385.  
  1386.  
  1387.  
  1388.  
  1389. ;----------------------------------------------------------------------------
  1390. ;
  1391. ;----------------------------------------------------------------------------
  1392.  
  1393. BindingAdapter =+
  1394.     Debug-Output $(InfName)": Binding: Sorry, not yet implemented"
  1395.     Set Error = "Binding: Sorry, not yet implemented."
  1396.     GoTo FatalError
  1397.  
  1398. ;***********************************************************************
  1399. ;
  1400. ;***********************************************************************
  1401. RemoveAdapter = +
  1402.     Set dialogDLLName  = $(oemUtilPath)"\"$(configDLLName).dll
  1403.  
  1404.     ifstr(i) $(SoftwareKeyName) == $(!NTN_RegBase)
  1405.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1406.             $(ProductSoftwareName)
  1407.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1408.             Debug-Output $(InfName)": ShellCode error"
  1409.             GoTo ShellCodeError
  1410.         endif
  1411.         Set RegistryErrorIndex = $($R0)
  1412.         ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1413.             GoTo FatalRegistry
  1414.         endif
  1415.     else
  1416.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1417.             $(ProductSoftwareName), $(!NTN_RegBase)
  1418.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1419.             Debug-Output $(InfName)": ShellCode error"
  1420.             GoTo ShellCodeError
  1421.         endif
  1422.         Set RegistryErrorIndex = $($R0)
  1423.         ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1424.             GoTo FatalRegistry
  1425.         endif
  1426.     endif
  1427.  
  1428.     ;
  1429.     ; remove NDIS driver name from manufacturer key
  1430.     ;
  1431.  
  1432.     LoadLibrary "" $(dialogDLLName) hConfig
  1433.  
  1434.     LibraryProcedure Result, $(hConfig) setupNdisDriver, +
  1435.                              $(!STF_HWND) $(Option)  $(!NTN_InstallMode) +
  1436.                              $(ProductSoftwareName)  $(Manufacturer)
  1437.  
  1438.     FreeLibrary  $(hConfig)
  1439.  
  1440.     ifstr(i) $(Result) != "OK"
  1441.        Debug-Output " clear ndis driver name failed"
  1442.        goto fatalregistry
  1443.     endif
  1444.  
  1445.     ;
  1446.     ; Delete the support files
  1447.     ;
  1448.  
  1449.     set removeList = {}
  1450.     set removeList = >($(removeList), #(Files-RemoveList, DRIVERSYS, 1))
  1451.     set removeList = >($(removeList), #(Files-RemoveList, MESSAGEDLL, 1))
  1452.     ;check registry from CAPI before we can remove this file
  1453.     ;set removeList = >($(removeList), #(Files-RemoveList, CONFIGDLL, 1))
  1454.  
  1455.     ForListDo $(removeList)
  1456.       Debug-Output "Removing "$($)
  1457.       LibraryProcedure Status , $(!LIBHANDLE), DelFile $($)
  1458.       Debug-Output "Status is "$(Status)
  1459.     endForListDo
  1460.  
  1461.  
  1462.     GoTo end
  1463.  
  1464. ;***********************************************************************
  1465. ;
  1466. ;***********************************************************************
  1467. UpgradeSoftware = +
  1468.     ifstr(i) $(SoftwareKeyName) == $(!NTN_RegBase)
  1469.         OpenRegKey $(!REG_H_LOCAL) "" $(SoftwareKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1470.         ifstr $(KeyProduct) != $(KeyNull)
  1471.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  1472.             Set Version = *($(VersionInfo), 4)
  1473.             Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  1474.             IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1475.                 Debug-Output $(InfName)": ShellCode error"
  1476.                 GoTo ShellCodeError
  1477.             endif
  1478.             Set !UG_Filename = $($R0)
  1479.             ifstr(i) $(!UG_Filename) != ""
  1480.                 install "Install-Update"
  1481.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1482.                     GoTo FatalError
  1483.                 endif
  1484.             endif
  1485.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  1486.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  1487.             IfInt $(Version) != $(ProductVersion)
  1488.             endif
  1489.             CloseRegKey $(KeyProduct)
  1490.         else
  1491.             GoTo FatalRegistry
  1492.         endif
  1493.     else
  1494.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  1495.               $(MAXIMUM_ALLOWED) NetworkCardKey
  1496.         ifstr(i) $(NetworkCardKey) != $(KeyNull)
  1497.             GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  1498.             Set ServiceName = *($(ServiceNameInfo), 4)
  1499.             OpenRegKey $(NetworkCardKey) "" "NetRules" +
  1500.                 $(MAXIMUM_ALLOWED) NetRuleKey
  1501.             ifstr(i) $(NetRuleKey) != $(KeyNull)
  1502.             else
  1503.                 GoTo FatalRegistry
  1504.             endif
  1505.             CloseRegKey $(NetRules)
  1506.             CloseRegKey $(NetworkCardKey)
  1507.         else
  1508.             GoTo FatalRegistry
  1509.         endif
  1510.         OpenRegKey $(!REG_H_LOCAL) "" +
  1511.               $(!NTN_ServiceBase)"\"$(ServiceName) +
  1512.               $(MAXIMUM_ALLOWED) ServiceKey
  1513.         ifstr(i) $(ServiceKey) != $(KeyNull)
  1514.             CloseRegKey $(ServiceKey)
  1515.         else
  1516.             GoTo FatalRegistry
  1517.         endif
  1518.     endif
  1519.     GoTo end
  1520.  
  1521. ;***********************************************************************
  1522. ;
  1523. ;***********************************************************************
  1524. SuccessfulOption = +
  1525.     GoTo end
  1526.  
  1527. ;***********************************************************************
  1528. ;
  1529. ;***********************************************************************
  1530. Abandon = +
  1531.     ForListDo $(OEM_ABANDON_OPTIONS)
  1532.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1533.             $(ProductSoftwareName), $($)
  1534.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1535.             Debug-Output $(InfName)": ShellCode error"
  1536.             GoTo ShellCodeError
  1537.         endif
  1538.         Set RegistryErrorIndex = $($R0)
  1539.         ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1540.             GoTo FatalRegistry
  1541.         endif
  1542.     EndForListDo
  1543.     ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  1544.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1545.             $(ProductSoftwareName), FALSE
  1546.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1547.             Debug-Output $(InfName)": ShellCode error"
  1548.             GoTo ShellCodeError
  1549.         endif
  1550.         Set RegistryErrorIndex = $($R0)
  1551.         ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1552.             GoTo FatalRegistry
  1553.         endif
  1554.     endif
  1555.     GoTo end
  1556.  
  1557. ;***********************************************************************
  1558. ;
  1559. ;***********************************************************************
  1560. WarningMsg = +
  1561.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1562.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1563.         GoTo ShellCodeError
  1564.     endif
  1565.     ifstr(i) $($R1) == "OK"
  1566.         GoTo $(to)
  1567.     else-ifstr(i) $($R1) == "CANCEL"
  1568.         GoTo $(from)
  1569.     endif
  1570.     GoTo end
  1571.  
  1572. ;***********************************************************************
  1573. ;
  1574. ;***********************************************************************
  1575. NonFatalInfo = +
  1576.     Set Severity = STATUS
  1577.     Set CommonStatus = STATUS_USERCANCEL
  1578.     ifstr(i) $(Error) == ""
  1579.         Set Severity = NONFATAL
  1580.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1581.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1582.             GoTo ShellCodeError
  1583.         endif
  1584.         Set Error = $($R0)
  1585.     endif
  1586.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1587.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1588.         GoTo ShellCodeError
  1589.     endif
  1590.     ifstr(i) $($R1) == "OK"
  1591.         GoTo $(from)
  1592.     endif
  1593.     GoTo end
  1594.  
  1595. ;***********************************************************************
  1596. ;
  1597. ;***********************************************************************
  1598. FatalRegistry = +
  1599.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1600.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1601.         GoTo ShellCodeError
  1602.     endif
  1603.     Set Error = $($R0)
  1604.     GoTo FatalError
  1605.  
  1606. ;***********************************************************************
  1607. ;
  1608. ;***********************************************************************
  1609. FatalDetect = +
  1610.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  1611.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1612.         Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  1613.         GoTo ShellCodeError
  1614.     endif
  1615.     Set Error = $($R0)
  1616.     GoTo FatalError
  1617.  
  1618. ;***********************************************************************
  1619. ;
  1620. ;***********************************************************************
  1621. FatalError = +
  1622.     ifstr(i) $(Error) == ""
  1623.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1624.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1625.             GoTo ShellCodeError
  1626.         endif
  1627.         Set Error = $($R0)
  1628.     endif
  1629.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1630.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1631.         GoTo ShellCodeError
  1632.     endif
  1633.     GoTo SetFailed
  1634.  
  1635. ;***********************************************************************
  1636. ;
  1637. ;***********************************************************************
  1638. ShellCodeError = +
  1639.     Set DlgType      = "MessageBox"
  1640.     Set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1641.     Set STF_MB_TEXT  = $(ShellCodeErrorText)
  1642.     Set STF_MB_TYPE  = 1
  1643.     Set STF_MB_ICON  = 3
  1644.     Set STF_MB_DEF   = 1
  1645.     UI Start "Error Message"
  1646.     GoTo SetFailed
  1647.  
  1648. ;***********************************************************************
  1649. ;
  1650. ;***********************************************************************
  1651. SetFailed = +
  1652.     Set CommonStatus = STATUS_FAILED
  1653.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1654.         Set OEM_ABANDON_ON = FALSE
  1655.         GoTo Abandon
  1656.     endif
  1657.     GoTo end
  1658.  
  1659. ;***********************************************************************
  1660. ;
  1661. ;***********************************************************************
  1662. end = +
  1663.     Debug-Output $(InfName)": end of installation process"
  1664.     Set !DebugOutputControl = $(OldDebugControl)
  1665.     Return $(CommonStatus)
  1666.  
  1667. ;***********************************************************************
  1668. ;
  1669. ;***********************************************************************
  1670. [HtCreateRegKey]
  1671.     Debug-Output $(InfName)": Entering [HtCreateRegKey]"
  1672.     Set ECR_Result          = NO_ERROR
  1673.     Set ECR_BaseKeyHandle   = $($0)
  1674.     Set ECR_NewPath         = $($1)
  1675.     Set KeyNull             = ""
  1676.     Set MAXIMUM_ALLOWED     = 33554432
  1677.  
  1678.     Debug-Output $(InfName)": HtCreateRegKey - ECR_BaseKeyHandle = "$(ECR_BaseKeyHandle)
  1679.     Debug-Output $(InfName)":                  ECR_NewPath       = "$(ECR_NewPath)
  1680.     Debug-Output $(InfName)":                  MAXIMUM_ALLOWED   = "$(MAXIMUM_ALLOWED)
  1681.     Debug-Output $(InfName)":                  KeyNull           = "$(KeyNull)
  1682.  
  1683.     OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_NewPath) $(MAXIMUM_ALLOWED) +
  1684.                ECR_BaseKey
  1685.     Debug-Output $(InfName)": ECR_BaseKey = "$(ECR_BaseKey)
  1686.     Debug-Output $(InfName)":     OpenRegKey returned "$($R0)
  1687.     ifstr $(ECR_BaseKey) == $(KeyNull)
  1688.         Debug-Output $(InfName)": ECR_BaseKey == KeyNull"
  1689.     else
  1690.         Debug-Output $(InfName)": ECR_BaseKey != KeyNull"
  1691.         Set ECR_KeyHandle = $(ECR_BaseKey)
  1692.         GoTo  ECR_Return
  1693.     endif
  1694.  
  1695.     Set ECR_TmpPath = ""
  1696.     Split-String $(ECR_NewPath) "\" ECR_PList
  1697.     Debug-Output $(InfName)": ECR_PList = "$(ECR_PList)
  1698.     ForListDo $(ECR_PList)
  1699.         ifstr(i) $($) != "\"
  1700.             IfInt $(#) == 1
  1701.                 Set ECR_TmpPath = $($)
  1702.             else
  1703.                 Set ECR_TmpPath = $(ECR_TmpPath)"\"$($)
  1704.             endif
  1705.             Debug-Output $(InfName)": Determining if "$(ECR_TmpPath)" exists"
  1706.             OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_TmpPath) $(MAXIMUM_ALLOWED) ECR_BaseKey
  1707.             ifstr $(ECR_BaseKey) == $(KeyNull)
  1708.                 Debug-Output $(InfName)": Creating "$(ECR_TmpPath)
  1709.                 CreateRegKey $(ECR_BaseKeyHandle)  {$(ECR_TmpPath),0,GenericClass} "" $(MAXIMUM_ALLOWED) "" ECR_KeyHandle
  1710.                 ifstr(i) $(ECR_KeyHandle) == $(KeyNull)
  1711.                     Set ECR_Result = $($R0)
  1712.                     GoTo ECR_Return
  1713.                 endif
  1714.             endif
  1715.         endif
  1716.     EndForListDo
  1717. ECR_Return = +
  1718.     Return $(ECR_Result) $(ECR_KeyHandle)
  1719.  
  1720. ;***********************************************************************
  1721. ;
  1722. ;***********************************************************************
  1723. [DebugConfiguration]
  1724.     Debug-Output $(!p:InfName)": **CONFIGURATION STATE: "$($0)
  1725.     Debug-Output $(!p:InfName)": InterruptNumber is "$(!p:InterruptNumber)
  1726.     Debug-Output $(!p:InfName)": ioBaseAddress  is "$(!p:ioBaseAddress)
  1727.     Return
  1728.  
  1729. ;***********************************************************************
  1730. ;
  1731. ;***********************************************************************
  1732. [Install-Option]
  1733.     Set STF_VITAL = ""
  1734.     ifstr(i) $(AddCopy) == "YES"
  1735.         AddSectionFilesToCopyList Files-Driver $(SrcDir) $(oemDriverPath)
  1736.         AddSectionFilesToCopyList Files-DLL    $(SrcDir) $(oemUtilPath)
  1737.     endif
  1738.     ifstr(i) $(DoCopy) == "YES"
  1739.        Set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1740.        CopyFilesInCopyList
  1741.     endif
  1742.     Exit
  1743.  
  1744. ;-------------------------------------------------------------------------
  1745. ;
  1746. ;-------------------------------------------------------------------------
  1747. [Install-Update]
  1748.    Set STF_VITAL        = ""
  1749.    Set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1750.    AddSectionFilesToCopyList Files-Driver $(SrcDir) $(oemDriverPath)
  1751.    AddSectionFilesToCopyList Files-Inf    $(SrcDir) $(oemUtilPath)
  1752.    AddSectionFilesToCopyList Files-DLL    $(SrcDir) $(oemUtilPath)
  1753.    Set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1754.    CopyFilesInCopyList
  1755.    Exit
  1756.  
  1757. ;-------------------------------------------------------------------------
  1758. ;
  1759. ;-------------------------------------------------------------------------
  1760. [Install-StartupFiles]
  1761.    Set STF_VITAL        = ""
  1762.    Set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1763.    AddSectionFilesToCopyList Files-Startup $(SrcDir) $(oemUtilPath)
  1764.    Set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1765.    CopyFilesInCopyList
  1766.    Exit
  1767.  
  1768. ;***********************************************************************
  1769. ;
  1770. ;***********************************************************************
  1771. [ProductType]
  1772.     STF_PRODUCT         = Winnt
  1773.     STF_PLATFORM        = I386
  1774.  
  1775. ;***********************************************************************
  1776. ;
  1777. ;***********************************************************************
  1778. [Files-Inf]
  1779.     1, oemsetnt.inf, SIZE=1000, RENAME=$(!UG_Filename)
  1780.  
  1781. ;***********************************************************************
  1782. ;
  1783. ;***********************************************************************
  1784. [Files-Driver]
  1785.     1, $(driverName).sy_,   SIZE=110000,DECOMPRESS,RENAME=$(driverName).sys
  1786.  
  1787.  
  1788. [Files-DLL]
  1789.     1, $(messageDLLName).dl_,  SIZE=20000,DECOMPRESS,RENAME=$(messageDLLName).dll
  1790.  
  1791. [Files-Startup]
  1792.     1, $(configDLLName).dl_, SIZE=20000,DECOMPRESS,RENAME=$(configDLLName).dll
  1793.  
  1794. [Files-RemoveList]
  1795. DRIVERSYS   = $(oemDriverPath)\$(ProductSoftwareName).sys
  1796. MESSAGEDLL  = $(oemUtilPath)\$(messageDLLName).dll
  1797. CONFIGDLL   = $(oemUtilPath)\$(configDLLName).dll
  1798.  
  1799.  
  1800.  
  1801. ;***********************************************************************
  1802. ;
  1803. ;***********************************************************************
  1804. [DialogConstantsENG]
  1805.     Help                = "&Help"
  1806.     Exit                = "Cancel"
  1807.     OK                  = "OK"
  1808.     HelpContext         = ""
  1809.     Continue            = "Continue"
  1810.     Cancel              = "Cancel"
  1811.  
  1812. ;***********************************************************************
  1813. ;
  1814. ;***********************************************************************
  1815. [FileDependentDlgENG]
  1816.     Combo1Label         = "IRQ Level:"
  1817.     Combo2Label         = "Port Address:"
  1818.     Combo3Label         = "I&SDN Protocol:"
  1819.     Combo4Label         = "RAS/TAPI &incoming number:"
  1820.     Combo5Label         = "RAS/TAPI &outgoing number:"
  1821.     Edit1Label          = "SPID1 (on&ly for N1/2):"
  1822.     Edit2Label          = "SPID2 (onl&y for N1/2):"
  1823.     Edit3Label          = "phone &1:"
  1824.     Edit4Label          = "phone &2:"
  1825.  
  1826.     DlgType             = "RadioCombination"
  1827.     DlgTemplate         = "MACSETUP"
  1828.     Caption             = $(FunctionTitle)" "$(Option)
  1829.  
  1830.     Combo1List          = $(IRQ_List)
  1831.     Combo1Out           = $(InterruptNumber)
  1832.     Combo2List          = $(RAM_Hex_List)
  1833.     Combo2Out           = $(RAM_Hex_Value)
  1834.     Combo3List          = $(firmwareList)
  1835.     Combo3Out           = $(fwType)
  1836.     Combo4List          = $(msnInList)
  1837.     Combo4Out           = $(msnInNumber)
  1838.     Combo5List          = $(msnOutList)
  1839.     Combo5Out           = $(msnOutNumber)
  1840.  
  1841.     EditTextIn          = { $(capiSPID1), $(capiSPID2), $(phoneID1), $(phoneID2) }
  1842.     EditTextLim         = {20, 20, 40, 40}
  1843.     ComboListItemsIn    = {Combo1List, Combo2List,Combo3List,Combo4List,Combo5List}
  1844.     ComboListItemsOut   = {Combo1Out, Combo2Out,Combo3Out,Combo4Out,Combo5Out}
  1845.  
  1846.     CBOptionsGreyed     = {}
  1847.     NotifyFields        = {NO, NO}
  1848. ;    HelpContext         = $(!IDH_DB_OEMNADN2_INS)
  1849.  
  1850.  
  1851. ;***********************************************************************
  1852. ;
  1853. ;***********************************************************************
  1854. [InvokeRasDlgENG]
  1855.     InvokeRasSetupMsg   = "ISDN card setup is complete. "+
  1856.                           "Remote Access Services (RAS) must now be installed. "+
  1857.                           "Please configure the ISDN driver ports in RAS "+
  1858.                           "setup to enable you to use RAS over the isdn driver."
  1859.     InvokeRasConfigMsg  = "ISDN setup is complete. "+
  1860.                           "Remote Access Services (RAS) setup must now be invoked. "+
  1861.                           "Please configure the isdn driver ports in RAS "+
  1862.                           "setup to enable you to use RAS over the isdn driver."
  1863.     InvokeRasError      = "ISDN setup encountered an error "+
  1864.                           "while invoking the RAS setup INF file (OEMNSVRA.INF). "+
  1865.                           "Please make sure that the file is present in the "+
  1866.                           "System32 directory and is the proper file."
  1867.  
  1868.  
  1869.