home *** CD-ROM | disk | FTP | other *** search
/ Network Support Encyclopedia 96-1 / novell-nsepro-1996-1-cd2.iso / download / netware / ntws1.exe / NTCLI / NTCLNT_1.350 / I386 / ODINSUP.IN_ / ODINSUP.IN
Text File  |  1995-01-31  |  36KB  |  1,146 lines

  1. ;***********************************************************************
  2. ;
  3. ; ODINSUP.INF
  4. ;
  5. ;       Novell Ndis to ODI network logical adapter SETUP INF file.
  6. ;
  7. ;***********************************************************************
  8.  
  9. [Identification]
  10.     OptionType = NetAdapter
  11.  
  12. [PlatformsSupported]
  13.     ISA
  14.     MCA
  15.     EISA
  16.      PCI
  17.     "Jazz-Internal Bus"
  18.  
  19. [LanguagesSupported]
  20.     ENG
  21.  
  22. ;
  23. ; Option List   OEM Option Key Names
  24.  
  25. [Options]
  26.     ODINSUP
  27.  
  28. [OptionsTextENG]
  29.     ODINSUP     = " ODI Support for NDIS Protocols Adapter (ODINSUP)"
  30.  
  31. ;
  32. ; Constants for using Dialogs
  33.  
  34. [IRQChoices]
  35. IRQ_1 = "2",2
  36. IRQ_2 = "3",3
  37. IRQ_3 = "4",4
  38. IRQ_4 = "5",5
  39.  
  40. [IOBaseAddrChoices]
  41. IOBase_1  = "0x300",768
  42. IOBase_2  = "0x320",800
  43. IOBase_3  = "0x340",832
  44. IOBase_4  = "0x360",864
  45.  
  46. ;
  47. ; ===================================================================================
  48. ;
  49. ;
  50. [OdinsupDlgENG]
  51. IDH_NETWARENDISODI            =    907
  52. Help        = "&Help"
  53. OK            = "OK"
  54. Continue    = "Continue"
  55. Cancel        = "Cancel"
  56. Advanced = "&Advanced"
  57.     DlgType = "RadioCombination"
  58.     DlgTemplate = "ONELIST"
  59.     Caption = "NetWare NDIS over ODI (ODINSUP) Setup"
  60.     Label1 = "Installed ODI Adapters"
  61.     EditTextIn = ""
  62.     EditTextLim = ""
  63.     CBOptionsGreyed = {}
  64.     HelpContext = $(IDH_NETWARENDISODI)
  65.     ComboListItemsIn = { OdiTitleList }
  66.     ComboListItemsOut = { DefaultOdiTitle }
  67.     NotifyFields = { "NO" }
  68. ;
  69. ; ===================================================================================
  70. ;
  71. ;
  72.  
  73. [FileConstants]
  74. UtilityInf      = "UTILITY.INF"
  75. subroutineinf   = "SUBROUTN.INF"
  76. NwSubsInf    = "NWSUBS.INF"
  77. SoftwareType    = "driver"
  78. Exit_Code       = 0
  79. DriverToLoad    = ""
  80.  
  81. ;
  82. ; EventLog Message File
  83.  
  84. NetEventDLL    = "%SystemRoot%\System32\netevent.dll"
  85. IoLogMsgDLL    = "%SystemRoot%\System32\IoLogMsg.dll"
  86.  
  87. ;
  88. ; Product Info
  89.  
  90. Manufacturer    = "Novell"
  91. ProductMajorVersion    = "0"
  92. ProductMinorVersion    = "9"
  93. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  94.  
  95. ;
  96. ; Software
  97.  
  98. ProductSoftwareName     = "ODINSUP"
  99. ProductSoftwareTitle    = "ODI Support for NDIS Protocols Driver"
  100. ProductSoftwareImagePath = "\SystemRoot\system32\drivers\odinsup.sys"
  101. NetRuleSoftwareType     = "odinsupSys ndisDriver odinsupDriver"
  102. NetRuleSoftwareUse      = $(SoftwareType)
  103. NetRuleSoftwareBindForm = """OdinsupSys"" yes no container"
  104. NetRuleSoftwareClass    = {"odinsupDriver basic"}
  105. NetRuleSoftwareBindable = {"odinsupDriver odinsupAdapter non exclusive 100"}
  106.  
  107. ;
  108. ; Hardware
  109.  
  110. ProductHardwareName     = "ODINSUP"
  111. ProductHardwareODINSUPTitle    = "ODI Support for NDIS Protocols Adapter"
  112. NetRuleHardwareType     = "odinsup odinsupAdapter"
  113. NetRuleHardwareBindForm = " yes yes container"
  114. NetRuleHardwareClass    = {"odinsupAdapter basic"}
  115.  
  116. ;
  117. ; Registry Key
  118.  
  119. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  120. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  121.  
  122. [GeneralConstants]
  123. ;
  124. ; Programe Flow control variables
  125. ;
  126. from      = ""
  127. to        = ""
  128. ;
  129. ; Return Codes; Exit_Code is set to one of these
  130. ;
  131. ExitCodeOk     = 0
  132. ExitCodeCancel = 1
  133. ExitCodeFatal  = 2
  134.  
  135. KeyNull         = ""
  136. MAXIMUM_ALLOWED   = 33554432
  137. RegistryErrorIndex = NO_ERROR
  138. KeyProduct      = ""
  139. KeyParameters   = ""
  140.  
  141. TRUE            = 1
  142. FALSE           = 0
  143. NoTitle            = 0
  144.  
  145. ExitState   = "Active"
  146. OldVersionExisted = $(FALSE)
  147.  
  148. DriverPath      = $(!STF_NTPATH)\drivers
  149.  
  150. ;
  151. ; Language Dependent Dialog Constants
  152.  
  153. [FileConstantsENG]
  154. ProCaption   = "Windows NT Setup"
  155. ProCancel    = "Cance&l"
  156. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  157.                "Are you sure you want to cancel copying files?"
  158. ProCancelCap = "Network Setup Message"
  159. ProText1     = "Copying:"
  160. ProText2     = "To:"
  161.  
  162. ;
  163. ; Producr Info
  164.  
  165. FunctionTitle   = "Novell ODI Support for NDIS Setup"
  166.  
  167. ;
  168. ; Software
  169.  
  170. ProductSoftwareDescription      = "ODI Support for NDIS Protocols Driver"
  171.  
  172. ;
  173. ; Hardware
  174.  
  175. ProductHardwareODINSUPDescription    = "ODI Support for NDIS Protocols Adapter"
  176.  
  177. IRQList  = ^(IRQChoices, 1)
  178. IRQValues = ^(IRQChoices, 2)
  179. IOBaseAddrList = ^(IOBaseAddrChoices, 1)
  180. IOBaseAddrValues = ^(IOBaseAddrChoices, 2)
  181.  
  182. [DialogConstantsENG]
  183.  
  184. ;
  185. ; Common Button Names
  186. ;
  187.  
  188. Help        = "&Help"
  189. Exit        = "&Cancel"
  190. OK          = "&OK"
  191. HelpContext = ""
  192. Continue    = "C&ontinue"
  193. Cancel      = "C&ancel"
  194. [date]
  195.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  196.  
  197. ;
  198. ; Input DIALOGS
  199. ;
  200.  
  201. [FileDependentDlgENG]
  202. DlgType = "RadioCombination"
  203. DlgTemplate = "ONELIST"
  204. Caption = $(FunctionTitle)
  205.  
  206. DlgText = "Please select values for the following fields:"
  207.  
  208. Label1 = "&IRQ Level:"
  209. Label2 = "I/O &Port Base Addr:"
  210.  
  211. Combo1List = $(IRQList)
  212. Combo1Out  = $(IRQValue)
  213. Combo2List = $(IOBaseAddrList)
  214. Combo2Out  = $(IOBaseAddrValue)
  215. ComboListItemsIn  = {Combo1List, Combo2List}
  216. ComboListItemsOut = {Combo1Out, Combo2Out}
  217. EditTextIn = ""
  218. EditTextLim = ""
  219. CBOptionsGreyed = {}
  220. NotifyFields = {NO, NO}
  221. HelpContext = $(!IDH_DB_ODINSUP_INS)
  222.  
  223. ;------------------------------------------------------------------------------
  224. ; 1. Identify    To verify that this INF deals with the smae type of options
  225. ;        as we are choosing currently.
  226. ;
  227. ; Input:    none
  228. ;
  229. ; Output:    $($R0):    STATUS:    STATUS_SUCCESSFUL
  230. ;        $($R1):    Option Type (COMPUTER ...)
  231. ;        $($R2):    Diskette Description
  232. ;------------------------------------------------------------------------------
  233.  
  234. [Identify]
  235.     ;
  236.     ;
  237.     read-syms Identification
  238.     set Status     = STATUS_SUCCESSFUL
  239.     set Identifier = $(OptionType)
  240.     set Media      = #("Source Media Descriptions", 1, 1)
  241.  
  242.     Return $(Status) $(Identifier) $(Media)
  243.  
  244. ;------------------------------------------------------------------------------
  245. ; 2. ReturnOptions    To return the option list supported by this INF and
  246. ;            the localized text list representing the options.
  247. ; Input:    $($0):    Lang. used (ENG | FRN | ....)
  248. ;
  249. ; Output:    $($R0):    STATUS:    STATUS_SUCCESSFUL    |
  250. ;                STATUS_NOLANGUAGE    |
  251. ;                STATUS_FAILED        |
  252. ;                STATUS_NOTSUPPORTED
  253. ;        $($R1):    Option List
  254. ;        $($R2):    Option Text List
  255. ;
  256. ;------------------------------------------------------------------------------
  257.  
  258. [ReturnOptions]
  259.     set Status        = STATUS_FAILED
  260.     set OptionList     = {}
  261.     set OptionTextList = {}
  262.  
  263.     ;
  264.     ; Check if the language requested is supported
  265.  
  266.     set LanguageList = ^(LanguagesSupported, 1)
  267.  
  268.     Ifcontains(i) $($0) in $(LanguageList)
  269.         ifstr(i) $($1) == ""
  270.         goto returnoptions
  271.         endif
  272.         set PlatformList = ^(PlatformsSupported, 1)
  273.         Ifcontains(i) $($1) in $(PlatformList)
  274.         goto returnoptions
  275.         else
  276.         set Status = STATUS_NOTSUPPORTED
  277.         goto finish_ReturnOptions
  278.         endif
  279.     else
  280.     set Status = STATUS_NOLANGUAGE
  281.     goto finish_ReturnOptions
  282.     endif
  283.  
  284.     ;
  285.     ; form a list of all the options and another of the text representing
  286.  
  287. returnoptions = +
  288.     set OptionList     = ^(Options, 1)
  289.     set OptionTextList = ^(OptionsText$($0), 1)
  290.     set Status         = STATUS_SUCCESSFUL
  291.  
  292. finish_ReturnOptions = +
  293.     Return $(Status) $(OptionList) $(OptionTextList)
  294.  
  295.  
  296.  
  297. ;------------------------------------------------------------------------------
  298. ; 2. InstallOption    This section is shelled to by main installation processing
  299. ;
  300. ; Function:    To copy files representing Options
  301. ;        To configure the installed option
  302. ;        To update the Registry for the installed option
  303. ;
  304. ; Input:    $($0):    Lang. to use
  305. ;        $($1):    OptionID to install
  306. ;        $($2):    SourceDirectory
  307. ;        $($3):    AddCopy        ( YES | NO )
  308. ;        $($4):    DoCopy        ( YES | NO )
  309. ;        $($5):    DoConfig    ( YES | NO )
  310. ;
  311. ; Output:    $($R0):    STATUS:    STATUS_SUCCESSFUL    |
  312. ;                STATUS_NOLANGUAGE    |
  313. ;                STATUS_USERCANCEL    |
  314. ;                STATUS_FAILED        |
  315. ;                STATUS_NOTSUPPORTED
  316. ;
  317. ;------------------------------------------------------------------------------
  318.  
  319. [InstallOption]
  320.  
  321.  
  322.     ;
  323.     ; Set default values for
  324.  
  325.     set Status   = STATUS_FAILED
  326.  
  327.     ;
  328.     ; extract parameters
  329.  
  330.     set Option   = $($1)
  331.     set !SrcDir   = $($2)
  332.     set !AddCopy  = $($3)
  333.     set !DoCopy   = $($4)
  334.     set !DoConfig = $($5)
  335.  
  336.     ;
  337.     ; Check if the language requested is supported
  338.  
  339.     set LanguageList = ^(LanguagesSupported, 1)
  340.     Ifcontains(i) $($0) in $(LanguageList)
  341.     goto installoption
  342.     else
  343.     set Status = STATUS_NOLANGUAGE
  344.     goto finish_InstallOption
  345.     endif
  346.  
  347. installoption = +
  348.  
  349. ;
  350. ; Verify NCPA variables.
  351. ; Set the InstallMode to "install"
  352.  
  353. ;    set !NTN_InstallMode  = "install"
  354.  
  355. ;
  356. ; Tell the common code that we're being called from "main install"
  357.  
  358.     ifstr(i) $(!NTN_Origination) != "NCPA"
  359.     set !NTN_Origination = "install"
  360.     endif
  361.  
  362. ;
  363. ; Call the CommonSection
  364.  
  365.     shell "" CommonSection $(Option)
  366.     set Status = $($R0)
  367.     ifstr(i) $($R1) != ""
  368.     set DriverToLoad = { $($R1) }
  369.     else
  370.     set DriverToLoad = ""
  371.     endif
  372.     Return $(Status) $(DriverToLoad)
  373. [NcpaInvocation]
  374.     set Option   = $(!NTN_InfOption)
  375.     set !SrcDir   = $(!STF_SRCDIR)
  376.     Ifstr(i) $(!NTN_InstallMode) == install
  377.     set !AddCopy  = YES
  378.     set !DoCopy   = YES
  379.     set !DoConfig = YES
  380.     Else
  381.     set !AddCopy  = NO
  382.     set !DoCopy   = NO
  383.     set !DoConfig = NO
  384.     Endif
  385.     shell "" CommonSection $(Option)
  386.     set Status = $($R0)
  387.     Return $(Status)
  388. [CommonSection]
  389.     StartWait
  390.     set Option = $($0)
  391.     set-subst LF = "\n"
  392.     read-syms GeneralConstants
  393.     read-syms FileConstants
  394.     read-syms DialogConstants$(!STF_LANGUAGE)
  395.     read-syms FileConstants$(!STF_LANGUAGE)
  396.     detect date
  397.     set-title  $(FunctionTitle)
  398.     set to   = Begin
  399.     set from = Begin
  400.     set CommonStatus = STATUS_SUCCESSFUL
  401.     EndWait
  402. Begin = +
  403.     Debug-Output "ODINSUP.INF: Begin Install Mode = "$(!NTN_InstallMode)
  404.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  405.         set StartLabel = removeadapter
  406.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  407.             set StartLabel = UpgradeSoftware
  408.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  409.         set StartLabel = bindingadapter
  410.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  411.         set StartLabel = configureadapter
  412.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  413.             Debug-Output "ODINSUP.INF: Cannot configure the Novell ODINSUP driver software."
  414.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  415.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  416.                 Debug-Output "ODINSUP.INF: ShellCode error: cannot get an error string."
  417.                 goto ShellCodeError
  418.             endif
  419.             set Error = $($R0)
  420.             set from = end
  421.             set to = end
  422.             goto Warning
  423.         endif
  424.     else
  425.         set StartLabel = installadapter
  426.         set OEM_ABANDON_OPTIONS = {}
  427.         set OEM_ABANDON_SOFTWARE = FALSE
  428.         set OEM_ABANDON_ON = TRUE
  429.     endif
  430.     set IRQValue = *($(IRQList), 2)
  431.     set IOBaseAddrValue = *($(IOBaseAddrList), 1)
  432.     set from = $(fatal)
  433.     set to = $(fatal)
  434.     goto $(StartLabel)
  435. installadapter = +
  436.     Debug-Output "ODINSUP.INF: installadapter "$(ProductKeyName)
  437.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  438.     Ifstr $(KeyProduct) != $(KeyNull)
  439.     CloseRegKey $(KeyProduct)
  440.     ifstr(i) $(!NTN_RegBase) == $(ProductKeyName)
  441.        Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  442.            $(ProductVersion)
  443.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  444.            Debug-Output $(!STF_ONTEXTINFNAME)": ShellCode error: cannot get an error string."
  445.            goto ShellCodeError
  446.        endif
  447.        goto end
  448.     else
  449.        Shell $(UtilityInf), CardExistedDlg
  450.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  451.            Debug-Output "ODINSUP.INF: ShellCode error: cannot get an error string."
  452.            goto ShellCodeError
  453.        endif
  454.        ifstr(i) $($R1) != "OK"
  455.            goto end
  456.        endif
  457.        set OldVersionExisted = $(TRUE)
  458.     endif
  459.     endif
  460.     goto adapteroptions
  461. configureadapter = +
  462.     Debug-Output "ODINSUP.INF: configureadapter"
  463.     Ifstr $(KeyProduct) == $(KeyNull)
  464.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  465.     Ifstr $(KeyProduct) == $(KeyNull)
  466.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  467.         Debug-Output "ODINSUP.INF: Cannot find component product key "$(!NTN_RegBase)
  468.         goto fatalregistry
  469.     Endif
  470.     Endif
  471.     Debug-Output "ODINSUP.INF: Shelling to FindService"
  472.     Shell $(UtilityInf) FindService, $(KeyProduct)
  473.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  474.     Debug-Output "ODINSUP.INF: FindService shell failure "$($ShellCode)
  475.     Goto ShellCodeError
  476.     Endif
  477.     Ifstr(i) $($R0) != NO_ERROR
  478.     Debug-Output "ODINSUP.INF: FindService Shell error: "$($R0)
  479.     Goto fatalregistry
  480.     endif
  481.     set KeyParameters = $($R2)
  482.     CloseRegKey $($R1)
  483.     Ifstr $(KeyParameters) == $(KeyNull)
  484.     set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  485.     Debug-Output "ODINSUP.INF: Cannot find component service"
  486.     goto fatalregistry
  487.     endif
  488.     set OldVersionExisted = $(TRUE)
  489.     set ValueName = ""
  490.     set ValueData = ""
  491.     set ValueStr  = ""
  492.     set ValueList = {}
  493.     Set OdiCurBindCardName = ""
  494.  
  495.     EnumRegValue $(KeyParameters) ValueList
  496.  
  497.     ForListDo $(ValueList)
  498.     set ValueItem = $($)
  499.     set ValueName = *($(ValueItem),1)
  500.     set ValueData = *($(ValueItem),4)
  501.     Ifstr(i) $(ValueName) == "InterruptNumber"
  502.         set IRQValueIndex = $(ValueData)
  503.     else-ifstr(i) $(ValueName) == "IoBaseAddress"
  504.         set IOBaseAddrIndex = $(ValueData)
  505.     else-ifstr(i) $(ValueName) == "Bind"
  506.         Set OdiCurBindCardName = $(ValueData)
  507.         Debug-Output "ODINSUP is Currently bound to "$(OdiCurBindCardName)
  508.     endif
  509.     EndForListDo
  510.     set IRQValue = *($(IRQList), ~($(IRQValues),$(IRQValueIndex)))
  511.     ifstr(i) $(IRQValue) == ""
  512.     set IRQValue = *($(IRQList), 2)
  513.     endif
  514.     set IOBaseAddrValue = *($(IOBaseAddrList), +
  515.      ~($(IOBaseAddrValues),$(IOBaseAddrIndex)))
  516.     ifstr(i) $(IOBaseAddrValue) == ""
  517.     set IOBaseAddrValue = *($(IOBaseAddrList), 1)
  518.     endif
  519.     goto adapteroptions
  520. adapteroptions = +
  521.     Debug-Output "ODINSUP.INF: adapteroptions, NTN_RegBase = "$(!NTN_RegBase)
  522.  
  523.     set from = adapteroptions
  524.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  525. ;
  526. ; In this block we will determine which installed ODI adapter to bind
  527. ; ODINSUP too.  If multiple ODI adapters are install the user will be
  528. ; allowed to select from a dialog box which adapter to bind too.
  529. ;
  530.  
  531.     set NetworkCardsKeyName = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards"
  532.  
  533.     OpenRegKey $(!REG_H_LOCAL) "" $(NetworkCardsKeyName) $(MAXIMUM_ALLOWED) NetCardsKey
  534.  
  535.     Ifstr(i) $(NetCardsKey) == ""
  536.         Debug-Output "Can't Open Registry key "$(NetworkCardsKeyName)
  537.     set CommonStatus = STATUS_USERCANCEL
  538.     Else
  539. ;
  540. ; Get a list of all installed network cards
  541. ;
  542.         EnumRegKey $(NetCardsKey) NetCardsList
  543.  
  544.         ForListDo $(NetCardsList)
  545.         Set CardNumber = *($($), 1)
  546. ;        Debug-Output "ODINSUP.INF: CardNumber = "$(CardNumber)
  547.         Ifstr(i) $(CardNumber) != ""
  548.             Ifstr(i) $(FirstTime) == 1
  549.             set CardList = $(CardNumber)
  550.             Set FirstTime = 0
  551.         Else
  552.                 set CardList = >($(CardList), $(CardNumber))
  553.         Endif
  554.         Endif
  555.     EndForListDo
  556.  
  557. ;    Debug-Output "ODINSUP.INF: CardList = "$(CardList)
  558.  
  559. ;    Set FirstTime = 1
  560.    Set FirstTime = 0
  561.  
  562. ;
  563. ; Run though the list of installed adapters and create a list of installed
  564. ; ODI Adapters.
  565. ;
  566.     ForListDo $(CardList)
  567.         Set Card = $($)
  568.  
  569.         OpenRegKey $(NetCardsKey) "" $(Card) $(MAXIMUM_ALLOWED) CardKey
  570.         Ifstr(i) $(CardKey) == ""
  571.             Debug-Output "ODINSUP.INF: Can't open card "$(Card)
  572.         Else
  573.  
  574.             GetRegValue $(CardKey) "OdiAdapter" OdiValueList
  575.                 Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  576.  
  577.             set OdiAdapter = *($(OdiValueList), 4)
  578.  
  579.             Ifstr(i) $(OdiAdapter) == "1"
  580.                 GetRegValue $(CardKey) "Title" OdiTitleValues
  581.                 Set OdiTitle = *($(OdiTitleValues), 4)
  582.             GetRegValue $(CardKey) "ProductName" OdiNameValues
  583.             Set OdiName = *($(OdiNameValues), 4)
  584.                 Ifstr(i) $(FirstTime) == 1
  585.                     Set OdiOnlyList = $(Card)
  586.                 Set OdiTitleList = $(OdiTitle)
  587.                 Set OdiCardList = $(OdiName)
  588.                 set FirstTime = 0
  589.                 Else
  590.                     set OdiOnlyList = >($(OdiOnlyList), $(Card))
  591.                 Set OdiTitleList = >($(OdiTitleList), $(OdiTitle))
  592.                 Set OdiCardList = >($(OdiCardList), $(OdiName))
  593.                 Set FirstTime = 2
  594.                 Endif
  595.             Endif
  596.         Endif
  597.  
  598.         CloseRegKey $(CardKey)
  599.         Endif
  600.     
  601.     EndForListDo
  602.  
  603. ;    Debug-Output "OdiOnlyList = "$(OdiOnlyList)
  604. ;    Debug-Output "OdiTitleList = "$(OdiTitleList)
  605.     Debug-Output "OdiCardList = "$(OdiCardList)
  606.  
  607.         CloseRegKey $(NetCardsKey)
  608.     Endif
  609.  
  610.  
  611. ;
  612. ; If there is only one ODI Adapter installed bind to that adapter otherwise
  613. ; allow the user to select.
  614. ;
  615.     Ifstr(i) $(FirstTime) == 1
  616.         Debug-Output "ODINSUP.INF NO ODI Adapters installed."
  617.         set DlgType      = "MessageBox"
  618.         set STF_MB_TITLE = "NetWare ODINSUP Setup"
  619.         set STF_MB_TEXT  = "There are NO ODI Adapters installed in this Computer.  Please install an ODI Adapter and then install ODINSUP."
  620.         set STF_MB_TYPE  = 1
  621.         set STF_MB_ICON  = 3
  622.         set STF_MB_DEF   = 1
  623.         ui start "Error Message"
  624.     goto end
  625.     Endif
  626.  
  627.     Ifstr(i) $(FirstTime) == 0
  628. ;    Set OdiBindToAdapter = $(OdiCardList)
  629.     Set OdiBindToAdapter = ""
  630.         Debug-Output "ODINSUP.INF: Only ONE ODI Adapter Installed "$(OdiBindToAdapter)
  631.     Else
  632. ;
  633. ; allow the user the select the adapter to bind too.
  634. ;
  635.         Debug-Output "ODINSUP.INF More than one ODI Adapter "$(OdiCardList)
  636.  
  637.         LoadLibrary "NetWare for Windows NT" nwsetup.dll NwLibHandle
  638.  
  639.     Ifstr(i) $(OdiCurBindCardName) != ""
  640.         Debug-Output "OdiCurBindCardName = "$(OdiCurBindCardName)
  641.             Set DefaultOdiTitle = *($(OdiTitleList), ~($(OdiCardList), $(OdiCurBindCardName)))
  642.     Endif
  643.  
  644.     Ifstr(i) $(DefaultOdiTitle) == ""
  645.             Set DefaultOdiTitle = *($(OdiTitleList), 1)
  646.         Endif
  647.  
  648.     Debug-Output "DefaultOdiTitle = "$(DefaultOdiTitle)
  649.  
  650.         SetHelpFile $(!STF_WINDOWSSYSPATH)"\nls\english\nwnthelp.hlp" $(!MinimumID) $(!MaximumID)
  651.         read-syms OdinsupDlg$(!STF_LANGUAGE)
  652.         ui start "ODINSUP" $(NwLibHandle)
  653.         ui pop 1
  654.     
  655.         ifstr(i) $(DLGEVENT) == "BACK"
  656.             set AdapterSelected = ""
  657.         else
  658.             Set AdapterSelected = *($(DefaultOdiTitle), 1)
  659.         endif
  660.  
  661.         Debug-Output "AdapterSelected = "$(AdapterSelected)
  662.  
  663.     Ifstr(i) $(AdapterSelected) == ""
  664.         Debug-Output "ODINSUP.INF: Cancel Selected"
  665.         goto end
  666.     Else
  667.         Set OdiBindToAdapter = *($(OdiCardList), ~($(OdiTitleList), $(AdapterSelected)))
  668.     Endif
  669.  
  670.         FreeLibrary $(NwLibHandle)
  671.  
  672.     Endif
  673.  
  674. ;
  675. ;    ui start "InputDlg"
  676. ;    ifstr(i) $(DLGEVENT) == "CONTINUE"
  677. ;        set IRQValueIndex = $(Combo1Out)
  678. ;        set IOBaseAddrIndex = $(Combo2Out)
  679. ;        ui pop 1
  680. ; TWM set dummy values for IRQ, IOBase
  681. ;
  682.         set IRQValueIndex = "3"
  683.         set IOBaseAddrIndex = "300"
  684.         goto nextstep
  685. ;    else-ifstr(i) $(DLGEVENT) == "EXIT"
  686. ;        set CommonStatus = STATUS_USERCANCEL
  687. ;        Debug-Output "ODINSUP.INF: Action: exit. Bye."
  688. ;        ui pop 1
  689. ;        goto end
  690. ;    else
  691. ;        ui pop 1
  692. ;        Debug-Output "ODINSUP.INF: Action: unknown. Bye."
  693. ;        goto end
  694. ;    endif
  695. nextstep = +
  696.     ifint $(OldVersionExisted) == $(TRUE)
  697.         ifstr(i) $(!NTN_InstallMode) == configure
  698.             goto writeparameters
  699.         endif
  700.     endif
  701.     StartWait
  702. installproduct = +
  703.     ifint $(OldVersionExisted) == $(FALSE)
  704.         Debug-Output "ODINSUP.INF: First Time Install"
  705. ;        ifstr(i) $(!NTN_Origination) == "NCPA"
  706. ;            Ifstr(i) $(!DoCopy) == "YES"
  707. ;                Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(!STF_SRCDIR)
  708. ;                Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  709. ;                    Goto fatal
  710. ;                Else-Ifstr(i) $($R0) == STATUS_FAILED
  711. ;                    Goto fatal
  712. ;                Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  713. ;                    Goto installstep1
  714. ;                Endif
  715. ;                Set !STF_SRCDIR = $($R1)
  716. ;            Endif
  717. ;            install "Install-Option"
  718. ;            ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  719. ;              goto fatal
  720. ;            endif
  721. ;        endif
  722.         Shell $(UtilityInf), AddSoftwareComponent +
  723.                 $(Manufacturer), +
  724.             $(ProductSoftwareName), +
  725.             $(ProductSoftwareName), +
  726.             $(ProductSoftwareTitle), +
  727.             $(STF_CONTEXTINFNAME), +
  728.             $(ProductSoftwareImagePath), +
  729.             "kerneldisable", +
  730. ;            "kernelautostart", +
  731.             "NDIS", +
  732.             {"+ODI Drivers"}, +
  733.             "", +
  734.             $(NetEventDLL)
  735.         Set OEM_ABANDON_SOFTWARE = TRUE
  736.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  737.             Debug-Output "ODINSUP.INF: AddSoftwareComponent ShellCode error "$($ShellCode)
  738.             goto ShellCodeError
  739.         endif
  740.         set RegistryErrorIndex = $($R0)
  741.         set KeyProduct      = $($R1)
  742.         Set SoftNetRulesKey = $($R2)
  743.  
  744.                 Set KeyLinkage  = $($R5)
  745.                 SetRegValue $(KeyLinkage) {"OtherDependencies",$(NoTitle),$(!REG_VT_MULTI_SZ),{"+ODI Drivers"}}
  746.  
  747.         CloseRegKey $($R3)
  748.         CloseRegKey $($R4)
  749.         CloseRegKey $($R5)
  750.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  751.             EndWait
  752.             Debug-Output "ODINSUP.INF: AddSoftwareComponent Registry error "$(RegistryErrorIndex)
  753.             CloseRegKey $(KeyProduct)
  754.             CloseRegKey $(SoftNetRulesKey)
  755.             goto fatalregistry
  756.         endif
  757.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  758.                     {Hidden,$(NoTitle),$(!REG_VT_DWORD),1},+
  759.                    {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  760.                    {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  761.                    {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  762.                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  763.                    {PathName,$(NoTitle),$(!REG_VT_SZ),$(!STF_CWDDIR)},+
  764.                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  765.                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  766.         Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  767.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  768.             Debug-Output "ODINSUP.INF: AddValueList ShellCode error "$($ShellCode)
  769.             goto ShellCodeError
  770.         endif
  771.         set RegistryErrorIndex = $($R0)
  772.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  773.             EndWait
  774.             Debug-Output "ODINSUP.INF: AddValueList Registry error "$(RegistryErrorIndex)
  775.             CloseRegKey $(KeyProduct)
  776.             CloseRegKey $(SoftNetRulesKey)
  777.             goto fatalregistry
  778.         endif
  779.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  780.                     {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  781.                     {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  782.                     {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  783.                     {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  784.                     {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}, +
  785.                     {Infname ,$(NoTitle),$(!REG_VT_SZ),$(STF_CONTEXTINFNAME)} }
  786.         Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  787.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  788.             Debug-Output "ODINSUP.INF: AddValueList ShellCode error "$($ShellCode)
  789.             goto ShellCodeError
  790.         endif
  791.         set RegistryErrorIndex = $($R0)
  792.         CloseRegKey $(KeyProduct)
  793.         CloseRegKey $(SoftNetRulesKey)
  794.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  795.             EndWait
  796.             Debug-Output "ODINSUP.INF: AddValueList Registry error "$(RegistryErrorIndex)
  797.             goto fatalregistry
  798.         endif
  799.     endif
  800.  
  801.     ;  add ODINSUP at board two or later
  802.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName),"","","2"
  803.     ifint $($R4) != -1
  804.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  805.     endif
  806.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  807.         Debug-Output "ODINSUP.INF: AddHardwareComponent Shell error "$($ShellCode)
  808.         goto ShellCodeError
  809.     endif
  810.     set RegistryErrorIndex = $($R0)
  811.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  812.         EndWait
  813.         Debug-Output "ODINSUP.INF: AddHardwareComponent Registry error "$(RegistryErrorIndex)
  814.         CloseRegKey $($R1)
  815.         CloseRegKey $($R2)
  816.         CloseRegKey $($R3)
  817.         goto fatalregistry
  818.     endif
  819.     set KeyParameters = $($R3)
  820.     set KeyAdapterRules = $($R2)
  821.     set AdapterNumber = $($R4)
  822.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  823.                {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  824.                 {Hidden,$(NoTitle),$(!REG_VT_DWORD),1},+
  825.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  826.                {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  827.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  828.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  829.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  830.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  831.         Debug-Output "ODINSUP.INF: AddValueList ShellCode error "$($ShellCode)
  832.         goto ShellCodeError
  833.     endif
  834.     CloseRegKey $($R1)
  835.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  836.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  837.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  838.             {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  839.             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  840.             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}, +
  841.             {Infname ,$(NoTitle),$(!REG_VT_SZ),$(STF_CONTEXTINFNAME)}}
  842.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  843.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  844.         Debug-Output "ODINSUP.INF: AddValueList ShellCode error "$($ShellCode)
  845.         goto ShellCodeError
  846.     endif
  847.     set RegistryErrorIndex = $($R0)
  848.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  849.         EndWait
  850.         Debug-Output "ODINSUP.INF: AddValueList Registry error "$(RegistryErrorIndex)
  851.         CloseRegKey $(KeyParameters)
  852.         CloseRegKey $(KeyAdapterRules)
  853.         goto fatalregistry
  854.     endif
  855.  
  856.     CloseRegKey $(KeyAdapterRules)
  857.     goto writeparameters
  858. writeparameters = +
  859.     Shell $(UtilityInf), GetBusTypeNum
  860.     set BusTypeNum = $($R1)
  861.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  862.         Debug-Output "OEMNADNX.INF: GetBusTypeNum ShellCode error "$($ShellCode)
  863.         goto ShellCodeError
  864.     endif
  865.  
  866.     set IRQValue = *($(IRQValues), ~($(IRQList),$(IRQValueIndex)))
  867.     set IOBaseAddrValue = *($(IOBaseAddrValues), +
  868.      ~($(IOBaseAddrList),$(IOBaseAddrIndex)))
  869. ;
  870. ; BUG, BUG Need to get OdinsupBindName from the registry, if more than one
  871. ; board is in the registry need to do a dialog box and allow the user to
  872. ; select the adapter.
  873. ;
  874. ; For now use the last adapter found that's not a Token Ring adapter since
  875. ; Odinsup does not support Token Ring at this time.
  876. ;
  877.  
  878. ;    set OdiModulesName = $(!NTN_ServiceBase)"\OdiLoad\ODI_Modules"
  879. ;    OpenRegKey $(!REG_H_LOCAL) "" $(OdiModulesName) $(MAXIMUM_ALLOWED) KeyOdiModules
  880. ;    Ifstr(i) $(KeyOdiModules) == ""
  881. ;        goto fatalregistry
  882. ;    Endif
  883. ;    EnumRegKey $(KeyOdiModules) CardList
  884. ;
  885. ;    CloseRegKey $(KeyOdiModules)
  886. ;
  887. ;    set OdinsupBindName = $(Odi"ne2000"
  888. ;
  889. ;    set FoundEtherCard = 0
  890. ;
  891. ;    ForListDo $(CardList)
  892. ;        set CardName = *($($),1)
  893. ;    Split-String $(CardName) " " CardNameParts
  894. ;    set CardBaseName = *($(CardNameParts),1)
  895. ;    Ifstr(i) CardBaseName != "Token"
  896. ;       set FoundEtherCard = 1
  897. ;       set OdinsupBindName = $(CardBaseName)
  898. ;       Debug-Output "ODINSUP.INF: Bind to adapter "$(CardBaseName)
  899. ;    Endif
  900. ;    EndForListDo
  901. ;
  902. ;    Ifint $(FoundEtherCard) == 0
  903. ;        Debug-Output "ODINSUP.INF: No ethernet adapters found"
  904. ;    Debug-Output "ODINSUP.INF: Odinsup will NOT work on Token Ring"
  905. ;    Endif
  906.  
  907.     ifstr(i) $(OdiBindToAdapter) == ""
  908.         set NewValueList = {{BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  909.                         {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  910.                     {BoardInstance,$(NoTitle),$(!REG_VT_DWORD),1} }
  911.     Else
  912.         set NewValueList = {{BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  913.                         {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  914.                     {Bind,$(NoTitle),$(!REG_VT_SZ),$(OdiBindToAdapter)},+
  915.                     {BoardInstance,$(NoTitle),$(!REG_VT_DWORD),1} }
  916.     Endif
  917.  
  918.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  919.     CloseRegKey $(KeyParameters)
  920.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  921.         Debug-Output "ODINSUP.INF: AddValueList ShellCode error "$($ShellCode)
  922.         goto ShellCodeError
  923.     endif
  924.     set RegistryErrorIndex = $($R0)
  925.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  926.         Debug-Output "ODINSUP.INF: AddValueList Registry error "$(RegistryErrorIndex)
  927.         goto fatalregistry
  928.     endif
  929.     EndWait
  930.     Set DriverToLoad = $(ProductSoftwareName)
  931.     goto successful
  932. bindingadapter =+
  933.     set Error = "Binding: Sorry, not yet implemented."
  934.     goto fatal
  935. removeadapter = +
  936.     Debug-Output "ODINSUP.INF: removeadapter"
  937.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  938.             Debug-Output "ODINSUP.INF: RemoveSoftwareComponent"
  939.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  940.                 $(ProductSoftwareName)
  941.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  942.                 Debug-Output "ODINSUP.INF: RemoveSoftwareComponent ShellCode error "$($ShellCode)
  943.                 goto ShellCodeError
  944.         endif
  945.         set RegistryErrorIndex = $($R0)
  946.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  947.                 goto fatalregistry
  948.         endif
  949.     else
  950.             Debug-Output "ODINSUP.INF: RemoveHardwareComponent"
  951.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  952.             $(ProductSoftwareName), $(!NTN_RegBase)     
  953.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  954.                 Debug-Output "ODINSUP.INF: RemoveHardwareComponent ShellCode error "$($ShellCode)
  955.                 goto ShellCodeError
  956.         endif
  957.         set RegistryErrorIndex = $($R0)
  958.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  959.                 goto fatalregistry
  960.         endif
  961.     endif
  962.     goto end
  963. UpgradeSoftware = +
  964.     Debug-Output "ODINSUP.INF: UpgradeSoftware"
  965.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  966.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  967.         Ifstr $(KeyProduct) != $(KeyNull)
  968.         GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  969.         set Version = *($(VersionInfo), 4)
  970.         Split-String $(!NTN_Infname), "\", FilenameList
  971.         QueryListSize ListSize $(FilenameList)
  972.         set !UG_Filename = *($(FilenameList), $(ListSize))
  973.              install "Install-Update"
  974.              ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  975.                  goto fatal
  976.              endif
  977.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  978.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  979.         ifint $(Version) != $(ProductVersion)
  980.         endif
  981.         CloseRegKey $(KeyProduct)
  982.         else
  983.         goto fatalregistry
  984.         endif
  985.     else
  986.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  987.             $(MAXIMUM_ALLOWED) NetworkCardKey
  988.         Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  989.         GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  990.         set ServiceName = *($(ServiceNameInfo), 4)
  991.         OpenRegKey $(NetworkCardKey) "" "NetRules" +
  992.             $(MAXIMUM_ALLOWED) NetRuleKey
  993.         Ifstr(i) $(NetRuleKey) != $(KeyNull)
  994.         else
  995.         goto fatalregistry
  996.         endif
  997.         CloseRegKey $(NetRules)
  998.         CloseRegKey $(NetworkCardKey)
  999.         else
  1000.         goto fatalregistry
  1001.         endif
  1002.         OpenRegKey $(!REG_H_LOCAL) "" +
  1003.             $(!NTN_ServiceBase)"\"$(ServiceName) +
  1004.             $(MAXIMUM_ALLOWED) ServiceKey
  1005.         Ifstr(i) $(ServiceKey) != $(KeyNull)
  1006.         CloseRegKey $(ServiceKey)
  1007.         else
  1008.         goto fatalregistry
  1009.     endif
  1010.     endif
  1011.     goto end
  1012. successful = +
  1013.      Debug-Output "ODINSUP.INF: Successful; installing [InstallOption], DoCopy = "$(!DoCopy)
  1014. ;    ifstr(i) $(!NTN_Origination) == "install"
  1015. ;        Ifstr(i) $(!DoCopy) == "YES"
  1016. ;          Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(!STF_SRCDIR)
  1017. ;          Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1018. ;              Goto fatal
  1019. ;          Else-Ifstr(i) $($R0) == STATUS_FAILED
  1020. ;              Goto fatal
  1021. ;          Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  1022. ;              Goto installstep1
  1023. ;          Endif
  1024. ;          Set !STF_SRCDIR = $($R1)
  1025. ;        Endif
  1026. ;        install "Install-Option"
  1027. ;        ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1028. ;          goto fatal
  1029. ;        endif
  1030. ;    endif
  1031.     goto installstep1
  1032. installstep1 = +
  1033.     goto end
  1034. abandon = +
  1035.     Debug-Output "ODINSUP.INF: abandon"
  1036.     ForListDo $(OEM_ABANDON_OPTIONS)
  1037.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1038.         $(ProductSoftwareName), $($)     
  1039.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1040.             Debug-Output "ODINSUP.INF: RemoveHardwareComponent ShellCode error "$($ShellCode)
  1041.             goto ShellCodeError
  1042.     endif
  1043.     set RegistryErrorIndex = $($R0)
  1044.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1045.             goto fatalregistry
  1046.     endif
  1047.     EndForListDo
  1048.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  1049.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1050.             $(ProductSoftwareName), FALSE
  1051.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1052.             Debug-Output "ODINSUP.INF: RemoveSoftwareComponent ShellCode error "$($ShellCode)
  1053.             goto ShellCodeError
  1054.     endif
  1055.     set RegistryErrorIndex = $($R0)
  1056.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1057.             goto fatalregistry
  1058.     endif
  1059.     endif
  1060.     goto end
  1061. warning = +
  1062.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1063.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1064.     goto ShellCodeError
  1065.     endif
  1066.     ifstr(i) $($R1) == "OK"
  1067.     goto $(to)
  1068.     else-ifstr(i) $($R1) == "CANCEL"
  1069.     goto $(from)
  1070.     else
  1071.     goto "end"
  1072.     endif
  1073. nonfatal = +
  1074.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(Error)
  1075.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1076.     goto ShellCodeError
  1077.     endif
  1078.     ifstr(i) $($R1) == "OK"
  1079.     goto $(from)
  1080.     else
  1081.     goto "end"
  1082.     endif
  1083. fatalregistry = +
  1084.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1085.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1086.     goto ShellCodeError
  1087.     endif
  1088.     set Error = $($R0)
  1089.     goto fatal
  1090. fatal = +
  1091.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1092.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1093.     goto ShellCodeError
  1094.     endif
  1095.     goto setfailed
  1096. ShellCodeError = +
  1097.     set DlgType      = "MessageBox"
  1098.     set STF_MB_TITLE = "Error: "$(FunctionTitle)
  1099.     set STF_MB_TEXT  = "Shell Code Error"
  1100.     set STF_MB_TYPE  = 1
  1101.     set STF_MB_ICON  = 3
  1102.     set STF_MB_DEF   = 1
  1103.     ui start "Error Message"
  1104.     goto setfailed
  1105. setfailed = +
  1106.     set CommonStatus = STATUS_FAILED
  1107.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1108.         set OEM_ABANDON_ON = FALSE
  1109.     goto abandon
  1110.     endif
  1111.     goto end
  1112. end = +
  1113.     goto term
  1114. term = +
  1115.     Return $(CommonStatus) $(DriverToLoad)
  1116. [Install-Option]
  1117.     set STF_VITAL = ""
  1118.     ifstr(i) $(!AddCopy) == "YES"
  1119.     AddSectionFilesToCopyList Files-$(Option) $(!STF_SRCDIR) $(!STF_WINDOWSSYSPATH)\drivers
  1120.     endif
  1121.     ifstr(i) $(!DoCopy) == "YES"
  1122.        CopyFilesInCopyList
  1123.     endif
  1124.     ifstr(i) $(!DoConfig) == "YES"
  1125.     endif
  1126.     Exit
  1127. [Install-Update]
  1128.    Debug-Output "ODINSUP.INF: Install-Update"
  1129.    set STF_VITAL     = ""
  1130.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1131.    AddSectionFilesToCopyList Files-$(Option) $(!STF_SRCDIR) $(!STF_WINDOWSSYSPATH)\drivers
  1132.    AddSectionFilesToCopyList Files-Inf $(!STF_SRCDIR) $(!STF_WINDOWSSYSPATH)
  1133.    CopyFilesInCopyList
  1134.    exit
  1135. [Source Media Descriptions]
  1136.     1  = "Windows NT Setup Disk #1"  , TAGFILE = disk1
  1137.     2  = "Windows NT Setup CD-ROM Disk"  , TAGFILE = disk2
  1138.     3  = "NetWare for Windows NT Setup Disk",  TAGFILE = ODINSUP.SYS
  1139. [Files-Inf]
  1140. 3, ODINSUP.inf, SIZE=1000
  1141. [Files-ODINSUP]
  1142. 3, odinsup.sys,  SIZE=72192
  1143.  
  1144.  
  1145.  
  1146.