home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 January / CHIPCD1_98.iso / software / testsoft / nds / i386 / nls / english / nwsubs.in_ / nwsubs.in
Text File  |  1997-08-20  |  83KB  |  2,570 lines

  1. ;
  2. ; Novell IntranetWare for Windows NT Setup Common Shell Sections.
  3. ;
  4. ;
  5. ; ===================================================================================
  6.  
  7. ;
  8. ; The following is the version info for Novell
  9. ;
  10.  
  11. ;VeRsIoN=v4.1.0 Novell Client Install for Windows NT (970324)
  12. ;CoPyRiGhT=copyright 1992-1997, by Novell, INC. All rights reserved.
  13.  
  14. [NwBaseVars]
  15.     MAXIMUM_ALLOWED     = 33554432
  16.     KeyNull                = ""
  17.     RegistryErrorIndex = NO_ERROR
  18.     NoTitle                = 0
  19.     !RegLastError        = NO_ERROR
  20.     UtilityInf            = "UTILITY.INF"
  21.     IDH_NETWAREWRKSTATIONPARMS =    901
  22.     IDH_NETWAREIPXBIND            =    902
  23.     IDH_IPXSPXPARMS                =    903
  24.     IDH_NETWORKPROTOCOL            =    904
  25.     IDH_NETWAREODISETTINGS        =    905
  26.     IDH_NETWARECLIENTINSTALL    =    906
  27.     IDH_NETWARENDISODI            =    907
  28.     IDH_NODEADDRESSOVERIDE        =    908
  29.     IDH_RESMGRCONFIG            =    951
  30.     Help        = "&Help"
  31.     OK            = "&OK"
  32.     Continue    = "Con&tinue"
  33.     Cancel        = "&Cancel"
  34.     Advanced = "&Advanced"
  35.  
  36. [IpxVars]
  37.      IpxServiceName    = "IpxSpx"
  38.      IpxParameters    = $(!NTN_ServiceBase)"\"$(IpxServiceName)"\Parameters"
  39.      IpxCardName        = "Card Name"
  40.      IpxCardInstance = "Card Instance"
  41.      IpxNtCardInstance = "Nt Card Instance"
  42.  
  43. [OdiNSupVars]
  44.      OdiNSupServiceName    = "ODINSUP"
  45.      OdiNSupParameters    = $(!NTN_ServiceBase)"\"$(OdiNSupServiceName)"\Parameters"
  46.      OdiNSupLinkage        = $(!NTN_ServiceBase)"\"$(OdiNSupServiceName)"\Linkage"
  47.      OdiNSupCardName        = "Bind"
  48.      OdiNSupCardInstance = "BoardInstance"
  49.  
  50. [OdiVars]
  51.      DriverName     = "OdiLoad"
  52.      OdiModules     = "ODI_Modules"
  53.      OdiLinkName    = "OdiLoadName"
  54.      OdiModuleName = $(!NTN_ServiceBase)"\"$(DriverName)"\"$(OdiModules)
  55.      NetworkCardsKeyName = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards"
  56.  
  57.  
  58. ; ===================================================================================
  59. ;
  60. ;
  61. ; ===================================================================================
  62. ;
  63. ; Section to create a list of all installed ODI adapters.    Used by IpxSpx configure.
  64. ; Could also be used by ODINSUP configure.
  65. ;
  66. ; INPUT:
  67. ;     NONE
  68. ;
  69. ; OUTPUT:
  70. ;     $($R0)    List of installed ODI adapter names.
  71. ;     $($R1)    List of installed ODI adapter titles.
  72. ;     $($R2)    List of installed ODI adapter card numbers.
  73. ;     $($R3)    Number of installed ODI adapters.
  74. ;
  75. ; ===================================================================================
  76.  
  77. [GetOdiAdapterList]
  78. ;
  79. ; In this section we will create a list of installed ODI adapters.
  80. ;
  81.     read-syms NwBaseVars
  82.     read-syms OdiVars
  83.  
  84.     Set OdiCardNumList = {}
  85.     Set OdiTitleList = {}
  86.     Set OdiCardList = {}
  87.  
  88.  
  89.     OpenRegKey $(!REG_H_LOCAL) "" $(NetworkCardsKeyName) $(MAXIMUM_ALLOWED) NetCardsKey
  90.  
  91.     Ifstr(i) $(NetCardsKey) == ""
  92.         Debug-Output "NWSUBS.INF: Can't Open Registry key "$(NetworkCardsKeyName)
  93.         set CommonStatus = STATUS_USERCANCEL
  94.     Else
  95. ;
  96. ;        Get a list of all installed network cards
  97. ;
  98.         EnumRegKey $(NetCardsKey) NetCardsList
  99.  
  100.         Set NumberOdiAdapters = 0
  101.  
  102.         ForListDo $(NetCardsList)
  103.             Set CardNumber = *($($), 1)
  104.  
  105.             OpenRegKey $(NetCardsKey) "" $(CardNumber) $(MAXIMUM_ALLOWED) CardKey
  106.             Ifstr(i) $(CardKey) == ""
  107.                 Debug-Output "NWSUBS.INF: Can't open adapter "$(Card)
  108.             Else
  109.                 GetRegValue $(CardKey) "OdiAdapter" OdiValueList
  110.                 Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  111.                     set OdiAdapter = *($(OdiValueList), 4)
  112.  
  113.                     Ifstr(i) $(OdiAdapter) == "1"
  114. ;
  115. ;                        Must be an ODI Adapter so add it to our lists.
  116. ;
  117.                         set-add NumberOdiAdapters = $(NumberOdiAdapters), 1
  118.  
  119.                         GetRegValue $(CardKey) "Title" OdiTitleValues
  120.                         Set OdiTitle = *($(OdiTitleValues), 4)
  121.                         GetRegValue $(CardKey) "ProductName" OdiNameValues
  122.                         Set OdiName = *($(OdiNameValues), 4)
  123.  
  124.                         Set OdiCardNumList = >($(OdiCardNumList), $(CardNumber))
  125.                         Set OdiTitleList = >($(OdiTitleList), $(OdiTitle))
  126.                         Set OdiCardList = >($(OdiCardList), $(OdiName))
  127.                     Endif
  128.                 Endif
  129.  
  130.                 CloseRegKey $(CardKey)
  131.             Endif
  132.  
  133.         EndForListDo
  134.  
  135.         Debug-Output "NWSUBS.INF: OdiCardNumList        = "$(OdiCardNumList)
  136.         Debug-Output "NWSUBS.INF: OdiTitleList            = "$(OdiTitleList)
  137.         Debug-Output "NWSUBS.INF: OdiCardList            = "$(OdiCardList)
  138.         Debug-Output "NWSUBS.INF: NumberOdiAdapters    = "$(NumberOdiAdapters)
  139.  
  140.         CloseRegKey $(NetCardsKey)
  141.  
  142.     Endif
  143.  
  144.     return $(OdiTitleList) $(OdiCardList) $(OdiCardNumList) $(NumberOdiAdapters)
  145.  
  146. ; ===================================================================================
  147. ;
  148. ; This section creates a list of the frame types loaded by OdiLoad.
  149. ;
  150. ; ===================================================================================
  151.  
  152. ;[GetOdiLoadFrameList]
  153. ;     read-syms InitBaseVars
  154. ;
  155. ;     return
  156.  
  157.  
  158. ; ===================================================================================
  159. ; NwSetCardInstance:
  160. ;
  161. ;     INPUT:
  162. ;         $($0) - Open Key to Services\OdiLoad or "" and I'll open it (*** NOT USED ***).
  163. ;         $($1) - Open key to Services\OdiLoad\Odi_Modules or "" and I'll open it.
  164. ;         $($2) - Open key to Services\OdiLoad\Odi_Modules\ne2000 #1 or "" and I'll try
  165. ;                        to open the key $($3) under Odi_Modules, that is if $($3) is not "".
  166. ;         $($3) - The card name (ne2000 #1, etc) or "".
  167. ;                        The 'ne2000 #1' will vary based on card name and instance.
  168. ;                        If something other than "" is passed then the Card Instance assigned
  169. ;            to this OdiLoad-able Module is returned as $($R1) otherwise
  170. ;                        $($R1) will equal 1.
  171. ;
  172. ;     OUTPUT:
  173. ;         $($R0) - Result NO_ERROR if successful, otherwise an error string.
  174. ;         $($R1) - New OdiLoad Board instance for the card currently being installed
  175. ;                     or 1 if the card name passed in $($3) is "".
  176. ;
  177. ;
  178. ;
  179. ; Sets the BoardInstance for ALL installed Odi Modules.
  180. ;
  181. ; ===================================================================================
  182.  
  183. [NwSetCardInstance]
  184.     Set KeyOdiLoad         =    $($0)
  185.     Set KeyOdiModules =    $($1)
  186.     Set KeyOdiCard         =    $($2)
  187.     Set OdiCardName    =    $($3)
  188.  
  189.     read-syms NwBaseVars
  190.     read-syms OdiVars
  191.  
  192.     Set CurInstance = 1
  193. ;
  194. ; Get a list of installed Odi Modules and create a list of the base card names.
  195. ;
  196.     Set CloseOdiModules = FALSE
  197.  
  198.     Ifstr(i) $(KeyOdiModules) == ""
  199.         OpenRegKey $(!REG_H_LOCAL) "" $(OdiModuleName) $(MAXIMUM_ALLOWED) KeyOdiModules
  200.         Ifstr(i) $(KeyOdiModules) == ""
  201.             Set Result = "Can't open "$(OdiModuleName)
  202.             Debug-Output "NWSUBS.INF: SetCardInstance, "$(Result)
  203.             goto Exit_SetCardInstance
  204.         Endif
  205.         CloseOdiModules = TRUE
  206.     Endif
  207.  
  208.     EnumRegKey $(KeyOdiModules) OdiModulesList
  209.  
  210.     Set OdiList = {}
  211.     Set BaseNameList = {}
  212.  
  213.     ForListDo $(OdiModulesList)
  214.         Set CurList = $($)
  215.         Set CurModule = *($(CurList), 1)
  216.         Set OdiList = >($(OdiList), $(CurModule))
  217.         Set CloseCard = FALSE
  218.  
  219.         Split-String $(CurModule) " " NamePartList
  220.         Set NameBase = *($(NamePartList), 1)
  221.         Ifcontains(i) $(NameBase) in $(BaseNameList)
  222.             Debug-Output "NWSUBS.INF: "$(NameBase)" already in list"
  223.         Else
  224.             Set BaseNameList = >($(BaseNameList), $(NameBase))
  225.         Endif
  226.  
  227.         set-add Inst$(NameBase) = $(Inst$(NameBase)), 1
  228.  
  229.         Set KeyToCard = ""
  230.  
  231.         Ifstr(i) $(OdiCardName) != ""
  232.             Ifstr(i) $(OdiCardName) == $(CurModule)
  233.                 Set KeyToCard = $(KeyOdiCard)
  234.                  Set CurInstance = $(Inst$(NameBase))
  235.             Endif
  236.         Endif
  237.         Ifstr(i) $(KeyToCard) == ""
  238.             OpenRegKey $(KeyOdiModules) "" $(CurModule) $(MAXIMUM_ALLOWED) KeyToCard
  239.             Ifstr(i) $(KeyToCard) == ""
  240.                 Set Result = "Can't Open "$(CurModule)
  241.                 Debug-Output "NWSUBS.INF: SetCardInstance, "$(Result)
  242.                 goto Exit_SetCardInstance
  243.             Endif
  244.             Set CloseCard = TRUE
  245.         Endif
  246.  
  247.         SetRegValue $(KeyToCard) {BoardInstance,$(NoTitle),$(!REG_VT_DWORD),$(Inst$(NameBase))}
  248.  
  249.         Ifstr(i) $(CloseCard) == TRUE
  250.             CloseRegKey $(KeyToCard)
  251.         Endif
  252.  
  253.     EndForListDo
  254.  
  255.     Debug-Output "NWSUBS.INF: OdiList = "$(OdiList)
  256.     Debug-Output "NWSUBS.INF: BaseNameList = "$(BaseNameList)
  257.  
  258.     ForListDo $(BaseNameList)
  259.         set CardName = $($)
  260.         Debug-Output "NWSUBS.INF: "$(CardName)" cards found = "$(Inst$(CardName))
  261.     EndForListDo
  262.  
  263.     Set Result = NO_ERROR
  264.  
  265. Exit_SetCardInstance = +
  266.     Ifstr(i) $(CloseOdiModules) == TRUE
  267.         Debug-Output "NWSUBS.INF: Close Odi Modules"
  268.         CloseRegKey $(KeyOdiModules)
  269.     Endif
  270.  
  271.     return $(Result) $(CurInstance)
  272.  
  273.  
  274. ; ===================================================================================
  275. ; ===================================================================================
  276.  
  277. [NwSetIpxCard]
  278.     Set OdiCardName = $($0)
  279.     Set OdiCardInstance = $($1)
  280.  
  281.     Debug-Output "NwSetIpxCard: OdiCardName = "$(OdiCardName)
  282.     Debug-Output "NwSetIpxCard: OdiCardInstance = "$(OdiCardInstance)
  283.  
  284.     read-syms NwBaseVars
  285.     read-syms IpxVars
  286.     read-syms OdiVars
  287.     read-syms OdiNSupVars
  288.     read-syms InstallOption$(!STF_LANGUAGE)
  289.  
  290.     Set Result = NO_ERROR
  291.  
  292.     ; If more than one board ask the user which board to bind to.
  293.     ;
  294.     Shell $(NwSubsInf) GetOdiAdapterList
  295.  
  296.     Set OdiTitleList        = $($R0)
  297.     Set OdiCardList         = $($R1)
  298.     Set OdiNtNumberList    = $($R2)
  299.     Set NumberOdiAdapters = $($R3)
  300.  
  301.     Shell "" GetLanguageDir
  302.     Set NLSDirName = $($R0)
  303.  
  304.     Shell "" GetNTVersion
  305.     Set NTMajorVersion = $($R0)
  306.  
  307.     LoadLibrary $(LoadDisk3Text) $(!STF_WINDOWSSYSPATH)"\nwsetup.dll" NwLibHandle
  308.     SetHelpFile $(!STF_WINDOWSSYSPATH)"\nls\"$(NLSDirName)"\nt4setup.hlp" $(!MinimumID) $(!MaximumID)
  309.     ifint $(NTMajorVersion) < "4"
  310.         SetHelpFile $(!STF_WINDOWSSYSPATH)"\nls\"$(NLSDirName)"\nt3setup.hlp" $(!MinimumID) $(!MaximumID)
  311.     endif
  312.     
  313.  
  314.     Ifint $(NumberOdiAdapters) > 1
  315.         ;
  316.         ; More than one ODI adapter is installed so allow
  317.         ; the user to select which one to bind to.
  318.         ;
  319.     
  320.     
  321.         Ifstr(i) $(OdiCurBindCardName) != ""
  322.              Debug-Output "NWSUBS.INF: OdiCurBindCardName = "$(OdiCurBindCardName)
  323.              Set DefaultOdiTitle = *($(OdiTitleList), ~($(OdiCardList), $(OdiCurBindCardName)))
  324.         Endif
  325.     
  326.         Ifstr(i) $(DefaultOdiTitle) == ""
  327.              Set DefaultOdiTitle = *($(OdiTitleList), 1)
  328.         Endif
  329.     
  330.         Debug-Output "NWSUBS.INF: DefaultOdiTitle = "$(DefaultOdiTitle)
  331.     
  332.         read-syms IPXBindDlg$(!STF_LANGUAGE)
  333.         ui start "IPXBIND" $(NwLibHandle)
  334.         ui pop 1
  335.  
  336.         ifstr(i) $(DLGEVENT) == "BACK"
  337.             set AdapterSelected = ""
  338.         else
  339.             Set AdapterSelected = *($(DefaultOdiTitle), 1)
  340.         endif
  341.     
  342.         Debug-Output "NWSUBS.INF: AdapterSelected = "$(AdapterSelected)
  343.         
  344.         Ifstr(i) $(AdapterSelected) == ""
  345.             Debug-Output "NWSUBS.INF: Cancel Selected"
  346.             Set CardToBindTo = *($(OdiCardList), 1)
  347.             Set CardInstance = 1
  348.             Set NtAdapterNumber = *($(OdiNtNumberList), 1)
  349.         Else
  350.             Set CardToBindTo = *($(OdiCardList), ~($(OdiTitleList), $(AdapterSelected)))
  351.             Debug-Output "CardToBindTo = "$(CardToBindTo)
  352.     
  353.             Set NtAdapterNumber = *($(OdiNtNumberList), ~($(OdiTitleList), $(AdapterSelected)))
  354.             Debug-Output "NtAdapterNumber = "$(NtAdapterNumber)
  355.     
  356.             Set NtAdapterKeyName = $(NetworkCardsKeyName)"\"$(NtAdapterNumber)
  357.             OpenRegKey $(!REG_H_LOCAL) "" $(NtAdapterKeyName) $(MAXIMUM_ALLOWED) KeyNtAdapter
  358.             Ifstr(i) $(KeyNtAdapter) != ""
  359.     
  360.                 GetRegValue $(KeyNtAdapter),"ServiceName", ServiceNameList
  361.                 Set ServiceName = *($(ServiceNameList), 4)
  362.                 CloseRegKey $(KeyNtAdapter)
  363.         
  364.         
  365.                 ; Open the lan man card's service\Parameters.
  366.                 ;
  367.                 OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters" $(MAXIMUM_ALLOWED) KeyService
  368.                 ifstr(i) $(KeyService) == ""
  369.         
  370.                      Debug-Output "NWSUBS.INF: NwSetIpxCard, Can't open "$(ServiceName)
  371.         
  372.                 Else
  373.                     ; Get the OdiLoad link.
  374.                     ;
  375.                     GetRegValue $(KeyService) $(OdiLinkName) CardInstanceList
  376.                     Set CardInstanceName = *($(CardInstanceList), 4)
  377.                     CloseRegKey $(KeyService)
  378.             
  379.                     OpenRegKey $(!REG_H_LOCAL) "" $(OdiModuleName)"\"$(CardInstanceName) $(MAXIMUM_ALLOWED) KeyOdiCard
  380.                     Ifstr(i) $(KeyOdiCard) != ""
  381.                         GetRegValue $(KeyOdiCard) "BoardInstance" BoardInstanceList
  382.                         Set CardInstance = *($(BoardInstanceList), 4)
  383.                         Debug-Output "1: Selected CardInstance = "$(CardInstance)
  384.                         CloseRegKey $(KeyOdiCard)
  385.                     Endif
  386.                 Endif
  387.             Else
  388.                 Debug-Output "Can't open "$(NtAdapterKeyName)
  389.             Endif
  390.         Endif
  391.     Else
  392.         Set CardToBindTo = *($(OdiCardList), 1)
  393.         Set CardInstance = 1
  394.         Set NtAdapterNumber = *($(OdiNtNumberList), 1)
  395.     Endif
  396.  
  397.     OpenRegKey $(!REG_H_LOCAL) "" $(IpxParameters) $(MAXIMUM_ALLOWED) KeyIpxParameters
  398.     Ifstr(i) $(KeyIpxParameters) == ""
  399.           Set Result = "Can't open IpxSpx service."
  400.           Debug-Output "NWSUBS.INF: "$(Result)
  401.     Else
  402.         GetRegValue $(KeyIpxParameters) $(IpxCardName) CurrentCardNameList
  403.         Set CurrentCardName = *($(CurrentCardNameList), 4)
  404.         Debug-Output "CurrentCardName = "$(CurrentCardName)" CardToBindTo = "$(CardToBindTo)
  405.  
  406.         Set GUIResult = ""
  407.  
  408.         Ifstr(i) $(CurrentCardName) != $(CardToBindTo)
  409.             Shell "" NwSetFrameType $(CardToBindTo) $(NtAdapterNumber) $(NwLibHandle)
  410.  
  411.             Set GUIResult = $($R0)
  412.         Endif
  413.  
  414.           SetRegValue $(KeyIpxParameters) {$(IpxCardName),$(NoTitle),$(!REG_VT_SZ),$(CardToBindTo)}
  415.         Ifstr(i) $(OdiCardInstance) == ""
  416.             Debug-Output "NWSUBS.INF: NwSetIpxCard, OdiCardInstance set to default."
  417.             Set OdiCardInstance = "1"
  418.         Endif
  419.  
  420.         SetRegValue $(KeyIpxParameters) {$(IpxCardInstance),$(NoTitle),$(!REG_VT_DWORD),$(OdiCardInstance)}
  421.         Debug-Output "2: NtAdapterNumber = "$(NtAdapterNumber)
  422.         SetRegValue $(KeyIpxParameters) {$(IpxNtCardInstance),$(NoTitle),$(!REG_VT_SZ),$(NtAdapterNumber)}
  423.         Ifstr(i) $(GUIResult) != ""
  424.             SetRegValue $(KeyIpxParameters) {"Frame Type",$(NoTitle),$(!REG_VT_SZ),$(GUIResult)}
  425.         Endif
  426.  
  427.         CloseRegKey $(KeyIpxParameters)
  428.     Endif
  429.  
  430.     ; Find the ODINSUPXX service name
  431.     ;
  432.  
  433.     OpenRegKey $(!REG_H_LOCAL) "" $(NetworkCardsKeyName) $(MAXIMUM_ALLOWED) NetCardsKey
  434.  
  435.     Ifstr(i) $(NetCardsKey) != ""
  436.         EnumRegKey $(NetCardsKey) NetCardsList
  437.         Debug-Output "NetCardsList = "$(NetCardsList)
  438.         ForListDo $(NetCardsList)
  439.             Set CardNumber = *($($), 1)
  440.             Debug-Output "CardNumber = "$(CardNumber)
  441.             OpenRegKey $(NetCardsKey) "" $(CardNumber) $(MAXIMUM_ALLOWED) KeyCardNumber
  442.             Ifstr(i) $(KeyCardNumber) != ""
  443.                 GetRegValue $(KeyCardNumber), "ProductName", ProductNameList
  444.                 Set ProductName = *($(ProductNameList), 4)
  445.                 Debug-Output "ProductName = "$(ProductName)
  446.                 Ifstr(i) $(ProductName) == "ODINSUP"
  447.                     GetRegValue $(KeyCardNumber), "ServiceName", ServiceNameList
  448.                     Set ServiceName = *($(ServiceNameList), 4)
  449.                     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters" $(MAXIMUM_ALLOWED) KeyOdiNSupParameters
  450.                 Endif
  451.                 CloseRegKey $(KeyCardNumber)
  452.             Endif
  453.         EndForListDo
  454.         CloseRegKey $(NetCardsKey)
  455.     Endif
  456.  
  457.  
  458. ;    OpenRegKey $(!REG_H_LOCAL) "" $(OdiNSupParameters) $(MAXIMUM_ALLOWED) KeyOdiNSupParameters
  459.  
  460.     Ifstr(i) $(KeyOdiNSupParameters) != ""
  461.  
  462.         Ifint $(NumberOdiAdapters) > 1
  463.             ;
  464.             ; More than one ODI adapter is installed so allow
  465.             ; the user to select which one to bind to.
  466.             ;
  467.     
  468.     
  469.             Ifstr(i) $(OdiCurBindCardName) != ""
  470.                 Debug-Output "NWSUBS.INF: OdiCurBindCardName = "$(OdiCurBindCardName)
  471.                 Set DefaultOdiTitle = *($(OdiTitleList), ~($(OdiCardList), $(OdiCurBindCardName)))
  472.             Endif
  473.     
  474.             Ifstr(i) $(DefaultOdiTitle) == ""
  475.                 Set DefaultOdiTitle = *($(OdiTitleList), 1)
  476.             Endif
  477.     
  478.             Debug-Output "NWSUBS.INF: DefaultOdiTitle = "$(DefaultOdiTitle)
  479.  
  480.             read-syms OdinsupDlg$(!STF_LANGUAGE)
  481.             ui start "ODINSUP" $(NwLibHandle)
  482.             ui pop 1
  483.     
  484.             ifstr(i) $(DLGEVENT) == "BACK"
  485.                 set AdapterSelected = ""
  486.             else
  487.                 Set AdapterSelected = *($(DefaultOdiTitle), 1)
  488.             endif
  489.  
  490.             Debug-Output "NWSUBS.INF: ODINSUP AdapterSelected = "$(AdapterSelected)
  491.  
  492.             Ifstr(i) $(AdapterSelected) == ""
  493.                 Debug-Output "NWSUBS.INF: Cancel Selected"
  494.                 Set CardToBindTo = *($(OdiCardList), 1)
  495.                 Set CardInstance = 1
  496.             Else
  497.                 Set CardToBindTo = *($(OdiCardList), ~($(OdiTitleList), $(AdapterSelected)))
  498.                 Debug-Output "CardToBindTo = "$(CardToBindTo)
  499.     
  500.                 Set NtAdapterNumber = *($(OdiNtNumberList), ~($(OdiTitleList), $(AdapterSelected)))
  501.                 Debug-Output "NtAdapterNumber = "$(NtAdapterNumber)
  502.     
  503.                 Set NtAdapterKeyName = $(NetworkCardsKeyName)"\"$(NtAdapterNumber)
  504.                 OpenRegKey $(!REG_H_LOCAL) "" $(NtAdapterKeyName) $(MAXIMUM_ALLOWED) KeyNtAdapter
  505.                 Ifstr(i) $(KeyNtAdapter) != ""
  506.     
  507.                     GetRegValue $(KeyNtAdapter),"ServiceName", ServiceNameList
  508.                     Set ServiceName = *($(ServiceNameList), 4)
  509.                     CloseRegKey $(KeyNtAdapter)
  510.     
  511.     
  512.                     ; Open the lan man card's service\Parameters.
  513.                     ;
  514.                     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters" $(MAXIMUM_ALLOWED) KeyService
  515.                     ifstr(i) $(KeyService) == ""
  516.     
  517.                         Debug-Output "NWSUBS.INF: NwSetIpxCard, Can't open "$(ServiceName)
  518.     
  519.                     Else
  520.                         ; Get the OdiLoad link.
  521.                         ;
  522.                         GetRegValue $(KeyService) $(OdiLinkName) CardInstanceList
  523.                         Set CardInstanceName = *($(CardInstanceList), 4)
  524.                         CloseRegKey $(KeyService)
  525.         
  526.                         OpenRegKey $(!REG_H_LOCAL) "" $(OdiModuleName)"\"$(CardInstanceName) $(MAXIMUM_ALLOWED) KeyOdiCard
  527.                         Ifstr(i) $(KeyOdiCard) != ""
  528.                             GetRegValue $(KeyOdiCard) "BoardInstance" BoardInstanceList
  529.                             Set CardInstance = *($(BoardInstanceList), 4)
  530.                             Debug-Output "2: Selected CardInstance = "$(CardInstance)
  531.                             CloseRegKey $(KeyOdiCard)
  532.                         Endif
  533.                     Endif
  534.                 Else
  535.                     Debug-Output "Can't open "$(NtAdapterKeyName)
  536.                 Endif
  537.             Endif
  538.         Else
  539.             ;
  540.             ; only one ODI adapter so use same card name as ipx.
  541.             ;
  542.             Debug-Output "NWSUBS.INF: ODISUP bound to "$(CardToBindTo)
  543.         Endif
  544.  
  545.  
  546.         SetRegValue $(KeyOdiNSupParameters) {$(OdiNSupCardName),$(NoTitle),$(!REG_VT_SZ),$(CardToBindTo)}
  547.         Ifstr(i) $(OdiCardInstance) == ""
  548.             Debug-Output "NWSUBS.INF: NwSetIpxCard, OdiCardInstance set to default."
  549.             Set OdiCardInstance = "1"
  550.         Endif
  551.         SetRegValue $(KeyOdiNSupParameters) {$(OdiNSupCardInstance),$(NoTitle),$(!REG_VT_DWORD),$(OdiCardInstance)}
  552.  
  553.         CloseRegKey $(KeyOdiNSupParameters)
  554.     Endif
  555.  
  556.     FreeLibrary $(NwLibHandle)
  557.  
  558.  
  559.     return $(Result)
  560.  
  561.  
  562. ; ===================================================================================
  563. ;
  564. ; Remove an installed NetWare ODI Adapter.
  565. ;
  566. ; We start with the SOFTWARE\Windows NT\NetworkCards\## key name.    Open this key and
  567. ; get the 'ServiceName' link value, use this string to open the service\Parameters key
  568. ; for this adapter.    Get the OdiLoadName link value from service\Parameters and open
  569. ; this key.
  570. ;
  571. ; ===================================================================================
  572.  
  573. [NwRemoveAdapter]
  574.      Set LanManCardInstance = $($0)
  575.  
  576.      read-syms NwBaseVars
  577.      read-syms IpxVars
  578.      read-syms OdiVars
  579.      read-syms OdiNSupVars
  580.     read-syms InstallOption$(!STF_LANGUAGE)
  581.  
  582.      Set Result = NO_ERROR
  583.  
  584.      Debug-Output "NWSUBS.INF: ------------------------------------------------------"
  585.      Debug-Output "NWSUBS.INF: NwRemoveAdapter called with "$(LanManCardInstance)
  586.  
  587. ;    Open the lan man card.
  588. ;
  589.      OpenRegKey $(!REG_H_LOCAL) "" $(LanManCardInstance) $(MAXIMUM_ALLOWED) KeyLanManCard
  590.      Ifstr(i) $(KeyLanManCard) == ""
  591.  
  592.             Debug-Output "NWSUBS.INF: RemoveAdapter, Can't open "$(LanManCardInstance)
  593.  
  594.      Else
  595.  
  596. ;    Clear the OdiAdapter Flag so that this adapter does not show up on the
  597. ;         list of Odi adapters for Ipx to bind too.
  598. ;
  599.     SetRegValue $(KeyLanManCard) {OdiAdapter,$(NoTitle),$(!REG_VT_DWORD),0}
  600.  
  601. ;         Get the lanman cards service name link.
  602. ;
  603.             GetRegValue $(KeyLanManCard),"ServiceName", ServiceNameList
  604.             Set ServiceName = *($(ServiceNameList), 4)
  605.             CloseRegKey $(KeyLanManCard)
  606.  
  607.  
  608. ;         Open the lan man card's service\Parameters.
  609. ;
  610.             OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters" $(MAXIMUM_ALLOWED) KeyService
  611.     ifstr(i) $(KeyService) == ""
  612.  
  613.          Debug-Output "NWSUBS.INF: RemoveAdapter, Can't open "$(ServiceName)
  614.  
  615.     Else
  616. ;                Get the OdiLoad link.
  617. ;
  618.          GetRegValue $(KeyService) $(OdiLinkName) CardInstanceList
  619.          Set CardInstanceName = *($(CardInstanceList), 4)
  620.          CloseRegKey $(KeyService)
  621.     
  622.          OpenRegKey $(!REG_H_LOCAL) "" $(OdiModuleName) $(MAXIMUM_ALLOWED) KeyOdiModules
  623.          Ifstr(i) $(KeyOdiModules) == ""
  624.     
  625.         Debug-Output "NWSUBS.INF: RemoveAdapter, Can't open "$(OdiModulesName)
  626.     
  627.          Else
  628. ;
  629. ;                    Get the Board instance for the card being deleted before we delete it.
  630. ;
  631.  
  632.         OpenRegKey $(KeyOdiModules) "" $(CardInstanceName) $(MAXIMUM_ALLOWED) KeyOdiCard
  633.         Ifstr(i) $(KeyOdiCard) == ""
  634.              Set Result = "Can't open card "$(CardInstanceName)
  635.              Debug-Output "NWSUBS.INF: NwRemoveAdapter, "$(Result)
  636.         Else
  637.              GetRegValue $(KeyOdiCard) "BoardInstance" InstanceValues
  638.              Set DeletedCardInstance = *($(InstanceValues), 4)
  639.              Debug-Output "NWSUBS.INF: Board Instance of Card being Removed = "$(DeletedCardInstance)
  640.              CloseRegKey $(KeyOdiCard)
  641.         Endif
  642. ;
  643. ; Delete the card from ODI Modules.
  644. ;
  645.         Debug-Output "NWSUBS.INF: Deleting card "$(CardInstanceName)
  646.         Debug-Output "NWSUBS.INF: From Key "$(OdiModuleName)
  647.  
  648.         DeleteRegTree $(KeyOdiModules) $(CardInstanceName)
  649.     
  650.         FlushRegKey $(KeyOdiModules)
  651.  
  652.         Shell "" NwSetCardInstance "" $(KeyOdiModules) "" ""
  653.  
  654.  
  655. ;        Check IpxSpx parameters to see if IpxSpx is bound to the
  656. ;                    adapter just removed or to a greater instance of this model of adapter.
  657. ;
  658.         OpenRegKey $(!REG_H_LOCAL) "" $(IpxParameters) $(MAXIMUM_ALLOWED) KeyIpxParameters
  659.         Ifstr(i) $(KeyIpxParameters) == ""
  660.              Debug-Output "NWSUBS.INF: NwRemoveAdapter, Can't open "$(IpxParameters)
  661.         Else
  662. ;                         Get Ipx CardName and CardInstance
  663. ;
  664.              GetRegValue $(KeyIpxParameters) $(IpxCardName) TmpCardList
  665.              Set CurIpxCardName = *($(TmpCardList), 4)
  666.  
  667.              GetRegValue $(KeyIpxParameters) $(IpxCardInstance) TmpInstanceList
  668.              Set CurIpxCardInstance = *($(TmpInstanceList), 4)
  669.  
  670.              GetRegValue $(KeyIpxParameters) $(IpxNtCardInstance) TmpNtInstanceList
  671.              Set NtAdapterNumber = *($(TmpNtInstanceList), 4)
  672.  
  673.              Debug-Output "NWSUBS.INF: CurIpxCardName        -- "$(CurIpxCardName)
  674.              Debug-Output "                CurIpxCardInstance -- "$(CurIpxCardInstance)
  675.              Debug-Output "                NtAdapterNumber     -- "$(NtAdapterNumber)
  676.  
  677. ;                         Get the base name of the ODI Module being removed.
  678. ;
  679.              Split-String $(CardInstanceName) " " CardInstanceValues
  680.              Set CardBaseName = *($(CardInstanceValues), 1)
  681.              Debug-Output "NWSUBS.INF: CardBaseName = "$(CardBaseName)
  682.  
  683.              Ifstr(i) $(CardBaseName) == $(CurIpxCardName)
  684.                     Debug-Output "NWSUBS.INF: Ipx bound to a card with the same name: "$(CardBaseName)
  685.  
  686.             Ifint $(DeletedCardInstance) < $(CurIpxCardInstance)
  687.                  Debug-Output "NWSUBS.INF: Existing Board Instance Okay"
  688.             Else-Ifint $(DeletedCardInstance) == $(CurIpxCardInstance)
  689.                  Debug-Output "NWSUBS.INF: The board Ipx was bound to has been removed."
  690.                                 Shell $(NwSubsInf) GetOdiAdapterList
  691.  
  692.                                      Set OdiTitleList        = $($R0)
  693.                                 Set OdiCardList         = $($R1)
  694.                  Set OdiNtNumberList    = $($R2)
  695.                  Set NumberOdiAdapters = $($R3)
  696.  
  697.                                 Debug-Output "NWSUBS.INF: OdiTitleList = "$(OdiTitleList)
  698.                                 Debug-Output "NWSUBS.INF: OdiCardList    = "$(OdiCardList)
  699.                                      Debug-Output "NWSUBS.INF: R2                = "$($R2)
  700.                                      Debug-Output "NWSUBS.INF: NumberOdiAdapters = "$(NumberOdiAdapters)
  701.  
  702.                  Set ReBind = FALSE
  703.  
  704.                         Shell "" GetLanguageDir
  705.                         Set NLSDirName = $($R0)
  706.             
  707.                         Shell "" GetNTVersion
  708.                         Set NTMajorVersion = $($R0)
  709.  
  710.                         LoadLibrary $(LoadDisk3Text) $(!STF_WINDOWSSYSPATH)"\nwsetup.dll" NwLibHandle
  711.                         SetHelpFile $(!STF_WINDOWSSYSPATH)"\nls\"$(NLSDirName)"\nt4setup.hlp" $(!MinimumID) $(!MaximumID)
  712.                         ifint $(NTMajorVersion) < "4"
  713.                             SetHelpFile $(!STF_WINDOWSSYSPATH)"\nls\"$(NLSDirName)"\nt3setup.hlp" $(!MinimumID) $(!MaximumID)
  714.                         endif
  715.  
  716.                   Ifint $(NumberOdiAdapters) < 1
  717.                         Debug-Output "NWSUBS.INF: No ODI Adapters Installed."
  718.                  Else-Ifint $(NumberOdiAdapters) == 1
  719.                         Set CardToBindTo = *($(OdiCardList), 1)
  720.                         Set CardInstance = 1
  721.                                     Set NtAdapterNumber = *($(OdiNtNumberList), 1)
  722.                         Debug-Output "NWSUBS.INF: Only one ODI Adapter Installed "$(CardToBindTo)
  723.                 Set ReBind = TRUE;
  724.                 Else
  725.                         ;
  726.                         ; More than one ODI adapter is installed so allow
  727.                         ; the user to select which one to bind to.
  728.                         ;
  729.  
  730.  
  731.                         Ifstr(i) $(OdiCurBindCardName) != ""
  732.                             Debug-Output "NWSUBS.INF: OdiCurBindCardName = "$(OdiCurBindCardName)
  733.                             Set DefaultOdiTitle = *($(OdiTitleList), ~($(OdiCardList), $(OdiCurBindCardName)))
  734.                         Endif
  735.             
  736.                         Ifstr(i) $(DefaultOdiTitle) == ""
  737.                             Set DefaultOdiTitle = *($(OdiTitleList), 1)
  738.                         Endif
  739.             
  740.                         Debug-Output "NWSUBS.INF: DefaultOdiTitle = "$(DefaultOdiTitle)
  741.  
  742.                   read-syms IPXBindDlg$(!STF_LANGUAGE)
  743.                         ui start "IPXBIND" $(NwLibHandle)
  744.                         ui pop 1
  745.  
  746.                         ifstr(i) $(DLGEVENT) == "BACK"
  747.                             set AdapterSelected = ""
  748.                         else
  749.                             Set AdapterSelected = *($(DefaultOdiTitle), 1)
  750.                         endif
  751.  
  752.                         Debug-Output "NWSUBS.INF: AdapterSelected = "$(AdapterSelected)
  753.                         Ifstr(i) $(AdapterSelected) == ""
  754.                             Debug-Output "NWSUBS.INF: Cancel Selected"
  755.                             Set CardToBindTo = *($(OdiCardList), 1)
  756.                             Set CardInstance = 1
  757.                             Set NtAdapterNumber = *($(OdiNtNumberList), 1)
  758.                         Else
  759.                             Set CardToBindTo = *($(OdiCardList), ~($(OdiTitleList), $(AdapterSelected)))
  760.                             Debug-Output "CardToBindTo = "$(CardToBindTo)
  761.  
  762.                             Set NtAdapterNumber = *($(OdiNtNumberList), ~($(OdiTitleList), $(AdapterSelected)))
  763.                             Debug-Output "NtAdapterNumber = "$(NtAdapterNumber)
  764.  
  765.                             Set NtAdapterKeyName = $(NetworkCardsKeyName)"\"$(NtAdapterNumber)
  766.                             OpenRegKey $(!REG_H_LOCAL) "" $(NtAdapterKeyName) $(MAXIMUM_ALLOWED) KeyNtAdapter
  767.                             Ifstr(i) $(KeyNtAdapter) != ""
  768.  
  769.                                 GetRegValue $(KeyNtAdapter),"ServiceName", ServiceNameList
  770.                                 Set ServiceName = *($(ServiceNameList), 4)
  771.                                 CloseRegKey $(KeyNtAdapter)
  772.             
  773.                                  ; Open the lan man card's service\Parameters.
  774.                                  ;
  775.                                 OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters" $(MAXIMUM_ALLOWED) KeyService
  776.                                 ifstr(i) $(KeyService) == ""
  777.             
  778.                                     Debug-Output "NWSUBS.INF: RemoveAdapter, Can't open "$(ServiceName)
  779.                                 Else
  780.                                         ; Get the OdiLoad link.
  781.                                         ;
  782.                                     GetRegValue $(KeyService) $(OdiLinkName) CardInstanceList
  783.                                     Set TmpCardInstanceName = *($(CardInstanceList), 4)
  784.                                     CloseRegKey $(KeyService)
  785.                 
  786.                                     OpenRegKey $(!REG_H_LOCAL) "" $(OdiModuleName)"\"$(TmpCardInstanceName) $(MAXIMUM_ALLOWED) KeyOdiCard
  787.                                     Ifstr(i) $(KeyOdiCard) != ""
  788.                                         GetRegValue $(KeyOdiCard) "BoardInstance" BoardInstanceList
  789.                                         Set CardInstance = *($(BoardInstanceList), 4)
  790.                                         Debug-Output "Selected CardInstance = "$(CardInstance)
  791.                                         CloseRegKey $(KeyOdiCard)
  792.                                     Endif
  793.                                 Endif
  794.                             Else
  795.                                 Debug-Output "Can't open "$(NtAdapterKeyName)
  796.                             Endif
  797.                         Endif
  798.             
  799.                 Set ReBind = TRUE
  800.                 Endif
  801.                  Ifstr(i) $(ReBind) == TRUE
  802.                         SetRegValue $(KeyIpxParameters) {$(IpxCardInstance),$(NoTitle),$(!REG_VT_DWORD),$(CardInstance)}
  803.                                 SetRegValue $(KeyIpxParameters) {$(IpxCardName),$(NoTitle),$(!REG_VT_SZ),$(CardToBindTo)}
  804.                 SetRegValue $(KeyIpxParameters) {$(IpxNtCardInstance),$(NoTitle),$(!REG_VT_SZ),$(NtAdapterNumber)}
  805.                 Shell "" NwSetFrameType $(CardToBindTo) $(NtAdapterNumber) $(NwLibHandle)
  806.  
  807.                 Set GUIResult = $($R0)
  808.                 Ifstr(i) $(GUIResult) != ""
  809.                                          SetRegValue $(KeyIpxParameters) {"FrameType",$(NoTitle),$(!REG_VT_SZ),$(GUIResult)}
  810.                 Endif
  811.                  Endif
  812.  
  813.                         FreeLibrary $(NwLibHandle)
  814.  
  815.                     Else
  816.                         Set-sub CardInstance = $(DeletedCardInstance), 1
  817.                         Debug-Output "NWSUBS.INF: Need to change board instance "$(CardInstance)
  818.                         SetRegValue $(KeyIpxParameters) {$(IpxCardInstance),$(NoTitle),$(!REG_VT_DWORD),$(CardInstance)}
  819.                 SetRegValue $(KeyIpxParameters) {$(IpxNtCardInstance),$(NoTitle),$(!REG_VT_SZ),$(NtAdapterNumber)}
  820.                     Endif
  821.  
  822.              Else
  823.                     Debug-Output "NWSUBS.INF: Ipx NOT bound to a card with this name : "$(CardBaseName)
  824.              Endif
  825.  
  826.  
  827.              CloseRegKey $(KeyIpxParameters)
  828.         Endif
  829.     
  830.                      ; Find the ODINSUPXX service name
  831.                      ;
  832.  
  833.                      OpenRegKey $(!REG_H_LOCAL) "" $(NetworkCardsKeyName) $(MAXIMUM_ALLOWED) NetCardsKey
  834.  
  835.                      Ifstr(i) $(NetCardsKey) != ""
  836.                          EnumRegKey $(NetCardsKey) NetCardsList
  837.                          Debug-Output "NetCardsList = "$(NetCardsList)
  838.                          ForListDo $(NetCardsList)
  839.                                 Set CardNumber = *($($), 1)
  840.                                 Debug-Output "CardNumber = "$(CardNumber)
  841.                                 OpenRegKey $(NetCardsKey) "" $(CardNumber) $(MAXIMUM_ALLOWED) KeyCardNumber
  842.                                 Ifstr(i) $(KeyCardNumber) != ""
  843.                              GetRegValue $(KeyCardNumber), "ProductName", ProductNameList
  844.                              Set ProductName = *($(ProductNameList), 4)
  845.                              Debug-Output "ProductName = "$(ProductName)
  846.                              Ifstr(i) $(ProductName) == "ODINSUP"
  847.                                     GetRegValue $(KeyCardNumber), "ServiceName", ServiceNameList
  848.                                     Set ServiceName = *($(ServiceNameList), 4)
  849.                                     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters" $(MAXIMUM_ALLOWED) KeyOdiNSupParameters
  850.                              Endif
  851.                  CloseRegKey $(KeyCardNumber)
  852.                                 Endif
  853.                          EndForListDo
  854.              CloseRegKey $(NetCardsKey)
  855.                      Endif
  856.         ;
  857.         ; Check to see if ODINSUP was bound too this card.
  858.         ;
  859. ;                     OpenRegKey $(!REG_H_LOCAL) "" $(OdiNSupParameters) $(MAXIMUM_ALLOWED) KeyOdiNSupParameters
  860.  
  861.         Ifstr(i) $(KeyOdiNSupParameters) != ""
  862.              GetRegValue $(KeyOdiNSupParameters) $(OdiNSupCardName) TmpCardList
  863.              Set CurOdiNSupCardName = *($(TmpCardList), 4)
  864.              Debug-Output "NWSUBS.INF: CurOdiNSupCardName = "$(CurOdiNSupCardName)
  865.  
  866.              GetRegValue $(KeyOdiNSupParameters) $(OdiNSupCardInstance) TmpInstanceList
  867.              Set CurOdiNSupCardInstance = *($(TmpInstanceList), 4)
  868.              Debug-Output "NWSUBS.INF: CurOdiNSupCardInstance = "$(CurOdiNSupCardInstance)
  869.  
  870.  
  871. ;                         Get the base name of the ODI Module being removed.
  872. ;
  873.              Split-String $(CardInstanceName) " " CardInstanceValues
  874.              Set CardBaseName = *($(CardInstanceValues), 1)
  875.              Debug-Output "NWSUBS.INF: CardBaseName = "$(CardBaseName)
  876.  
  877.              Ifstr(i) $(CardBaseName) == $(CurOdiNSupCardName)
  878.                     Debug-Output "NWSUBS.INF: ODINSUP bound to a card with the same name: "$(CardBaseName)
  879.  
  880.             Ifint $(DeletedCardInstance) < $(CurOdiNSupCardInstance)
  881.                  Debug-Output "NWSUBS.INF: Existing Board Instance Okay"
  882.             Else-Ifint $(DeletedCardInstance) == $(CurOdiNSupCardInstance)
  883.                  Debug-Output "NWSUBS.INF: The board ODINSUP was bound to has been removed."
  884.                                 Shell $(NwSubsInf) GetOdiAdapterList
  885.  
  886.                                      Set OdiTitleList        = $($R0)
  887.                                 Set OdiCardList         = $($R1)
  888.                  Set OdiNtNumberList    = $($R2)
  889.                  Set NumberOdiAdapters = $($R3)
  890.  
  891.                                 Debug-Output "NWSUBS.INF: OdiTitleList = "$(OdiTitleList)
  892.                                 Debug-Output "NWSUBS.INF: OdiCardList    = "$(OdiCardList)
  893.                                      Debug-Output "NWSUBS.INF: R2                = "$($R2)
  894.                                      Debug-Output "NWSUBS.INF: NumberOdiAdapters = "$(NumberOdiAdapters)
  895.  
  896.                  Set CardInstance = $(DeletedCardInstance)
  897.  
  898.                  Set ReBind = FALSE
  899.  
  900.                   Ifint $(NumberOdiAdapters) < 1
  901.                         Debug-Output "NWSUBS.INF: No ODI Adapters Installed."
  902.                  Else-Ifint $(NumberOdiAdapters) == 1
  903.                         Set CardToBindTo = *($(OdiCardList), 1)
  904.                         Set CardInstance = 1
  905.                         Debug-Output "NWSUBS.INF: Only one ODI Adapter Installed "$(CardToBindTo)
  906.                 Set ReBind = TRUE;
  907.                  Else
  908.                         ;
  909.                         ; More than one ODI adapter is installed so allow
  910.                         ; the user to select which one to bind to.
  911.                         ;
  912.                     
  913.                         Shell "" GetLanguageDir
  914.                         Set NLSDirName = $($R0)
  915.  
  916.                         Shell "" GetNTVersion
  917.                         Set NTMajorVersion = $($R0)
  918.  
  919.                         LoadLibrary $(LoadDisk3Text) $(!STF_WINDOWSSYSPATH)"\nwsetup.dll" NwLibHandle
  920.                         SetHelpFile $(!STF_WINDOWSSYSPATH)"\nls\"$(NLSDirName)"\nt4setup.hlp" $(!MinimumID) $(!MaximumID)
  921.                         ifint $(NTMajorVersion) < "4"
  922.                             SetHelpFile $(!STF_WINDOWSSYSPATH)"\nls\"$(NLSDirName)"\nt3setup.hlp" $(!MinimumID) $(!MaximumID)
  923.                         endif
  924.             
  925.                         Ifstr(i) $(OdiCurBindCardName) != ""
  926.                             Debug-Output "NWSUBS.INF: OdiCurBindCardName = "$(OdiCurBindCardName)
  927.                             Set DefaultOdiTitle = *($(OdiTitleList), ~($(OdiCardList), $(OdiCurBindCardName)))
  928.                         Endif
  929.             
  930.                         Ifstr(i) $(DefaultOdiTitle) == ""
  931.                             Set DefaultOdiTitle = *($(OdiTitleList), 1)
  932.                         Endif
  933.             
  934.                         Debug-Output "NWSUBS.INF: DefaultOdiTitle = "$(DefaultOdiTitle)
  935.             
  936.                         read-syms OdinsupDlg$(!STF_LANGUAGE)
  937.                         ui start "ODINSUP" $(NwLibHandle)
  938.                         ui pop 1
  939.     
  940.                         ifstr(i) $(DLGEVENT) == "BACK"
  941.                             set AdapterSelected = ""
  942.                         else
  943.                             Set AdapterSelected = *($(DefaultOdiTitle), 1)
  944.                         endif
  945.  
  946.                         Debug-Output "NWSUBS.INF: AdapterSelected = "$(AdapterSelected)
  947.  
  948.                         Ifstr(i) $(AdapterSelected) == ""
  949.                             Debug-Output "NWSUBS.INF: Cancel Selected"
  950.                             Set CardToBindTo = *($(OdiCardList), 1)
  951.                             Set CardInstance = 1
  952.                         Else
  953.                             Set CardToBindTo = *($(OdiCardList), ~($(OdiTitleList), $(AdapterSelected)))
  954.                             Debug-Output "CardToBindTo = "$(CardToBindTo)
  955.  
  956.                             Set NtAdapterNumber = *($(OdiNtNumberList), ~($(OdiTitleList), $(AdapterSelected)))
  957.                             Debug-Output "NtAdapterNumber = "$(NtAdapterNumber)
  958.  
  959.                             Set NtAdapterKeyName = $(NetworkCardsKeyName)"\"$(NtAdapterNumber)
  960.                             OpenRegKey $(!REG_H_LOCAL) "" $(NtAdapterKeyName) $(MAXIMUM_ALLOWED) KeyNtAdapter
  961.                             Ifstr(i) $(KeyNtAdapter) != ""
  962.  
  963.                                 GetRegValue $(KeyNtAdapter),"ServiceName", ServiceNameList
  964.                                 Set ServiceName = *($(ServiceNameList), 4)
  965.                                 CloseRegKey $(KeyNtAdapter)
  966.                                  ; Open the lan man card's service\Parameters.
  967.                                  ;
  968.                             OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters" $(MAXIMUM_ALLOWED) KeyService
  969.                             ifstr(i) $(KeyService) == ""
  970.             
  971.                                 Debug-Output "NWSUBS.INF: RemoveAdapter, Can't open "$(ServiceName)
  972.             
  973.                             Else
  974.                                         ; Get the OdiLoad link.
  975.                                         ;
  976.                                 GetRegValue $(KeyService) $(OdiLinkName) CardInstanceList
  977.                                 Set TmpCardInstanceName = *($(CardInstanceList), 4)
  978.                                 CloseRegKey $(KeyService)
  979.                 
  980.                                 OpenRegKey $(!REG_H_LOCAL) "" $(OdiModuleName)"\"$(TmpCardInstanceName) $(MAXIMUM_ALLOWED) KeyOdiCard
  981.                          Ifstr(i) $(KeyOdiCard) != ""
  982.                                 GetRegValue $(KeyOdiCard) "BoardInstance" BoardInstanceList
  983.                         Set CardInstance = *($(BoardInstanceList), 4)
  984.                         Debug-Output "Selected CardInstance = "$(CardInstance)
  985.                                 CloseRegKey $(KeyOdiCard)
  986.                          Endif
  987.  
  988.  
  989.                             Endif
  990.                      Else
  991.                             Debug-Output "Can't open "$(NtAdapterKeyName)
  992.                      Endif
  993.  
  994.                 Endif
  995.             
  996.                         FreeLibrary $(NwLibHandle)
  997.  
  998.                 Set ReBind = TRUE
  999.                  Endif
  1000.  
  1001.                  Ifstr(i) $(ReBind) == TRUE
  1002.                                     SetRegValue $(KeyOdiNSupParameters) {$(OdiNSupCardInstance),$(NoTitle),$(!REG_VT_DWORD),$(CardInstance)}
  1003.                              SetRegValue $(KeyOdiNSupParameters) {$(OdiNSupCardName),$(NoTitle),$(!REG_VT_SZ),$(CardToBindTo)}
  1004.                  Endif
  1005.                     Else
  1006.                         Set-sub CardInstance = $(DeletedCardInstance), 1
  1007.                         Debug-Output "NWSUBS.INF: Need to change board instance "$(CardInstance)
  1008.                         SetRegValue $(KeyOdiNSupParameters) {$(OdiNSupCardInstance),$(NoTitle),$(!REG_VT_DWORD),$(CardInstance)}
  1009.                     Endif
  1010.  
  1011.              Else
  1012.                     Debug-Output "NWSUBS.INF: Ipx NOT bound to a card with this name : "$(CardBaseName)
  1013.              Endif
  1014.  
  1015.  
  1016.              CloseRegKey $(KeyOdiNSupParameters)
  1017.  
  1018.                      Endif
  1019.  
  1020.         FlushRegKey $(KeyOdiModules)
  1021.         CloseRegKey $(KeyOdiModules)
  1022.     
  1023.          Endif
  1024.     Endif
  1025.  
  1026.      Endif
  1027.  
  1028.  
  1029. Exit_RemoveAdapter = +
  1030.      Debug-Output "NWSUBS.INF: ------------------------------------------------------"
  1031.  
  1032.      return $(Result)
  1033.  
  1034. ; ===================================================================================
  1035. ;
  1036. ; Add an Odi Load Module and set its Parameters.
  1037. ;
  1038. ; ===================================================================================
  1039.  
  1040. [NwAddOdiLoadModule]
  1041.      read-syms NwBaseVars
  1042.      read-syms IpxVars
  1043.      read-syms OdiVars
  1044.  
  1045.      Set CardInstanceName = $($0)
  1046.      Set AdapterNumber     = $($1)
  1047.      Set OdiParmList        = $($2)
  1048.  
  1049.      Set Result = "NO_ERROR"
  1050.  
  1051.      OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(DriverName) $(MAXIMUM_ALLOWED) KeyOdiLoad
  1052.      Ifstr $(KeyOdiLoad) == $(KeyNull)
  1053.             set Result = CANNOT_FIND_COMPONENT_SERVICE
  1054.             Debug-Output "NWSUBS.INF: Cannot open service "$(DriverName)
  1055.             goto Exit_AddOdiLoadModule
  1056.      Endif
  1057.  
  1058.      Set KeyOdiCard = $(KeyNull)
  1059.      Debug-Output "NWSUBS.INF: CardInstanceName = "$(CardInstanceName)
  1060.  
  1061. ;
  1062. ; Try to create Odi_Modules registry key.    If this fails try to open the key.
  1063. ; If this fails exit.
  1064. ;
  1065.      CreateRegKey $(KeyOdiLoad) {$(OdiModules),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyOdiModules
  1066.      Ifstr(i) $(KeyOdiModules) == $(KeyNull)
  1067.             OpenRegKey $(KeyOdiLoad) "" $(OdiModules) $(MAXIMUM_ALLOWED) KeyOdiModules
  1068.             Ifstr(i) $(KeyOdiLoad) == $(KeyNull)
  1069.                 set Result = CANNOT_FIND_COMPONENT_SERVICE
  1070.                 Debug-Output "Cannot find "$(DriverName)"\"$(OdiModules)
  1071.                 CloseRegKey $(KeyOdiLoad)
  1072.                 goto Exit_AddOdiLoadModule
  1073.             Endif
  1074.      Endif
  1075.  
  1076.      Ifstr(i) $(AdapterNumber) != ""
  1077.             ;    This adapter was just installed; allow creation of the #nn key
  1078.             CreateRegKey $(KeyOdiModules) {$(CardInstanceName),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyOdiCard
  1079.      Endif
  1080.  
  1081.      Ifstr(i) $(KeyOdiCard) == $(KeyNull)
  1082.             ;
  1083.             ;    This is either an old card, or a prior version of the key existed.
  1084.             ;
  1085.             OpenRegKey $(KeyOdiModules) "" $(CardInstanceName) $(MAXIMUM_ALLOWED) KeyOdiCard
  1086.             Ifstr(i) $(KeyOdiCard) == $(KeyNull)
  1087.                 Set Result = CANNOT_FIND_COMPONENT_SERVICE
  1088.                 Debug-Output "NWSUBS.INF: Can't Open "$(CardInstanceName)
  1089.                 CloseRegKey $(KeyOdiLoad)
  1090.                 CloseRegKey $(KeyOdiModules)
  1091.                 goto Exit_AddOdiLoadModule
  1092.             Endif
  1093.      Endif
  1094.  
  1095.      SetRegValue $(KeyOdiCard) {"Parameters",$(NoTitle),$(!REG_VT_MULTI_SZ),$(OdiParmList)}
  1096.  
  1097.      FlushRegKey $(KeyOdiCard)
  1098.  
  1099. ;
  1100. ; flush the Odi_Modules key so that the card we just added will show up in the enum
  1101. ;
  1102.  
  1103.      FlushRegKey $(KeyOdiModules)
  1104.  
  1105.      FlushRegKey $(KeyOdiLoad)
  1106.  
  1107.      Shell "" NwSetCardInstance $(KeyOdiLoad) $(KeyOdiModules) $(KeyOdiCard) $(CardInstanceName)
  1108.  
  1109.      Set Result = $($R0)
  1110.  
  1111.      CloseRegKey $(KeyOdiCard)
  1112.  
  1113.      CloseRegKey $(KeyOdiModules)
  1114.  
  1115.      FlushRegKey $(KeyOdiLoad)
  1116.      CloseRegKey $(KeyOdiLoad)
  1117.  
  1118.      Ifstr(i) $(Result) != NO_ERROR
  1119.             Debug-Output "NWSUBS.INF: SetCardInstance "$(Result)
  1120.             goto Exit_AddOdiLoadModule
  1121.      Endif
  1122.  
  1123.      Set OdiCardInstance = $($R1)
  1124.  
  1125.      Debug-Output "OdiCardInstance = "$(OdiCardInstance)
  1126.  
  1127. ;
  1128. ; Update the card name and card instance in IpxSpx to be the last card installed
  1129. ;
  1130. ;     Shell "" NwSetIpxCard $(CardInstanceName) $(OdiCardInstance)
  1131. ;
  1132. ;     Set Result = $($R0)
  1133. ;     Ifstr(i) $(Result) != NO_ERROR
  1134. ;            Debug-Output "NWSUBS.INF: NwSetIpxCard "$(Result)
  1135. ;            goto Exit_AddOdiLoadModule
  1136. ;     Endif
  1137.  
  1138. Exit_AddOdiLoadModule = +
  1139.  
  1140.      return $(Result)
  1141. ;
  1142. ; Remove the Nt Adapter Info.
  1143. ;
  1144. ;
  1145.  
  1146. [NwRemoveNtAdapter]
  1147.      read-syms NwBaseVars
  1148.      read-syms IpxVars
  1149.      read-syms OdiVars
  1150.  
  1151.      Set ProductKeyName = $($0)
  1152.      Set Manufacturer    = $($1)
  1153.      Set NetCardName     = $($2)
  1154.  
  1155.      Ifstr(i) $(NetCardName) == ""
  1156.             set NetCardName = $(!NTN_RegBase)
  1157.      Endif
  1158.  
  1159.      Debug-Output "NWSUBS.INF: NwRemoveNtAdapter, NTN_RegBase = "$(!NTN_RegBase)
  1160.      Debug-Output "NWSUBS.INF: ProductKeyName = "$(ProductKeyName)
  1161.      Debug-Output "NWSUBS.INF: Manufacturer = "$(Manufacturer)
  1162.      Debug-Output "NWSUBS.INF: NetCardName = "$(NetCardName)
  1163.  
  1164. ; ===================================================================================
  1165. ;
  1166. ; Increment the OdiLoad reference count so OdiLoad is not removed as a
  1167. ; service.
  1168. ;
  1169. ; ===================================================================================
  1170.  
  1171.      Shell $(UtilityInf), IncrementRefCount, $(ProductKeyName) $(Manufacturer)
  1172.      Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1173.             Debug-Output "NWSUBS.INF: IncrementRefCount ShellCode error "$($ShellCode)
  1174.             Set Result = "SHELL_CODE_ERROR"
  1175.             goto Exit_RemoveNtAdapter
  1176.      Endif
  1177.  
  1178.      set Result = $($R0)
  1179.  
  1180. ;     Ifstr(i) $(Result) != NO_ERROR
  1181. ;            Debug-Output "NWSUBS.INF: IncrementRefCount "$(ProductKeyName)": "$(Result)
  1182. ;            goto Exit_RemoveNtAdapter
  1183. ;     Endif
  1184.  
  1185.      Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1186.                 $(DriverName), $(NetCardName)
  1187.      ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1188.             Debug-Output "NWSUBS.INF: RemoveHardwareComponent ShellCode error "$($ShellCode)
  1189.             Set Result = "SHELL_CODE_ERROR"
  1190.             goto Exit_RemoveNtAdapter
  1191.      endif
  1192.  
  1193.      set Result = $($R0)
  1194.  
  1195.      Ifstr(i) $(Result) != NO_ERROR
  1196.             Debug-Output "NWSUBS.INF: RemoveHardwareComponent "$(Result)
  1197.     Shell "" ReallyRemoveHardwareComponent $(Manufacturer), +
  1198.              $(DriverName), $(!NTN_RegBase)
  1199.      endif
  1200.  
  1201. ; Decrement the reference count so OdiLoad can be removed when all the
  1202. ; ODI adapters have been removed.
  1203. ;
  1204.      Shell $(UtilityInf), DecrementRefCount, $(ProductKeyName)
  1205.      Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1206.             Debug-Output "NWSUBS.INF: DecrementRefCount ShellCode error "$($ShellCode)
  1207.             Set Result = "SHELL_CODE_ERROR"
  1208.             goto Exit_RemoveNtAdapter
  1209.      Endif
  1210.  
  1211.      set Result = $($R0)
  1212.  
  1213. ;     Ifstr(i) $(Result) != NO_ERROR
  1214. ;            Debug-Output "NWSUBS.INF: DecrementRefCount "$(Result)
  1215. ;            goto Exit_RemoveNtAdapter
  1216. ;     Endif
  1217.  
  1218. Exit_RemoveNtAdapter = +
  1219.  
  1220.      return $(Result)
  1221. ;
  1222. ; Select the card Ipx is bound to.
  1223. ;
  1224. ;
  1225.  
  1226. [NwSelectIpxCard]
  1227.     Set OdiCardName = $($0)
  1228.     Set OdiCardInstance = $($1)
  1229.     Set AlwaysPromptUser = $($2)
  1230.  
  1231.     Debug-Output "OdiCardName            "$(OdiCardName)
  1232.     Debug-Output "OdiCardInstance     "$(OdiCardInstance)
  1233.     Debug-Output "AlwaysPromptUser    "$(AlwaysPromptUser)
  1234.  
  1235.     read-syms NwBaseVars
  1236.     read-syms IpxVars
  1237.     read-syms OdiVars
  1238.     read-syms OdiNSupVars
  1239.     read-syms InstallOption$(!STF_LANGUAGE)
  1240.  
  1241.     Set Result = NO_ERROR
  1242.  
  1243.     Shell $(NwSubsInf) GetOdiAdapterList
  1244.  
  1245.     Set OdiTitleList        = $($R0)
  1246.     Set OdiCardList         = $($R1)
  1247.     Set OdiNtNumberList    = $($R2)
  1248.     Set NumberOdiAdapters = $($R3)
  1249.  
  1250.     Set DoDialog = FALSE;
  1251.     Ifint $(NumberOdiAdapters) > 1
  1252.         Set DoDialog = TRUE
  1253.     Endif
  1254.     Ifstr(i) $(AlwaysPromptUser) == TRUE
  1255.         Set DoDialog = TRUE
  1256.     Endif
  1257.  
  1258.     Ifstr(i) $(DoDialog) == TRUE
  1259.         ;
  1260.         ; More than one ODI adapter is installed so allow
  1261.         ; the user to select which one to bind to.
  1262.         ;
  1263.  
  1264.         Shell "" GetLanguageDir
  1265.         Set NLSDirName = $($R0)
  1266.         
  1267.         Shell "" GetNTVersion
  1268.         Set NTMajorVersion = $($R0)
  1269.  
  1270.         LoadLibrary $(LoadDisk3Text) $(!STF_WINDOWSSYSPATH)"\nwsetup.dll" NwLibHandle
  1271.         SetHelpFile $(!STF_WINDOWSSYSPATH)"\nls\"$(NLSDirName)"\nt4setup.hlp" $(!MinimumID) $(!MaximumID)
  1272.         ifint $(NTMajorVersion) < "4"
  1273.             SetHelpFile $(!STF_WINDOWSSYSPATH)"\nls\"$(NLSDirName)"\nt3setup.hlp" $(!MinimumID) $(!MaximumID)
  1274.         endif
  1275.  
  1276.         Ifstr(i) $(OdiCardName) == ""
  1277.             OpenRegKey $(!REG_H_LOCAL) "" $(IpxParameters) $(MAXIMUM_ALLOWED) KeyIpxParameters
  1278.             Ifstr(i) $(KeyIpxParameters) != ""
  1279.                 GetRegValue $(KeyIpxParameters) $(IpxCardName) TmpCardList
  1280.                 Set OdiCardName = *($(TmpCardList), 4)
  1281.                 GetRegValue $(KeyIpxParameters) $(IpxCardInstance) TmpInstanceList
  1282.                 Set OdiCardInstance = *($(TmpInstanceList), 4)
  1283.                 GetRegValue $(KeyIpxParameters) $(IpxNtCardInstance) TmpNtInstanceList
  1284.                 Set NtAdapterNumber = *($(TmpNtInstanceList), 4)
  1285.                 Debug-Output "Ipx Currently bound too "$(OdiCardName)
  1286.                 Debug-Output "                                "$(OdiCardInstance)
  1287.                 Debug-Output "Nt Card Instance            "$(NtAdapterNumber)
  1288.                 Debug-Output $(OdiTitleList)
  1289.                 Debug-Output $(OdiCardList)
  1290.                 Debug-Output $(OdiNtNumberList)
  1291.                 CloseRegKey $(KeyIpxParameters)
  1292.             Endif
  1293.         Endif
  1294.     
  1295.         Ifstr(i) $(NtAdapterNumber) != ""
  1296.             Set DefaultOdiTitle = *($(OdiTitleList), ~($(OdiNtNumberList), $(NtAdapterNumber)))
  1297.         Endif
  1298.     
  1299.         Ifstr(i) $(DefaultOdiTitle) == ""
  1300.              Set DefaultOdiTitle = *($(OdiTitleList), 1)
  1301.         Endif
  1302.     
  1303.         Debug-Output "NWSUBS.INF: NwSelectIpxCard DefaultOdiTitle = "$(DefaultOdiTitle)
  1304.     
  1305.         read-syms IPXBindDlg$(!STF_LANGUAGE)
  1306.         ui start "IPXBIND" $(NwLibHandle)
  1307.         ui pop 1
  1308.         
  1309.         ifstr(i) $(DLGEVENT) == "BACK"
  1310.             set AdapterSelected = ""
  1311.         else
  1312.             Set AdapterSelected = *($(DefaultOdiTitle), 1)
  1313.         endif
  1314.     
  1315.         Debug-Output "NWSUBS.INF: AdapterSelected = "$(AdapterSelected)
  1316.     
  1317.         Ifstr(i) $(AdapterSelected) == ""
  1318.             Debug-Output "NWSUBS.INF: Cancel Selected"
  1319.             Set CardToBindTo = *($(OdiCardList), 1)
  1320.             Set CardInstance = 1
  1321.         Else
  1322.             Set CardToBindTo = *($(OdiCardList), ~($(OdiTitleList), $(AdapterSelected)))
  1323.             Debug-Output "CardToBindTo = "$(CardToBindTo)
  1324.     
  1325.             Set NtAdapterNumber = *($(OdiNtNumberList), ~($(OdiTitleList), $(AdapterSelected)))
  1326.             Debug-Output "3: NtAdapterNumber = "$(NtAdapterNumber)
  1327.     
  1328.             Set NtAdapterKeyName = $(NetworkCardsKeyName)"\"$(NtAdapterNumber)
  1329.             OpenRegKey $(!REG_H_LOCAL) "" $(NtAdapterKeyName) $(MAXIMUM_ALLOWED) KeyNtAdapter
  1330.             Ifstr(i) $(KeyNtAdapter) != ""
  1331.                 GetRegValue $(KeyNtAdapter),"ServiceName", ServiceNameList
  1332.                 Set ServiceName = *($(ServiceNameList), 4)
  1333.                 CloseRegKey $(KeyNtAdapter)
  1334.     
  1335.     
  1336.                 ; Open the lan man card's service\Parameters.
  1337.                 ;
  1338.                 OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters" $(MAXIMUM_ALLOWED) KeyService
  1339.                 Ifstr(i) $(KeyService) == ""
  1340.     
  1341.                     Debug-Output "NWSUBS.INF: NwSelectIpxCard, Can't open "$(ServiceName)
  1342.     
  1343.                 Else
  1344.                     ; Get the OdiLoad link.
  1345.                     ;
  1346.                     GetRegValue $(KeyService) $(OdiLinkName) CardInstanceList
  1347.                     Set CardInstanceName = *($(CardInstanceList), 4)
  1348.                     CloseRegKey $(KeyService)
  1349.         
  1350.                     OpenRegKey $(!REG_H_LOCAL) "" $(OdiModuleName)"\"$(CardInstanceName) $(MAXIMUM_ALLOWED) KeyOdiCard
  1351.                     Ifstr(i) $(KeyOdiCard) != ""
  1352.                         GetRegValue $(KeyOdiCard) "BoardInstance" BoardInstanceList
  1353.                         Set CardInstance = *($(BoardInstanceList), 4)
  1354.                         Debug-Output "3: Selected CardInstance = "$(CardInstance)
  1355.                         CloseRegKey $(KeyOdiCard)
  1356.                     Endif
  1357.     
  1358.                 Endif
  1359.             Else
  1360.                 Debug-Output "Can't open "$(NtAdapterKeyName)
  1361.             Endif
  1362.     
  1363.         Endif
  1364.  
  1365.     Else
  1366.         Debug-Output "SelectIpxCard OdiCardList = "$(OdiCardList)
  1367.  
  1368.         Split-String $(OdiCardName) " " CardNameParts
  1369.         Set CardToBindTo = *($(CardNameParts),1)
  1370.     Endif
  1371.  
  1372.     OpenRegKey $(!REG_H_LOCAL) "" $(IpxParameters) $(MAXIMUM_ALLOWED) KeyIpxParameters
  1373.     Ifstr(i) $(KeyIpxParameters) == ""
  1374.         Set Result = "Can't open IpxSpx service."
  1375.         Debug-Output "NWSUBS.INF: "$(Result)
  1376.     Else
  1377.         SetRegValue $(KeyIpxParameters) {$(IpxCardName),$(NoTitle),$(!REG_VT_SZ),$(CardToBindTo)}
  1378.         Ifstr(i) $(OdiCardInstance) == ""
  1379.             Debug-Output "NWSUBS.INF: NwSelectIpxCard, OdiCardInstance set to default."
  1380.             Set OdiCardInstance = "1"
  1381.         Endif
  1382.         SetRegValue $(KeyIpxParameters) {$(IpxCardInstance),$(NoTitle),$(!REG_VT_DWORD),$(OdiCardInstance)}
  1383.         SetRegValue $(KeyIpxParameters) {$(IpxNtCardInstance),$(NoTitle),$(!REG_VT_SZ),$(NtAdapterNumber)}
  1384.         Shell "" NwSetFrameType $(CardToBindTo) $(NtAdapterNumber) $(NwLibHandle)
  1385.  
  1386.         Set GUIResult = $($R0)
  1387.         Ifstr(i) $(GUIResult) != ""
  1388.             SetRegValue $(KeyIpxParameters) {"FrameType",$(NoTitle),$(!REG_VT_SZ),$(GUIResult)}
  1389.         Endif
  1390.         CloseRegKey $(KeyIpxParameters)
  1391.     Endif
  1392.  
  1393.     return $(Result)
  1394.  
  1395. [ReallyRemoveHardwareComponent]
  1396.      read-syms NwBaseVars
  1397.      Set Result = "NO_ERROR"
  1398.  
  1399.      Set Manufacturer = $($0)
  1400.      Set DriverName    = $($1)
  1401.      Set AdapterName    = $($2)
  1402.      set DriverKey    = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(DriverName)"\CurrentVersion"
  1403.  
  1404.      Split-String $(AdapterName), "\", AdapterPathList
  1405.  
  1406.      Set AdapterNumber = *($(AdapterPathList),11)
  1407.      Set NetCardsBase    = *($(AdapterPathList),1)*($(AdapterPathList),2)*($(AdapterPathList),3)*($(AdapterPathList),4)*($(AdapterPathList),5)*($(AdapterPathList),6)*($(AdapterPathList),7)*($(AdapterPathList),8)*($(AdapterPathList),9)
  1408.  
  1409.      OpenRegKey $(!REG_H_LOCAL) "" $(NetCardsBase) $(MAXIMUM_ALLOWED) NetCardsKey
  1410.      Ifstr $(NetCardsKey) == ""
  1411.          Set Result = "Can't Open "$(NetCardsBase)
  1412.          Debug-Output "NWSUBS.INF: "$(Result)
  1413.          goto ReallyRemoveHardwareComponent_Return
  1414.      Endif
  1415.  
  1416.      OpenRegKey $(NetCardsKey) "" $(AdapterNumber) $(MAXIMUM_ALLOWED) AdapterNumberKey
  1417.      Ifstr $(AdapterNumberKey) == ""
  1418.          Set Result = "Can't Open "$(AdapterNumber)
  1419.          Debug-Output "NWSUBS.INF: "$(Result)
  1420.          goto ReallyRemoveHardwareComponent_Return
  1421.      endif
  1422.  
  1423.      GetRegValue $(AdapterNumberKey),"ServiceName", ServiceNameList
  1424.      Set ServiceName = *($(ServiceNameList), 4)
  1425.  
  1426.      CloseRegKey $(AdapterNumberKey)
  1427.      DeleteRegTree $(NetCardKey) $(AdapterNumber)
  1428.      CloseRegKey $(NetCardsKey)
  1429.      Shell $(UtilityInf), RemoveService, $(ServiceName), "NO"
  1430.      debug-output "remove netbios information..."
  1431.      LibraryProcedure Result, $(!NCPA_HANDLE), RemoveRouteFromNETBIOS, $(ServiceName)
  1432.  
  1433. ReallyRemoveHardwareComponent_Return = +
  1434.      return $(Result)
  1435.  
  1436. [ProgressCopyENG]
  1437.      !p:ProCaption    = "IntranetWare for Windows NT Setup"
  1438.      !p:ProCancel     = "Cancel"
  1439.      !p:ProCancelMsg = "IntranetWare for Windows NT is not correctly installed.    Are you sure you want "+
  1440.                              "to cancel copying files?"
  1441.      !p:ProCancelCap = "Setup Message"
  1442.      !p:ProText1        = "Copying:"
  1443.      !p:ProText2        = "To:"
  1444.      !p:Error            = "Unable to determine proper source disk location; copy cannot be performed."
  1445.  
  1446. [DoAskSource]
  1447.     read-syms DoAskSource$(!STF_LANGUAGE)
  1448.  
  1449.     Set DAS_CWDDIR        = $($0)
  1450.     Set DAS_SRCDIR        = $($1)
  1451.     Set DAS_BUILTIN    = $($2)
  1452.     Set DAS_Result        = STATUS_FAILED
  1453.     Ifstr(i) $(!STF_SRCDIR_OVERRIDE) != ""
  1454.         Set DAS_SRCDIR = $(!STF_SRCDIR_OVERRIDE)
  1455.         Set DAS_Result = STATUS_SUCCESSFUL
  1456.         Goto DAS_exit
  1457.     Endif
  1458.     Ifstr(i) $(DAS_BUILTIN) == YES
  1459.         Ifstr(i) $(!NTN_InstallPhase) == primary
  1460.             Ifstr(i) $(!STF_SRCDIR_WINNT) != ""
  1461.                 Set DAS_SRCDIR = $(!STF_SRCDIR_WINNT)
  1462.             Endif
  1463.             Set DAS_Result = STATUS_SUCCESSFUL
  1464.             Goto DAS_exit
  1465.         Endif
  1466.     Endif
  1467.     Debug-Output "NWSUBS.INF: [DoAskSource] STF_CWDDIR = "$(DAS_CWDDIR)" STF_SRCDIR = "$(DAS_SRCDIR)
  1468.     Ifstr(i) $(DAS_SRCDIR) == ""
  1469.         Set DAS_SRCDIR = "A:\"
  1470.     Endif
  1471.     Ifstr(i) $(DAS_SRCDIR) == $(!STF_SRCDIR_USED)
  1472.         Set DAS_SRCDIR = $(!STF_SRCDIR_KEYED)
  1473.     Endif
  1474.     Shell "subroutn.inf" DoAskSourceEx $(DAS_SRCDIR) $(NetWareDlgText)
  1475.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1476.         Debug-Output "UTILITY.INF: shelling SUBROUTN.INF [DoAskSource] failed"
  1477.         goto DAS_exit
  1478.     endif
  1479.     Set DAS_Result = $($R0)
  1480.     Set DAS_SRCDIR = $($R1)
  1481.     Set !STF_SRCDIR_USED = $($R1)
  1482.     Set !STF_SRCDIR_KEYED = $($R3)
  1483. DAS_exit =+
  1484.     Read-syms ProgressCopy$(!STF_LANGUAGE)
  1485.     Return $(DAS_Result) $(DAS_SRCDIR)
  1486.  
  1487. [DoAskLANSource]
  1488.     read-syms DoAskSource$(!STF_LANGUAGE)
  1489.  
  1490.     Set DAS_CWDDIR    = $($0)
  1491.     Set DAS_SRCDIR    = $($1)
  1492.  
  1493.     Debug-Output "DAS_CWDDIR = "$(DAS_CWDDIR)
  1494.     Debug-Output "DAS_SRCDIR = "$(DAS_SRCDIR)
  1495.     Debug-Output "STF_SRCDIR_USED = "$(!STF_SRCDIR_USED)
  1496.     Debug-Output "STF_SRCDIR_KEYED = "$(!STF_SRCDIR_KEYED)
  1497.  
  1498.     Set DAS_BUILTIN = $($2)
  1499.     Set DAS_Result    = STATUS_FAILED
  1500.     Debug-Output "NWSUBS.INF: [DoAskLANSource] STF_CWDDIR = "$(DAS_CWDDIR)" STF_SRCDIR = "$(DAS_SRCDIR)
  1501.     Ifstr(i) $(DAS_SRCDIR) == ""
  1502.         Set DAS_SRCDIR = "A:\"
  1503.     Endif
  1504.     Ifstr(i) $(DAS_SRCDIR) == $(!STF_SRCDIR_USED)
  1505.         Set DAS_SRCDIR = $(!STF_SRCDIR_KEYED)
  1506.     Endif
  1507.     Shell "subroutn.inf" DoAskSourceEx $(DAS_SRCDIR) $(NetWareLANDlgText)
  1508.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1509.         Debug-Output "UTILITY.INF: shelling SUBROUTN.INF [DoAskLANSource] failed"
  1510.         goto DAS_exit
  1511.     endif
  1512.     Set DAS_Result = $($R0)
  1513.     Set DAS_SRCDIR = $($R1)
  1514.     Set !STF_SRCDIR_USED = $($R1)
  1515.     Set !STF_SRCDIR_KEYED = $($R3)
  1516. DAS_exit =+
  1517.     Read-syms ProgressCopy$(!STF_LANGUAGE)
  1518.     Return $(DAS_Result) $(DAS_SRCDIR)
  1519.  
  1520. ; ===========================================================================
  1521. ; NwSetFrameType
  1522. ;    Set the frame type for a loaded ODI adapter from the list of frames loaded
  1523. ;    by OdiLoad.
  1524. ;
  1525. ; INPUT:
  1526. ;     $($0) Base name of card to set to frame type for (ie NE2000).
  1527. ;     $($1) NT card instance (ie 01).
  1528. ;     $($2) Open handle to nwsubs or "" and I'll open it.
  1529. ;
  1530. ; OUTPUT:
  1531. ;     $($R0) Frame Selected or ""
  1532. ;
  1533. ; ===========================================================================
  1534.  
  1535. [NwSetFrameType]
  1536.     read-syms NwBaseVars
  1537.     read-syms IpxVars
  1538.     read-syms OdiVars
  1539.     read-syms OdiNSupVars
  1540.     read-syms InstallOption$(!STF_LANGUAGE)
  1541.  
  1542.     Set CardToBindTo     = $($0)
  1543.     Set NtAdapterNumber = $($1)
  1544.     Set NwLibHandle        = $($2)
  1545.  
  1546.     Set CloseLibrary = FALSE
  1547.  
  1548.     Ifstr(i) $(NwLibHandle) == ""
  1549.  
  1550.         Shell "" GetLanguageDir
  1551.         Set NLSDirName = $($R0)
  1552.         
  1553.         Shell "" GetNTVersion
  1554.         Set NTMajorVersion = $($R0)
  1555.  
  1556.         LoadLibrary $(LoadDisk3Text) $(!STF_WINDOWSSYSPATH)"\nwsetup.dll" NwLibHandle
  1557.         SetHelpFile $(!STF_WINDOWSSYSPATH)"\nls\"$(NLSDirName)"\nt4setup.hlp" $(!MinimumID) $(!MaximumID)
  1558.         ifint $(NTMajorVersion) < "4"
  1559.             SetHelpFile $(!STF_WINDOWSSYSPATH)"\nls\"$(NLSDirName)"\nt3setup.hlp" $(!MinimumID) $(!MaximumID)
  1560.         endif
  1561.         Set CloseLibrary = TRUE
  1562.     Endif
  1563.  
  1564.     Debug-Output "CardToBindTo = "$(CardToBindTo)
  1565.     Set-add TempAdapterNumber = $(NtAdapterNumber),0
  1566.     Set OdiLoadModuleName = $(CardToBindTo)" #"$(TempAdapterNumber)
  1567.     Debug-Output "OdiLoadModuleName = "$(OdiLoadModuleName)
  1568.  
  1569.     ; Set the frame type
  1570.     ;
  1571.     Set OdiParmList = {}
  1572.  
  1573.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\OdiLoad\ODI_Modules\"$(OdiLoadModuleName) $(MAXIMUM_ALLOWED) KeyOdiModule
  1574.     Ifstr(i) $(KeyOdiModule) != ""
  1575.         GetRegValue $(KeyOdiModule), "Parameters", OdiParmInfo
  1576.         Set OdiParmList = *($(OdiParmInfo), 4)
  1577.         Debug-Output "OdiParmList = "$(OdiParmList)
  1578.         CloseRegKey $(KeyOdiModule)
  1579.      Endif
  1580.  
  1581.     Set FrameList = "AUTO DETECT"
  1582.     set ProtocolID = ""
  1583.     set FrameListDefault = ""
  1584.  
  1585.     ForListDo $(OdiParmList)
  1586.         Set Item = $($)
  1587.         Split-String $(Item) " " ParmParts
  1588.         Set ParmName = *($(ParmParts), 1)
  1589.         Ifstr(i) $(ParmName) == "Frame"
  1590.             Set ParmData = *($(ParmParts), 3)
  1591.             ifstr $(FrameList) == ""
  1592.                 Set FrameList = {$(ParmData)}
  1593.             else
  1594.                 Set FrameList = >($(FrameList), $(ParmData))
  1595.             endif
  1596.         Endif
  1597.     EndForListDo
  1598.  
  1599.     set StandardFrameList = $(FrameList)
  1600.  
  1601.     OpenRegKey $(!REG_H_LOCAL) "" $(IpxParameters) $(MAXIMUM_ALLOWED) KeyIpxParameters
  1602.     Ifstr(i) $(KeyIpxParameters) != ""
  1603.         set CloseIPX = TRUE
  1604.         set ParameterList = {}
  1605.         GetRegValue $(KeyIpxParameters) "Protocol Id" ParameterList
  1606.         ifstr *($(ParameterList), 4) != ""
  1607.             set ProtocolID = *($(ParameterList), 4)
  1608.             set ParameterList = {}
  1609.             GetRegValue $(KeyIpxParameters) "Frame Type" ParameterList
  1610.             set FrameList = >($(FrameList), *($(ParameterList), 4))
  1611.             set NewFrameTypeName = *($(ParameterList), 4)
  1612.             set FrameListDefault = *($(ParameterList), 4)
  1613.         endif
  1614.     endif
  1615.  
  1616.     set FrameList = >($(FrameList), "Other Non-Standard Frame Type")
  1617.  
  1618.     Debug-Output "FrameList "$(FrameList)
  1619.  
  1620.     ifstr $(FrameListDefault) == ""
  1621.         Set FrameListDefault = *($(FrameList), 1)
  1622.     endif
  1623.  
  1624.     Debug-Output "FrameListDefault = "$(FrameListDefault)
  1625.  
  1626. dotheframedlg =+
  1627.     read-syms IPXDlg$(!STF_LANGUAGE)
  1628.     ui start "Framelist" $(NwLibHandle)
  1629.  
  1630.  
  1631.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  1632.         set GUIResult = *($(ComboOut), 1)
  1633.         Debug-Output "OK hit"
  1634.         ifcontains(i) $(GUIResult) IN $(StandardFrameList)
  1635.             DeleteRegValue $(KeyIpxParameters) "Protocol Id"
  1636.         else-ifstr(i) $(GUIResult) == "Other Non-Standard Frame Type"
  1637.             read-syms NewFrameTypeDlg$(!STF_LANGUAGE)
  1638.             ui start "NewFrameType" $(NwLibHandle)
  1639.             ui pop 1
  1640.             ifstr(i) $(DLGEVENT) == "CONTINUE"
  1641.                 Debug-Output "OK hit"
  1642.                 set GUIResult = *($(EditTextOut), 1)
  1643.                 set ProtocolID = *($(EditTextOut), 2)
  1644.                 set KeyValueList = {"Protocol Id",$(NoTitle),$(!REG_VT_DWORD),$(ProtocolID)}
  1645.                 SetRegValue $(KeyIpxParameters) $(KeyValueList)
  1646.             else-ifstr(i) $(DLGEVENT) == "BACK"
  1647.                 Debug-Output "Action: CANCEL"
  1648.                 goto dotheframedlg
  1649.             endif
  1650.         endif
  1651.     else-ifstr(i) $(DLGEVENT) == "BACK"
  1652.         ;
  1653.         ; if you hit DEFAULT, you get the default frame which is the first item in the list
  1654.         ;
  1655.         set GUIResult = *($(StandardFrameList), 1)
  1656.         DeleteRegValue $(KeyIpxParameters) "Protocol Id"
  1657.     endif
  1658.     ui pop 1
  1659.  
  1660.     Ifstr(i) $(CloseIPX) == TRUE
  1661.         CloseRegKey $(KeyIpxParameters)
  1662.     Endif
  1663.  
  1664.     Ifstr(i) $(CloseLibrary) == TRUE
  1665.          FreeLibrary $(NwLibHandle)
  1666.     Endif
  1667.  
  1668.     Debug-Output "Returning GUIResult = "$(GUIResult)
  1669.     Return $(GUIResult)
  1670.  
  1671. ; ===========================================================================
  1672. ; NwGetNICBusInfo
  1673. ;    Get Information about the BUS.  If there is only one BUS present then
  1674. ;    the information will be returned without any user intervention.  If there
  1675. ;    are more than one BUS, the user will need to select the BUS where the NIC
  1676. ;    will be installed.
  1677. ;
  1678. ; INPUT:
  1679. ;     $($0) Network Card Adapter Registry Name (Card type and instance i.e. NE2000)
  1680. ;     $($1) Bus Interface Type
  1681. ;     $($2) Bus Number
  1682. ;
  1683. ; OUTPUT:
  1684. ;     $($R0) Return Status
  1685. ;     $($R1) BusNumber
  1686. ;     $($R2) BusTypeName
  1687. ;     $($R3) BusInterfaceType (ID)
  1688. ;
  1689. ; ===========================================================================
  1690.  
  1691. [NwGetNICBusInfo]
  1692.     
  1693.     set CardInstanceName = $($0)
  1694.     set BusInterfaceType = $($1)
  1695.     set BusNumber = $($2)
  1696.     set BusTypeName = ""
  1697.  
  1698.     Shell "UTILITY.INF", GetBusTypeDialog, $(CardInstanceName), $(BusInterfaceType), $(BusNumber)
  1699.  
  1700.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1701.         Debug-Output "OEMNADNH.INF: GetBusTypeDialog ShellCode error "$($ShellCode)
  1702.         goto NwGetNICBusInfoERROR
  1703.     else
  1704.  
  1705.         set BusInterfaceType = $($R1)
  1706.         set BusNumber = $($R2)
  1707.  
  1708.         ;This next section should be redone as a list and internationalized
  1709.         ;==================================================================
  1710.         ifint $(BusInterfaceType) == 0
  1711.             set BusTypeName = "Internal"
  1712.         else-ifint $(BusInterfaceType) == 1
  1713.             set BusTypeName = "ISA"
  1714.         else-ifint $(BusInterfaceType) == 2
  1715.             set BusTypeName = "EISA"
  1716.         else-ifint $(BusInterfaceType) == 3
  1717.             set BusTypeName = "MicroChannel"
  1718.         else-ifint $(BusInterfaceType) == 4
  1719.             set BusTypeName = "TurboChannel"
  1720.         else-ifint $(BusInterfaceType) == 5
  1721.             set BusTypeName = "PCIBus"
  1722.         else-ifint $(BusInterfaceType) == 6
  1723.             set BusTypeName = "VMEBus"
  1724.         else-ifint $(BusInterfaceType) == 7
  1725.             set BusTypeName = "NuBus"
  1726.         else-ifint $(BusInterfaceType) == 8
  1727.             set BusTypeName = "PCMCIABus"
  1728.         else-ifint $(BusInterfaceType) == 9
  1729.             set BusTypeName = "CBus"
  1730.         else-ifint $(BusInterfaceType) == 10
  1731.             set BusTypeName = "MPIBus"
  1732.         else-ifint $(BusInterfaceType) == 11
  1733.             set BusTypeName = "MPSABus"
  1734.         else
  1735.             set BusTypeName = "***ERROR:Illegal Bus Type***"
  1736.         endif
  1737.     endif
  1738.  
  1739.  
  1740. NwGetNICBusInfoERROR = +
  1741.      
  1742.      Return $(ShellCode) $(BusNumber) $(BusTypeName) $(BusInterfaceType)
  1743.  
  1744. ;
  1745. ;
  1746. ; ===================================================================================
  1747. ;
  1748. ;                         GetTotalAdapterList
  1749. ; ===================================================================================
  1750. ;
  1751. ; Section to create a list of all installed ODI and NDIS adapters.    Used by OEMSETUP bindings.
  1752. ;
  1753. ; INPUT:
  1754. ;     NONE
  1755. ;
  1756. ; OUTPUT:
  1757. ;     $($R0)    List of installed ODI adapter names.
  1758. ;     $($R1)    List of installed ODI adapter titles.
  1759. ;     $($R2)    List of installed ODI adapter card numbers.
  1760. ;     $($R3)    Number of installed ODI adapters.
  1761. ;     $($R4)    List of installed NDIS adapter names.
  1762. ;     $($R5)    List of installed NDIS adapter titles.
  1763. ;     $($R6)    List of installed NDIS adapter card numbers.
  1764. ;     $($R7)    Number of installed NDIS adapters.
  1765. ;   $($R8)  Adapter card number of ODINSUP or "" if not loaded
  1766. ;
  1767. ; ===================================================================================
  1768.  
  1769. [GetTotalAdapterList]
  1770. ;
  1771. ; In this section we will create a list of all installed adapters.
  1772. ;
  1773.     read-syms NwBaseVars
  1774.     read-syms OdiVars
  1775.  
  1776.     Debug-Output " "
  1777.     Debug-Output "NWSUBS.INF:  Entering function GetTotalAdapterList"
  1778.     Debug-Output " "
  1779.  
  1780.     Set OdiCardNumList                = {}
  1781.     Set OdiTitleList                    = {}
  1782.     Set OdiCardList                    = {}
  1783.     Set NdisCardNumList                = {}
  1784.     Set NdisTitleList                    = {}
  1785.     Set NdisCardList                    = {}
  1786.     Set NumberNdisAdapters            = 0
  1787.     Set ODINSUPCardNumber            = ""
  1788.     Set NetWareIPCardNumList        = {}
  1789.     Set IsHidden                        = ""
  1790.     set OdiAdapter                        = ""
  1791.     Set NumberOdiAdapters            = 0
  1792.     Set NumberNetWareIPAdapters    = 0
  1793.  
  1794.  
  1795.     OpenRegKey $(!REG_H_LOCAL) "" $(NetworkCardsKeyName) $(MAXIMUM_ALLOWED) NetCardsKey
  1796.  
  1797.     Ifstr(i) $(NetCardsKey) == ""
  1798.         Debug-Output "NWSUBS.INF: Can't Open Registry key "$(NetworkCardsKeyName)
  1799.         set CommonStatus = STATUS_USERCANCEL
  1800.     Else
  1801.  
  1802.         FlushRegKey $(NetCardsKey)
  1803. ;
  1804. ;        Get a list of all installed network cards
  1805. ;
  1806.         EnumRegKey $(NetCardsKey) NetCardsList
  1807.  
  1808.         ForListDo $(NetCardsList)
  1809.             Set CardNumber = *($($), 1)
  1810.  
  1811.             OpenRegKey $(NetCardsKey) "" $(CardNumber) $(MAXIMUM_ALLOWED) CardKey
  1812.             Ifstr(i) $(CardKey) == ""
  1813.                 Debug-Output "NWSUBS.INF: Can't open adapter "$(Card)
  1814.             Else
  1815.                 GetRegValue $(CardKey) "Title" TitleValues
  1816.                 Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  1817.                     Set CardTitle = *($(TitleValues), 4)
  1818.                 Else
  1819.                     Set CardTitle = ""
  1820.                 Endif
  1821.  
  1822.                 GetRegValue $(CardKey) "ProductName" NameValues
  1823.                 Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  1824.                     Set CardName = *($(NameValues), 4)
  1825.                 Else
  1826.                     Set CardName = ""
  1827.                 Endif
  1828.  
  1829.                 GetRegValue $(CardKey) "Hidden" HiddenValues
  1830.                 Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  1831.                     Set IsHidden = *($(HiddenValues), 4)
  1832.                 Else
  1833.                     Set IsHidden = ""
  1834.                 Endif
  1835.  
  1836.                 GetRegValue $(CardKey) "OdiAdapter" OdiValueList
  1837.                 Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  1838.                     set OdiAdapter = *($(OdiValueList), 4)
  1839.                 Else
  1840.                     set OdiAdapter = ""
  1841.                 Endif
  1842.  
  1843.                 Ifstr(i) $(OdiAdapter) == "1"
  1844.  
  1845.                     ;
  1846.                     ; Must be an ODI Adapter so add it to our lists.
  1847.                     ;
  1848.  
  1849.                     Set-add NumberOdiAdapters = $(NumberOdiAdapters), 1
  1850.                     Set OdiCardNumList = >($(OdiCardNumList), $(CardNumber))
  1851.                     Set OdiTitleList = >($(OdiTitleList), $(CardTitle))
  1852.                     Set OdiCardList = >($(OdiCardList), $(CardName))
  1853.  
  1854.                 Else-Ifstr(i) $(CardName) == "ODINSUP"
  1855.                     Set ODINSUPCardNumber = $(CardNumber)
  1856.  
  1857.                 Else-Ifstr(i) $(CardName) == "NetWareIP"
  1858.                     Set-add NumberNetWareIPAdapters = $(NumberNetWareIPAdapters), 1
  1859.                     Set NetWareIPCardNumList = >($(NetWareIPCardNumList), $(CardNumber))
  1860.  
  1861.                 Else
  1862.  
  1863.                     ;
  1864.                     ;    Must be an NDIS Adapter so add it to our lists if it isn't hidden
  1865.                     ;
  1866.  
  1867.                     Ifstr(i) $(IsHidden) != "1"
  1868.                         Set-add NumberNdisAdapters = $(NumberNdisAdapters), 1
  1869.                         Set NdisCardNumList = >($(NdisCardNumList), $(CardNumber))
  1870.                         Set NdisTitleList = >($(NdisTitleList), $(CardTitle))
  1871.                         Set NdisCardList = >($(NdisCardList), $(CardName))
  1872.                     Endif
  1873.                 Endif
  1874.  
  1875.             CloseRegKey $(CardKey)
  1876.             Endif
  1877.         EndForListDo
  1878.  
  1879.         Debug-Output "NWSUBS.INF: OdiCardList                    = "$(OdiCardList)
  1880.         Debug-Output "NWSUBS.INF: OdiTitleList                    = "$(OdiTitleList)
  1881.         Debug-Output "NWSUBS.INF: OdiCardNumList                = "$(OdiCardNumList)
  1882.         Debug-Output "NWSUBS.INF: NumberOdiAdapters            = "$(NumberOdiAdapters)
  1883.         Debug-Output "NWSUBS.INF: NdisCardList                    = "$(NdisCardList)
  1884.         Debug-Output "NWSUBS.INF: NdisTitleList                = "$(NdisTitleList)
  1885.         Debug-Output "NWSUBS.INF: NdisCardNumList                = "$(NdisCardNumList)
  1886.         Debug-Output "NWSUBS.INF: NumberNdisAdapters            = "$(NumberNdisAdapters)
  1887.         Debug-Output "NWSUBS.INF: ODINSUP card number        = "$(ODINSUPCardNumber)
  1888.         Debug-Output "NWSUBS.INF: NetWareIP card number        = "$(NetWareIPCardNumList)
  1889.         Debug-Output "NWSUBS.INF: NumberNetWareIPAdapters    = "$(NumberNetWareIPAdapters)
  1890.  
  1891.         CloseRegKey $(NetCardsKey)
  1892.     Endif
  1893.  
  1894.     Debug-Output " "
  1895.     Debug-Output "NWSUBS.INF:  Exiting function GetTotalAdapterList"
  1896.     Debug-Output " "
  1897.  
  1898.     return $(OdiCardList) $(OdiTitleList) $(OdiCardNumList) $(NumberOdiAdapters) $(NdisCardList) $(NdisTitleList) $(NdisCardNumList) $(NumberNdisAdapters) $(ODINSUPCardNumber) $(NetWareIPCardNumList) $(NumberNetWareIPAdapters)
  1899.  
  1900.  
  1901.  
  1902.  
  1903. ;
  1904. ;
  1905. ; ===================================================================================
  1906. ;
  1907. ;                         GetIpxCardList
  1908. ; ===================================================================================
  1909. ;
  1910. ; Section to create a combined list of all installed Odi and Ndis adapters.
  1911. ; Used by OEMSETUP when configuring IPX.
  1912. ;
  1913. ; INPUT:
  1914. ;     NONE
  1915. ;
  1916. ; OUTPUT:
  1917. ;     $($R0)    List of installed network cards.
  1918. ;     $($R1)    List of media type for installed network cards (ie {"ETHERNET","TOKEN-RING",...}).
  1919. ;     $($R2)    List of driver type for installed network cards (ie {"ODI","NDIS",...}).
  1920. ;     $($R3)    Number of installed network cards.
  1921. ;   $($R4)  Product name list.
  1922. ;   $($R5)  Service name list.
  1923. ;   $($R6)  NetWareIP installed ? (YES/NO)
  1924. ;   $($R7)  List of network card numbers.
  1925. ;
  1926. ; ===================================================================================
  1927.  
  1928. [GetIpxCardList]
  1929. ;
  1930. ; In this section we will create a list of all installed network cards.
  1931. ;
  1932.     read-syms NwBaseVars
  1933.     read-syms OdiVars
  1934.  
  1935.     Debug-Output "NWSUBS.INF: GetIpxCardList"
  1936.  
  1937.     Set NetworkCardList = {}
  1938.     Set MediaTypeList = {}
  1939.     Set DriverTypeList = {}
  1940.     Set NumberNetworkCards = 0
  1941.     Set ProductNameList = {}
  1942.     Set ServiceNameList = {}
  1943.     Set NetWareIPInstalled = ""
  1944.     Set CardNumberList = {}
  1945.  
  1946.     Set IsHidden = ""
  1947.     set OdiAdapter = ""
  1948.  
  1949. ;    ;
  1950. ;    ;  Check if NetWareIP installed
  1951. ;    ;
  1952. ;    OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NetWareIP" $(MAXIMUM_ALLOWED) KeyNetWareIP
  1953. ;    Ifstr $(KeyNetWareIP) != $(KeyNull)
  1954. ;        GetRegValue $(KeyNetWareIP) "DeleteFlag" DeleteFlagList
  1955. ;        Set NetWareIPDeleteFlag = *($(DeleteFlagList), 4)
  1956. ;        Debug-Output "NetWareIPDeleteFlag = "$(NetWareIPDeleteFlag)
  1957. ;        Ifint $(NetWareIPDeleteFlag) != 1
  1958. ;            Set NetWareIPInstalled = YES
  1959. ;            Debug-Output "NWSUBS.INF: bindnetware, NetWareIP is installed"
  1960. ;        Else
  1961. ;            Set NetWareIPInstalled = ""
  1962. ;            Debug-Output "NWSUBS.INF: bindnetware, NetWareIP NOT installed"
  1963. ;        Endif
  1964. ;        CloseRegKey $(KeyNetWareIP)
  1965. ;    Endif
  1966. ;
  1967. ;
  1968. ;    ifstr(i) $(NetWareIPInstalled) == YES
  1969. ;        set NetworkCardList = {"Novell NetWare/IP Support"}
  1970. ;        set MediaTypeList = {"NetWareIP"}
  1971. ;        set DriverTypeList = {"ODI"}
  1972. ;        set NumberNetworkCards = 1
  1973. ;        set ProductNameList = {"NetWareIP"}
  1974. ;        set ServiceNameList = {"NetWareIP"}
  1975. ;        goto GetIpxCardListEXIT
  1976. ;    endif
  1977.  
  1978.     OpenRegKey $(!REG_H_LOCAL) "" $(NetworkCardsKeyName) $(MAXIMUM_ALLOWED) NetCardsKey
  1979.  
  1980.     Ifstr(i) $(NetCardsKey) == ""
  1981.         Debug-Output "NWSUBS.INF: Can't Open Registry key "$(NetworkCardsKeyName)
  1982.         set CommonStatus = STATUS_USERCANCEL
  1983.     Else
  1984.  
  1985.         FlushRegKey $(NetCardsKey)
  1986.  
  1987.         ;
  1988.         ; Get a list of all installed network cards
  1989.         ;
  1990.  
  1991.         EnumRegKey $(NetCardsKey) NetCardsList
  1992.  
  1993.         ForListDo $(NetCardsList)
  1994.             Set CardNumber = *($($), 1)
  1995.  
  1996.             OpenRegKey $(NetCardsKey) "" $(CardNumber) $(MAXIMUM_ALLOWED) CardKey
  1997.             Ifstr(i) $(CardKey) == ""
  1998.                 Debug-Output "NWSUBS.INF: Can't open adapter "$(Card)
  1999.             Else
  2000.                 GetRegValue $(CardKey) "Title" TitleValues
  2001.                 Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2002.                     Set CardTitle = *($(TitleValues), 4)
  2003.                 Else
  2004.                     Set CardTitle = ""
  2005.                 Endif
  2006.                 GetRegValue $(CardKey) "ProductName" NameValues
  2007.                 Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2008.                     Set CardName = *($(NameValues), 4)
  2009.                 Else
  2010.                     Set CardName = ""
  2011.                 Endif
  2012.                 GetRegValue $(CardKey) "Hidden" HiddenValues
  2013.                 Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2014.                     Set IsHidden = *($(HiddenValues), 4)
  2015.                 Else
  2016.                     Set IsHidden = ""
  2017.                 Endif
  2018.                 GetRegValue $(CardKey) "OdiAdapter" OdiValueList
  2019.                 Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2020.                     set OdiAdapter = *($(OdiValueList), 4)
  2021.                 Else
  2022.                     set OdiAdapter = ""
  2023.                 Endif
  2024.                 GetRegValue $(CardKey) "ServiceName" ValueList
  2025.                 Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2026.                     set ServiceName = *($(ValueList), 4)
  2027.                 Else
  2028.                     set ServiceName = ""
  2029.                 Endif
  2030.  
  2031.                 ifstr(i) $(IsHidden) != "1"
  2032.                     ;
  2033.                     ; It's not hidden so add it to the lists
  2034.                     ;
  2035.  
  2036.                     Set-add NumberNetworkCards = $(NumberNetworkCards), 1
  2037.                     Set NetworkCardList = >($(NetworkCardList), $(CardTitle))
  2038.                     Set ProductNameList = >($(ProductNameList), $(CardName))
  2039.                     Set ServiceNameList = >($(ServiceNameList), $(ServiceName))
  2040.                     Set CardNumberList  = >($(CardNumberList), $(CardNumber))
  2041.  
  2042.                     set MediaType = "UNKNOWN"
  2043.                     set ServiceParameters = $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters"
  2044.                     OpenRegKey $(!REG_H_LOCAL) ""  $(ServiceParameters) $(MAXIMUM_ALLOWED) ServiceParametersKey
  2045.                     ifstr(i) $(ServiceParametersKey) != ""
  2046.                         GetRegValue $(ServiceParametersKey) "MediaType" ValueList
  2047.                         Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2048.                             set NdisMediaType = *($(ValueList), 4)
  2049.                             ifstr(i) $(NdisMediaType) == "1"
  2050.                                 set MediaType = "ETHERNET"
  2051.                             else-ifstr(i) $(NdisMediaType) == "2"
  2052.                                 set MediaType = "TOKEN-RING"
  2053.                             else-ifstr(i) $(NdisMediaType) == "4"
  2054.                                 set MediaType = "FDDI"
  2055.                             else
  2056.                                 Debug-Output "NWSUBS.INF: Unknown media type "$(NdisMediaType)
  2057.                             endif
  2058.                         Endif
  2059.                         CloseRegKey $(ServiceParametersKey)
  2060.                     endif
  2061.                     set MediaTypeList = >($(MediaTypeList), $(MediaType))
  2062.  
  2063.  
  2064.                     Ifstr(i) $(OdiAdapter) == "1"
  2065.                         ;
  2066.                         ; Must be an ODI Adapter so add ODI to driver type list.
  2067.                         ;
  2068.                         Set DriverTypeList = >($(DriverTypeList), "ODI")
  2069.                     Else
  2070.                         ;
  2071.                         ;    Must be an NDIS Adapter so add NDIS to driver type list.
  2072.                         ;
  2073.                         Set DriverTypeList = >($(DriverTypeList), "NDIS")
  2074.                     Endif
  2075.  
  2076.                 endif
  2077.  
  2078.             CloseRegKey $(CardKey)
  2079.             Endif
  2080.         EndForListDo
  2081.  
  2082.         Debug-Output "NWSUBS.INF: NetworkCardList         = "$(NetworkCardList)
  2083.         Debug-Output "NWSUBS.INF: MediaTypeList       = "$(MediaTypeList)
  2084.         Debug-Output "NWSUBS.INF: DriverTypeList      = "$(DriverTypeList)
  2085.         Debug-Output "NWSUBS.INF: NumberNetworkCards  = "$(NumberNetworkCards)
  2086.  
  2087.         CloseRegKey $(NetCardsKey)
  2088.     Endif
  2089.  
  2090. GetIpxCardListEXIT = +
  2091.  
  2092.     return $(NetworkCardList) $(MediaTypeList) $(DriverTypeList) $(NumberNetworkCards) $(ProductNameList) $(ServiceNameList) $(NetWareIPInstalled) $(CardNumberList)
  2093.  
  2094.  
  2095. ;
  2096. ;
  2097. ; ===================================================================================
  2098. ;
  2099. ;
  2100. ; ===================================================================================
  2101. ;
  2102. ;  Section to check for needed drivers - ODINSUP
  2103. ;
  2104. ; INPUT:
  2105. ;     NONE
  2106. ;
  2107. ; OUTPUT:
  2108. ;     NONE
  2109. ; ===================================================================================
  2110.  
  2111. [CheckIfODINSUPIsNeeded]
  2112.  
  2113.         read-syms NwBaseVars
  2114.  
  2115.     Debug-Output " "
  2116.     Debug-Output "NWSUBS.INF:  Entering function CheckIfODINSUPIsNeeded"
  2117.     Debug-Output " "
  2118.  
  2119.     Shell $(NwSubsInf), GetTotalAdapterList
  2120.  
  2121.     Set OdiProductNameList            = $($R0)
  2122.     Set OdiTitleList                    = $($R1)
  2123.     Set OdiCardList                    = $($R2)
  2124.     Set NumberOdiAdapters            = $($R3)
  2125.     Set NdisProductNameList            = $($R4)
  2126.     Set NdisTitleList                    = $($R5)
  2127.     Set NdisCardList                    = $($R6)
  2128.     Set NumberNdisAdapters            = $($R7)
  2129.     Set ODINSUPCardNumber            = $($R8)
  2130.     Set NetWareIPCardNumList        = $($R9)
  2131.     Set NumberNetWareIPAdapters    = $($R10)
  2132.  
  2133.     ;
  2134.     ; Is there an ODI driver installed?
  2135.     ;
  2136.     ifint $(NumberOdiAdapters) >= 1
  2137.         ;
  2138.         ;  turn on ODINSUP
  2139.         ;
  2140.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\Odinsup" $(MAXIMUM_ALLOWED) KeyProduct
  2141.         ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2142.             Set KeyValueList = {"Start",$(NoTitle),$(!REG_VT_DWORD),2}
  2143.             SetRegValue $(KeyProduct) $(KeyValueList)
  2144.             CloseRegKey $(KeyProduct)
  2145.         Endif
  2146.         ;
  2147.         ;  turn on Odiload
  2148.         ;
  2149.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\Odiload" $(MAXIMUM_ALLOWED) KeyProduct
  2150.         ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2151.             Set KeyValueList = {"Start",$(NoTitle),$(!REG_VT_DWORD),2}
  2152.             SetRegValue $(KeyProduct) $(KeyValueList)
  2153.             CloseRegKey $(KeyProduct)
  2154.         Endif
  2155.         ;
  2156.         ;  turn off VMLID
  2157.         ;
  2158.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\OdiVMLID" $(MAXIMUM_ALLOWED) KeyProduct
  2159.         ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2160.             Set KeyValueList = {"Start",$(NoTitle),$(!REG_VT_DWORD),4}
  2161.             SetRegValue $(KeyProduct) $(KeyValueList)
  2162.             CloseRegKey $(KeyProduct)
  2163.         Endif
  2164.     Else
  2165.         ;
  2166.         ;  turn off ODINSUP
  2167.         ;
  2168.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\Odinsup" $(MAXIMUM_ALLOWED) KeyProduct
  2169.         Ifstr $(KeyProduct) != $(KeyNull)
  2170.             Set KeyValueList = {"Start",$(NoTitle),$(!REG_VT_DWORD),4}
  2171.             SetRegValue $(KeyProduct) $(KeyValueList)
  2172.             CloseRegKey $(KeyProduct)
  2173.         Endif
  2174.         ;
  2175.         ;  turn off Odiload
  2176.         ;
  2177.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\Odiload" $(MAXIMUM_ALLOWED) KeyProduct
  2178.         Ifstr $(KeyProduct) != $(KeyNull)
  2179.             Set KeyValueList = {"Start",$(NoTitle),$(!REG_VT_DWORD),4}
  2180.             SetRegValue $(KeyProduct) $(KeyValueList)
  2181.             CloseRegKey $(KeyProduct)
  2182.         Endif
  2183.         ;
  2184.         ;  turn on VMLID
  2185.         ;
  2186.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\OdiVMLID" $(MAXIMUM_ALLOWED) KeyProduct
  2187.         ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2188.             Set KeyValueList = {"Start",$(NoTitle),$(!REG_VT_DWORD),2}
  2189.             SetRegValue $(KeyProduct) $(KeyValueList)
  2190.             CloseRegKey $(KeyProduct)
  2191.         Endif
  2192.     Endif
  2193.  
  2194.     Debug-Output " "
  2195.     Debug-Output "NWSUBS.INF:  Exiting function CheckIfODINSUPIsNeeded"
  2196.     Debug-Output " "
  2197.  
  2198.     Return
  2199.  
  2200.  
  2201. ;
  2202. ;
  2203. ; ===================================================================================
  2204. ;
  2205. ;                         NWConfigureSourceRouting
  2206. ; ===================================================================================
  2207. ;
  2208. ; Section to ask the user if they want source routing.
  2209. ;
  2210. ; INPUT:
  2211. ;     $($0)    "ODI" or "Novell"
  2212. ;
  2213. ; OUTPUT:
  2214. ;     NONE
  2215. ;
  2216. ; ===================================================================================
  2217.  
  2218. [NWConfigureSourceRouting]
  2219.     read-syms InstallOption$(!STF_LANGUAGE)
  2220.     read-syms NwBaseVars
  2221.     read-syms OdiVars
  2222.  
  2223.     set SourceRoutingService = $(!NTN_ServiceBase)"\OdiSourceRouting"
  2224.     OpenRegKey $(!REG_H_LOCAL) "" $(SourceRoutingService) $(MAXIMUM_ALLOWED) KeySetup
  2225.     Ifstr(i) $(KeySetup) != ""
  2226.  
  2227.         set DlgType      = "MessageBox"
  2228.         set STF_MB_TITLE = $(UseSourceRouteTitle)
  2229.         set STF_MB_TEXT  = $(UseSourceRouteText)
  2230.         set STF_MB_TYPE  = 3
  2231.         set STF_MB_ICON  = 1
  2232.         set STF_MB_DEF    = 2
  2233.     
  2234.         GetRegValue $(KeySetup) "Start" StartValueList
  2235.         set StartValue = *($(StartValueList), 4)
  2236.  
  2237.         Ifint $(StartValue) != 4
  2238.             set STF_MB_DEF = 1            
  2239.         Endif
  2240.  
  2241.         ui start "SourceRoutingBox"
  2242.     
  2243.         Ifstr(i) $(DLGEVENT) == "YES"
  2244.             set StartValue = 2
  2245.         Else
  2246.             set StartValue = 4
  2247.         Endif
  2248.     
  2249.         SetRegValue $(KeySetup) {Start,$(NoTitle),$(!REG_VT_DWORD), $(StartValue)}
  2250.         Debug-Output "NWSUBS.INF: Source Routing Start value set to "$(StartValue)
  2251.         CloseRegKey $(KeySetup)
  2252.     Endif
  2253.  
  2254.     Return
  2255.  
  2256.  
  2257. ;*************************************************************************
  2258. ;
  2259. ;        SECTION:        InstallEx-ServiceGroupOrder
  2260. ;
  2261. ;        PURPOSE:        Called at install time and at bind time to install the
  2262. ;                        NetWare Services in the Service Group Order.
  2263. ;
  2264. ;        ARGUMENTS:    None
  2265. ;
  2266. ;        RETURNS:        None
  2267. ;
  2268. ;        REFERENCES:    None
  2269. ;
  2270. ;        MODIFIES:    None
  2271. ;
  2272. ;*************************************************************************
  2273. [InstallEx-ServiceGroupOrder]
  2274.  
  2275.     StartWait
  2276.     read-syms NwBaseVars
  2277.  
  2278.     Set ValueName        = "List"
  2279.     Set Status            = STATUS_SUCCESSFUL
  2280.     Set Predecessor    = $($0)
  2281.     Set ListToAdd        = $($1)
  2282.  
  2283.     Debug-Output "NWSUBS.INF:  ListToAdd is "$(ListToAdd)
  2284.  
  2285.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\ServiceGroupOrder" $(MAXIMUM_ALLOWED) KeySgo
  2286.     Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2287.         GetRegValue $(KeySgo) $(ValueName) SgoValue
  2288.         Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  2289.             Debug-Output "NWSUBS.INF:  Can't get list value from ServiceGroupOrder"
  2290.             set Status = STATUS_FAILED
  2291.             Goto IEX_Sgo_Return
  2292.         Endif
  2293.     else
  2294.         Debug-Output "NWSUBS.INF:  Can't open ServiceGroupOrder key"
  2295.         set Status = STATUS_FAILED
  2296.         Goto IEX_Sgo_Return
  2297.     Endif
  2298.  
  2299.     Set SgoList = *($(SgoValue), 4)
  2300.     Set NewList = {}
  2301.  
  2302.     ForListDo $(SgoList)
  2303.         Set SgoItem = $($)
  2304.         Ifstr(i) $(SgoItem) == $(Predecessor)
  2305.             Set NewList = >($(NewList), $(SgoItem))
  2306.  
  2307.             ;
  2308.             ; Add all NetWare names to the list here
  2309.             ;
  2310.  
  2311.             ForListDo $(ListToAdd)
  2312.                 Set NewList = >($(NewList), $($))
  2313.             EndForListDo
  2314.         else
  2315.             set InListToAdd = 0
  2316.             ForListDo $(ListToAdd)
  2317.                 set SvcItem = $($)
  2318.  
  2319.                 ifstr(i) $(SgoItem) == $(SvcItem)
  2320.                     ;
  2321.                     ; The SgoItem is in ListToAdd.  Don't add it now.  It will
  2322.                     ; be added with the ListToAdd when predecessor is found.
  2323.                     ;
  2324.  
  2325.                     set InListToAdd = 1
  2326.                 endif
  2327.  
  2328.             EndForListDo
  2329.  
  2330.             ifint $(InListToAdd) == 0
  2331.                 set NewList = >($(NewList), $(SgoItem))
  2332.             endif
  2333.         endif
  2334.     EndForListDo
  2335.  
  2336.     SetRegValue $(KeySgo) {$(ValueName), $(NoTitle), $(!REG_VT_MULTI_SZ), $(NewList)}
  2337.     Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  2338.         Debug-Output "NWSUBS.INF:  Can't update ServiceGroupOrder value"
  2339.         set Status = STATUS_FAILED
  2340.     Endif
  2341.  
  2342.     CloseRegKey $(KeySgo)
  2343.  
  2344. IEX_Sgo_Return = +
  2345.     Return $(Status)
  2346.  
  2347.  
  2348. ; ===================================================================================
  2349. ;
  2350. ; SECTION: GetLanguageDir        Gets the NLS directory from the registry
  2351. ;
  2352. ; INPUT: NONE
  2353. ;
  2354. ; OUTPUT: $($R0)    Language directory if found
  2355. ;
  2356. ; ===================================================================================
  2357. [GetLanguageDir]
  2358.     set NLSDirName = ""
  2359.     set NovellParameters = $(!NTN_ServiceBase)"\Novell\Parameters"
  2360.     OpenRegKey $(!REG_H_LOCAL) "" $(NovellParameters) $(MAXIMUM_ALLOWED) KeyNovellParameters
  2361.     ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2362.         GetRegValue $(KeyNovellParameters) "NWLanguage" NWLanguageList
  2363.         ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2364.             set ValueType = *($(NWLanguageList), 3)
  2365.             ifstr(i) $(ValueType) == $(!REG_VT_SZ)
  2366.                 set NLSDirName = *($(NWLanguageList), 4)
  2367.             else-ifstr(i) $(ValueType) == $(!REG_VT_MULTI_SZ)
  2368.                 set LanguageList = *($(NWLanguageList), 4)
  2369.                 set NLSDirName = *($(LanguageList), 1)
  2370.             endif
  2371.         else
  2372.             goto nolanguage
  2373.         endif
  2374.         CloseRegKey $(KeyNovellParameters)
  2375.     else
  2376.         goto nolanguage
  2377.     Endif
  2378.  
  2379. nolanguage = +
  2380.     
  2381.     ifstr(i) $(NLSDirName) == ""
  2382.         set NLSDirName = "English"
  2383.     endif
  2384.  
  2385.     return $(NLSDirName)
  2386.  
  2387. ; ====================================================================================
  2388. ;
  2389. ; SECTION: GetNTVersion        Gets the NT major and minor versions from the registry
  2390. ;
  2391. ; INPUT: NONE
  2392. ;
  2393. ; OUTPUT: $($R0)    =     MajorNTVersion    
  2394. ;       $($R1)    =     MinorNTVersion    
  2395. ;
  2396. ; ====================================================================================
  2397. [GetNTVersion]
  2398.     set CurrentVersion = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion"
  2399.     OpenRegKey $(!REG_H_LOCAL) "" $(CurrentVersion) $(MAXIMUM_ALLOWED) CurrentVersionKey
  2400.     ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2401.         GetRegValue $(CurrentVersionKey) "CurrentVersion" VersionList
  2402.         ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2403.             set VersionListData = *($(VersionList), 4)
  2404.             Split-string $(VersionListData) "." SplitVersionList
  2405.             Set NTMajorVersion = *($(SplitVersionList), 1)
  2406.             Set NTMinorVersion = *($(SplitVersionList), 3)
  2407.  
  2408.             Debug-OutPut "NWSUBS.INF: Windows NT current version is "$(VersionListData)
  2409.             Debug-OutPut "NWSUBS.INF: Windows NT Major version is "$(NTMajorVersion)
  2410.             Debug-OutPut "NWSUBS.INF: Windows NT Minor version is "$(NTMinorVersion)
  2411.         else
  2412.             Debug-Output "NWSUBS.INF:  Error getting NT version"
  2413.         endif
  2414.         CloseRegKey $(CurrentVersionKey)
  2415.     else
  2416.         Debug-Output "NWSUBS.INF:  Error opening "$(CurrentVersion)
  2417.     endif
  2418.     return $(NTMajorVersion) $(NTMinorVersion)
  2419.  
  2420.  
  2421.  
  2422. ;----------InstallOptionENG-------------------------------------------------
  2423. ;
  2424. ; InstallOptionENG:
  2425. ;
  2426. ;     This section has all of the strings that are displayed on the screen.
  2427. ;        They are seperated so that the file can be easily transtated.
  2428. ;
  2429. ;------------------------------------------------------------------------
  2430. [InstallOptionENG]
  2431.     UseSourceRouteTitle = "Configure ODI Source Routing"
  2432.  
  2433.     UseSourceRouteText = "Use ODI Source Routing support?"
  2434.  
  2435.     LoadDisk3Text = "Please load the Novell IntranetWare Client for Windows NT "+
  2436.         "disk 3 into drive "
  2437.  
  2438.  
  2439. [DoAskSourceENG]
  2440.     NetWareDlgText = "Please enter the full path to the Novell IntranetWare "+
  2441.         "Client for Windows NT distribution files.  Then choose Continue."
  2442.     
  2443.     NetWareLANDlgText = "Please enter the full path to the IntranetWare Client "+
  2444.         "for Windows NT distribution files.  If installing from floppy "+
  2445.         "diskette, enter the floppy drive to use and the system will "+
  2446.         "prompt you for the correct diskette."
  2447.  
  2448.  
  2449. [OdinsupDlgENG]
  2450.     DlgType = "RadioCombination"
  2451.     DlgTemplate = "ONELIST"
  2452.     Caption = "NetWare NDIS over ODI (ODINSUP) Setup"
  2453.     Label1 = "Installed ODI Adapters"
  2454.     EditTextIn = ""
  2455.     EditTextLim = ""
  2456.     CBOptionsGreyed = {}
  2457.     HelpContext = $(IDH_NETWARENDISODI)
  2458.     ComboListItemsIn = { OdiTitleList }
  2459.     ComboListItemsOut = { DefaultOdiTitle }
  2460.     NotifyFields = { "NO" }
  2461.  
  2462. [IPXBindDlgENG]
  2463.     DlgType = "RadioCombination"
  2464.     DlgTemplate = "ONELIST"
  2465.     Caption = "NetWare IPX Bind"
  2466.     Label1 = "ODI Adapter to bind IPX to"
  2467.     EditTextIn = ""
  2468.     EditTextLim = ""
  2469.     CBOptionsGreyed = {}
  2470.     HelpContext = $(IDH_NETWAREIPXBIND)
  2471.     ComboListItemsIn = { OdiTitleList }
  2472.     ComboListItemsOut = { DefaultOdiTitle }
  2473.     NotifyFields = { "NO" }
  2474.  
  2475. [IPXDlgENG]
  2476.     DlgType = "RadioCombination"
  2477.     Label1 = "Enter the board and the default frame type to bind to IPX"
  2478.     Label2 = "Board"
  2479.     Label3 = "Frame"
  2480.     DlgTemplate = "IPXFRAME"
  2481.     Caption = "IPX Bind Parameters"
  2482.     EditTextIn = ""
  2483.     EditTextLim = ""
  2484.     CBOptionsGreyed = {}
  2485.     RadioOptionsGreyed = {}
  2486.     HelpContext = $(IDH_NETWAREIPXBIND)
  2487.     ComboOut = $(FrameListDefault)
  2488.     ComboListItemsIn = { FrameList }
  2489.     ComboListItemsOut = { ComboOut }
  2490.     NotifyFields = { "NO" }
  2491.  
  2492. [NewFrameTypeDlgENG]
  2493.     Label1 = "WARNING: Entering a non-standard frametype could prevent this workstation from communicating with the network."
  2494.     Label2 = "Frame Type"
  2495.     Label3 = "Protocol Identifier"
  2496.     ICON = BANG
  2497.     DlgType = "RadioCombination"
  2498.     DlgTemplate = "DLG_NETWORKPROTOCOL"
  2499.     Caption = "Network Protocol"
  2500.     EditTextIn = { $(NewFrameTypeName), $(ProtocolID) }
  2501.     EditTextLim = { "", 12 }
  2502.     CBOptionsGreyed = {}
  2503.     RadioOptionsGreyed = {}
  2504.     HelpContext = $(IDH_NETWORKPROTOCOL)
  2505.     ComboOut = {}
  2506.     ComboListItemsIn = {}
  2507.     ComboListItemsOut = {}
  2508.     NotifyFields = {}
  2509.  
  2510. [AdvancedIPXSPXDlgENG]
  2511.     DlgType = "RadioCombination"
  2512.     DlgTemplate = "DLG_IPXSPXPARAMETERS"
  2513.     Caption = "IPX/SPX Parameters"
  2514.     EditTextLim = { "5", "1", "2", "5", "10", "10", "10" }
  2515.     CBOptionsGreyed = {}
  2516.     HelpContext = $(IDH_IPXSPXPARMS)
  2517.  
  2518.  
  2519. ; ===================================================================================
  2520. ;
  2521. ; ===================================================================================
  2522.  
  2523. [DriverTable]
  2524.     NE2000,      ODI_NE2000
  2525.     NE1000,      ODI_NE2000
  2526.     AM1500T,     ODI_NE1500T
  2527.     AM1500T,     ODI_M1500
  2528.     AM1500T,     ODI_NE2100
  2529.     NONE,        ODI_M2100
  2530.     IBMTOK,      ODI_IBMTOK1    
  2531.     IBMTOK,      ODI_NTR2000
  2532.     EWORK,       ODI_EWRK3
  2533.     HP27247B,      ODI_HP27247B
  2534.     HP27252A,      ODI_HP27252A
  2535.     J2573A,        ODI_HPJ2573A
  2536.     NONE,        ODI_MADGEODI
  2537.     NONE,        ODI_SMC8216
  2538.     SMC8416,       ODI_SMC8416
  2539.     NONE,        ODI_SMC8115T
  2540.     NONE,        ODI_SMC8115T_A
  2541.     TC$4045e,      ODI_TC4045
  2542.     TC$4046e,      ODI_TC4046
  2543.     NE2000MCA,    ODI_NE2
  2544.     NONE,            ODI_NE232
  2545.     IBMTOKMC,    ODI_IBMTOKMC
  2546.     NONE,            ODI_MADGEODIMC
  2547.     NONE,            ODI_SMC8216MC
  2548.     NONE,            ODI_SMC8416MC
  2549.     NONE,            ODI_SMC8115TMC
  2550.     NONE,            ODI_SMC8115T_AMC
  2551.     NONE,            ODI_TCTOKHMC
  2552.     NE3200,      ODI_NE3200
  2553.     NONE,        ODI_ES3210
  2554.     NONE,            ODI_EWRK3EISA
  2555.     NONE,            ODI_HP27247BEISA
  2556.     NONE,            ODI_HP27252AEISA
  2557.     NONE,            ODI_HPJ2577AEISA
  2558.     NONE,            ODI_MADGEODIEISA
  2559.     NONE,            ODI_NE3300EISA
  2560.     NONE,            ODI_SMC8216EISA
  2561.     NONE,            ODI_SMC8416EISA
  2562.     NONE,            ODI_SMC8115TEISA
  2563.     NONE,            ODI_SMC8115T_AEISA
  2564.     SMC8232,        ODI_SMC8232EISA
  2565.     NONE,            ODI_SMC8332EISA
  2566.     NONE,            ODI_SMC9232
  2567.     NONE,            ODI_TCE32ESHEISA
  2568.     NONE,            ODI_TC4045EISA
  2569.     NONE,            ODI_TC4046EISA
  2570.