home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 March / CHIPCD_3_98.iso / software / testsoft / exchange / connect / msmcon / bin / oemsetup.inf < prev    next >
INI File  |  1997-08-25  |  105KB  |  3,135 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     ISA
  5.     EISA
  6.     MCA
  7.     "Jazz-Internal Bus"
  8. [LanguagesSupported]
  9.     ENG
  10.  
  11. [UiVars]
  12.   WANRootDir         = ""
  13.   DefWANRootDir = "C:\WAN"
  14.   WANRootDir = $(DefWANRootDir)
  15.   !ProductDir = ""
  16.   SubroutineInf   = $(!STF_WINDOWSSYSPATH)\SUBROUTN.INF
  17.  
  18. [Registry Constants]
  19.   MaskAllAccess    = 33554432  ; 0x2000000
  20.   PathRegKeyName   = "System\CurrentControlSet\Control"+
  21.                      "\Session Manager\Environment"
  22.  
  23.  
  24. [FreeSpaceVars]
  25.   STF_VolList     = {} ? $(!LIBHANDLE) GetHardDriveLetters
  26.   STF_VolFreeList = {} ? $(!LIBHANDLE) GetHardDriveFreeSpace
  27.  
  28.  
  29. [Options]
  30.     EiconEC
  31.     EiconHSI
  32.     EiconDPNA
  33.     EiconMPNA
  34.     EiconIMC
  35.     EiconECMC
  36.     EiconHSIMC
  37.     EiconIMCMC
  38.     EiconMPNAMC
  39. [OptionsTextENG]
  40.     EiconEC = "Eicon Card (EC)"
  41.     EiconHSI   = "Eicon Card (HSI)"
  42.     EiconDPNA  = "Eicon Card (DPNA)"
  43.     EiconMPNA  = "Eicon Card (MPNA)"
  44.     EiconIMC   = "Eicon Card (IMC)"
  45.     EiconECMC  = "Eicon Card (EC/MC)"
  46.     EiconHSIMC = "Eicon Card (HSI/MC)"
  47.     EiconIMCMC = "Eicon Card (IMC/MC)"
  48.     EiconMPNAMC = "Eicon Card (MPNA/MC)"
  49.  
  50.  
  51. [LoadSetupLibrary1stTime]
  52.   set !LIBHANDLE = ""
  53.   LoadLibrary "x" $(!STF_CWDDIR)\setupdll.dll !LIBHANDLE
  54.   exit
  55.  
  56.  
  57. [LoadSetupLibrary]
  58.   set !LIBHANDLE = ""
  59.   LoadLibrary "x" $(!STF_WINDOWSSYSPATH)\setupdll.dll !LIBHANDLE
  60.   exit
  61.  
  62. [FreeSetupLibrary]
  63.   FreeLibrary $(!LIBHANDLE)
  64.   set !LIBHANDLE = ""
  65.   exit
  66.  
  67.  
  68. [LoadDlgLibrary]
  69.   set !DLGHANDLE = ""
  70.   LoadLibrary "x" $(!STF_CWDDIR)$(DialogLibrary) !DLGHANDLE
  71.   exit
  72.  
  73. [FreeDlgLibrary]
  74.   FreeLibrary $(!WANDLGHANDLE)
  75.   set !DLGHANDLE = ""
  76.   exit
  77.  
  78.  
  79. [LoadServiceLibrary]
  80.   set !SVCHANDLE = ""
  81.   LoadLibrary "x" $(!STF_WINDOWSSYSPATH)\ECUTL_NT.DLL !SVCHANDLE
  82.   exit
  83.  
  84. [FreeServiceLibrary]
  85.   FreeLibrary $(!SVCHANDLE)
  86.   set !SVCHANDLE = ""
  87.   exit
  88.  
  89.  
  90.  
  91. [IRQ_Level]
  92. IRQ_2 = "2"
  93. IRQ_3 = "3"
  94. IRQ_4 = "4"
  95. IRQ_5 = "5"
  96. IRQ_6 = "6"
  97. IRQ_7 = "7"
  98. ;IRQ_8 = "8"
  99. ;IRQ_9 = "9"
  100. IRQ_10 = "10"
  101. IRQ_11 = "11"
  102. IRQ_12 = "12"
  103. ;IRQ_13 = "13"
  104. IRQ_14 = "14"
  105. IRQ_15 = "15"
  106. [IOAddrChoices]
  107. ;
  108. ; Only 380 & 390 are valid for NA & DNA
  109. ;
  110. ;
  111. IO_632 = "0x278", 632
  112. IO_640 = "0x280", 640
  113. IO_888 = "0x378", 888
  114. IO_896 = "0x380", 896
  115. IO_904 = "0x388", 904
  116. IO_912 = "0x390", 912
  117. IO_920 = "0x398", 920
  118. IO_1656= "0x678", 1656
  119. IO_1664 = "0x680", 1664
  120. IO_1912 = "0x778", 1912
  121. IO_1920 = "0x780", 1920
  122. IO_1928 = "0x788", 1928
  123. IO_1936 = "0x790", 1936
  124. IO_1944 = "0x798", 1944
  125. [WinAddrChoices]
  126. WinAdd_786432 = "0xc0000", 786432
  127. WinAdd_794624 = "0xc2000", 794624
  128. WinAdd_802816 = "0xc4000", 802816
  129. WinAdd_811008 = "0xc6000", 811008
  130. WinAdd_819200 = "0xc8000", 819200
  131. WinAdd_827392 = "0xca000", 827392
  132. WinAdd_835584 = "0xcc000", 835584
  133. WinAdd_843776 = "0xce000", 843776
  134. WinAdd_851968 = "0xd0000", 851968
  135. WinAdd_860160 = "0xd2000", 860160
  136. WinAdd_868352 = "0xd4000", 868352
  137. WinAdd_876544 = "0xd6000", 876544
  138. WinAdd_884736 = "0xd8000", 884736
  139. WinAdd_892928 = "0xda000", 892928
  140. WinAdd_901120 = "0xdc000", 901120
  141. WinAdd_909312 = "0xde000", 909312
  142.  
  143. ; Below section is used to interface with the getcardinfo to the 
  144. ; configurator -> see FileConstants Definition
  145. [Card_Request_Type]
  146. ID_CARD_Number        = 0064
  147. ID_CARD_Type          = 0065
  148. ID_CARD_Module        = 0067
  149. ID_CARD_IO            = 0068
  150. ID_CARD_IRQ           = 006A
  151. ID_CARD_MemSeg        = 006E
  152. ID_CARD_NbrPorts      = 006B
  153. ID_CARD_AutoActPort   = 006C
  154. ID_CARD_LLCSupport    = 00CA
  155. ID_CARD_Slot          = 006D
  156.  
  157.                
  158.  
  159. [FileConstants]
  160. Networkstr = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards"
  161. NetworkCardKeyName      = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards"
  162.  
  163. WANDialogLibrary   = "WAN.SRL"
  164.  
  165. NTN_ServiceBase    = "System\CurrentControlSet\Services"
  166.  
  167. UtilityInf      = $(!STF_WINDOWSSYSPATH)"\UTILITY.INF"
  168. SubroutineInf   = $(!STF_WINDOWSSYSPATH)"\SUBROUTN.INF"
  169. DialogLibrary = "ECSDLC.SRL"
  170. ParamInf        = "NCPARAM.INF"
  171. SoftwareType    = "driver"
  172. Exit_Code       = 0
  173. NetEventDLL     = "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\Drivers\Ecnb.sys"
  174. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  175. Manufacturer    = "Eicon"
  176. ProductMajorVersion     = "3"
  177. ProductMinorVersion     = "1"
  178. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  179. ProductSoftwareName     = "Ecnb"
  180. ProductSoftwareTitle    = "EiconCard Driver"
  181. ProductSoftwareImagePath = "\SystemRoot\System32\Drivers\Ecnb.sys"
  182.  
  183. ; The following WAN definitions must match with the ones defined in
  184. ; the oemsetnt.inf used to install the WAN Configurator software,
  185. ; otherwise software detection will not be possible
  186.  
  187. WanProductSoftwareName        = "WAN Services"
  188. WanProductSoftwareTitle       = "WAN Services for Windows NT"
  189. WanProductMajorVersion        = "3"
  190. WanProductMinorVersion        = "1"
  191. WanProductVersion             = $(WanProductMajorVersion)"."$(WanProductMinorVersion)
  192. WanProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(WanProductSoftwareName)"\CurrentVersion"
  193. WanProductSoftwareDescription = "WAN Services for Windows NT"
  194. WanSoftwareType = "services"
  195.  
  196. ;NetRuleSoftwareType     = "ecnbSys ndisDriver ecnbDriver"
  197. NetRuleSoftwareType     = "ecnbSys ecnbDriver"
  198. NetRuleSoftwareUse      = $(SoftwareType)
  199. NetRuleSoftwareBindForm = """EcnbSys"" yes no container"
  200. ;NetRuleSoftwareBindForm = """EcnbSys"" yes yes simple"
  201. NetRuleSoftwareClass    = {"ecnbDriver basic"}
  202. ProductHardwareName             = "Ecnb"
  203. ProductHardwareEiconECTitle     = "Eicon Card (EC)"
  204. ProductHardwareEiconHSITitle    = "Eicon Card (HSI)"
  205. ProductHardwareEiconDPNATitle   = "Eicon Card (DPNA)"
  206. ProductHardwareEiconMPNATitle   = "Eicon Card (MPNA)"
  207. ProductHardwareEiconIMCTitle    = "Eicon Card (IMC)"
  208. ProductHardwareEiconNATitle     = "Eicon Card (NA)"
  209. ;ProductHardwareEiconDNATitle    = "Eicon Card (DNA)"
  210. ProductHardwareEiconECMCTitle   = "Eicon Card (EC/MC)"
  211. ProductHardwareEiconHSIMCTitle  = "Eicon Card (HSI/MC)"
  212. ProductHardwareEiconIMCMCTitle  = "Eicon Card (IMC/MC)"
  213. ProductHardwareEiconMPNAMCTitle = "Eicon Card (MPNA/MC)"
  214.  
  215. NetRuleHardwareEiconECType      = "eiconEC eiconECAdapter"
  216. NetRuleHardwareEiconHSIType     = "eiconHSI eiconHSIAdapter"
  217. NetRuleHardwareEiconDPNAType    = "eiconDPNA eiconDPNAAdapter"
  218. NetRuleHardwareEiconMPNAType    = "eiconMPNA eiconMPNAAdapter"
  219. NetRuleHardwareEiconIMCType     = "eiconIMC eiconIMCAdapter"
  220. NetRuleHardwareEiconNAType      = "eiconNA eiconNAAdapter"
  221. ;NetRuleHardwareEiconDNAType     = "eiconDNA eiconDNAAdapter"
  222. NetRuleHardwareEiconECMCType    = "eiconECMC eiconECMCAdapter"
  223. NetRuleHardwareEiconHSIMCType   = "eiconHSIMC eiconHSIMCAdapter"
  224. NetRuleHardwareEiconIMCMCType   = "eiconIMCMC eiconIMCMCAdapter"
  225. NetRuleHardwareEiconMPNAMCType  = "eiconMPNAMC eiconMPNAMCAdapter"
  226.  
  227. NetRuleHardwareBindForm         = " yes yes container"
  228.  
  229. NetRuleHardwareEiconECClass      = {"eiconECAdapter basic"}
  230. NetRuleHardwareEiconHSIClass     = {"eiconHSIAdapter basic"}
  231. NetRuleHardwareEiconDPNAClass    = {"eiconDPNAAdapter basic"}
  232. NetRuleHardwareEiconMPNAClass    = {"eiconMPNAAdapter basic"}
  233. NetRuleHardwareEiconIMCClass     = {"eiconIMCAdapter basic"}
  234. NetRuleHardwareEiconNAClass      = {"eiconNAAdapter basic"}
  235. ;NetRuleHardwareEiconDNAClass     = {"eiconDNAAdapter basic"}
  236. NetRuleHardwareEiconECMCClass    = {"eiconECMCAdapter basic"}
  237. NetRuleHardwareEiconHSIMCClass   = {"eiconHSIMCAdapter basic"}
  238. NetRuleHardwareEiconIMCMCClass   = {"eiconIMCMCAdapter basic"}
  239. NetRuleHardwareEiconMPNAMCClass  = {"eiconMPNAMCAdapter basic"}
  240.  
  241. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  242. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  243.  
  244. ;CardChoiceList = ^(CardChoices,1)
  245. !CardRequestList = ^(Card_Request_Type,1)
  246.  
  247. WinBaseAddressList  = ^(WinAddrChoices, 1)
  248. WinBaseAddressValue = ^(WinAddrChoices, 2)
  249. IOBaseAddressList = ^(IOAddrChoices, 1)
  250. IOBaseAddressValue = ^(IOAddrChoices, 2)
  251. IRQ_List = ^(IRQ_Level, 1)
  252. WANRootDir = $(!STF_WINDOWSSYSPATH)
  253.  
  254.  
  255. [GeneralConstants]
  256. from      = ""
  257. to        = ""
  258. ExitCodeOk     = 0
  259. ExitCodeCancel = 1
  260. ExitCodeFatal  = 2
  261. KeyNull         = ""
  262. MAXIMUM_ALLOWED   = 33554432
  263. RegistryErrorIndex = NO_ERROR
  264. KeyProduct      = ""
  265. KeyParameters   = ""
  266. TRUE            = 1
  267. FALSE           = 0
  268. NoTitle            = 0
  269. ExitState   = "Active"
  270. OldVersionExisted = $(FALSE)
  271. DriverPath      = $(!STF_NTPATH)\drivers
  272. [FileConstantsENG]
  273. ProCaption   = "WAN Services for NT Setup"
  274. ProCancel    = "Cancel"
  275. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  276.            "Are you sure you want to cancel copying files?"
  277. ProCancelCap = "Network Setup Message"
  278. ProText1     = "Copying:"
  279. ProText2     = "To:"
  280.  
  281. FunctionTitleEiconEC = "Eicon Card EC/PC Adapter"
  282. FunctionTitleEiconHSI = "Eicon Card HSI/PC Adapter"
  283. FunctionTitleEiconDPNA = "Eicon Card DPNA/PC Adapter"
  284. FunctionTitleEiconMPNA = "Eicon Card MPNA/PC Adapter"
  285. FunctionTitleEiconIMC = "Eicon Card IMC/PC Adapter"
  286. FunctionTitleEiconNA = "Eicon Card NA/PC Adapter"
  287. ;FunctionTitleEiconDNA = "Eicon Card DNA/PC Adapter"
  288. FunctionTitleEiconECMC = "Eicon Card EC/MC Adapter"
  289. FunctionTitleEiconHSIMC = "Eicon Card HSI/MC Adapter"
  290. FunctionTitleEiconIMCMC = "Eicon Card IMC/MC Adapter"
  291. FunctionTitleEiconMPNAMC = "Eicon Card MPNA/MC Adapter"
  292. ProductSoftwareDescription      = "Eicon Card Driver"
  293. ProductHardwareEiconECDescription = "Eicon Card EC/PC Adapter"
  294. ProductHardwareEiconHSIDescription = "Eicon Card HSI/PC Adapter"
  295. ProductHardwareEiconDPNADescription = "Eicon Card DPNA/PC Adapter"
  296. ProductHardwareEiconMPNADescription = "Eicon Card MPNA/PC Adapter"
  297. ProductHardwareEiconIMCDescription = "Eicon Card IMC/PC Adapter"
  298. ProductHardwareEiconNADescription = "Eicon Card NA/PC Adapter"
  299. ;ProductHardwareEiconDNADescription = "Eicon Card DNA/PC Adapter"
  300. ProductHardwareEiconECMCDescription = "Eicon Card EC/MC Adapter"
  301. ProductHardwareEiconHSIMCDescription = "Eicon Card HSI/MC Adapter"
  302. ProductHardwareEiconIMCMCDescription = "Eicon Card IMC/MC Adapter"
  303. ProductHardwareEiconMPNAMCDescription = "Eicon Card MPNA/MC Adapter"
  304.  
  305. [DialogConstantsENG]
  306. Help        = "&Help"
  307. Exit        = "Cancel"
  308. OK          = "OK"
  309. HelpContext = ""
  310. Continue    = "Continue"
  311. Cancel      = "Cancel"
  312. [date]
  313.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  314.  
  315. [ShellCommands]
  316.  
  317.   install LoadSetupLibrary1stTime      ; happens to be %SystemRoot%\system32
  318.                        ; if not set otherwise in this script
  319.  
  320.   ifstr(i) $(STF_RANFROM) != ""        ; but we want it to point to where we
  321.     set !STF_CWDDIR = $(STF_RANFROM)   ; ran our own (WAN) setup.exe
  322.   endif
  323.  
  324.   set-subst LF = "\n"
  325.   read-syms GeneralConstants
  326.   read-syms FileConstants
  327.  
  328.   install FreeSetupLibrary
  329.  
  330. ; Got some unknown problem here, load library directly seems to work
  331. ; if time permits, investigate later.
  332.  
  333. ;  install LoadDlgLibrary
  334.  
  335.  
  336.     ; Append a trailing backslash if necessary
  337.  
  338.     Split-String $(!SOURCEDIR) "\" _DirSplit
  339.     QueryListSize _DirSize $(_DirSplit)
  340.  
  341.     ifstr(i) *( $(_DirSplit), $(_DirSize) ) != "\"
  342.       set !SOURCEDIR = $(!SOURCEDIR)"\"
  343.     endif
  344.  
  345.   set !DLGHANDLE = ""
  346.  
  347.   LoadLibrary "" $(!SOURCEDIR)"WAN.SRL" !DLGHANDLE
  348.  
  349.   ifstr(i) $(!DLGHANDLE) == ""
  350.     shell $(!STF_WINDOWSSYSPATH)"\SUBROUTN.INF" SetupMessage $(!STF_LANGUAGE) +
  351.       "WARNING" +
  352.       "Couldn't load "$(!DialogLibrary)"!  This library contains all"$(!LF)+
  353.       "the dialogs needed by the "WAN Services for Windows NT" Setup program."$(!LF)+
  354.       $(!LF)+
  355.       "Please find this file and copy it into the same directory"$(!LF)+
  356.       "from which you ran Setup."
  357.     goto End
  358.   endif
  359.  
  360. DestPath =+
  361.   shell "" DoDestPath
  362.   set Status = $($R0)
  363. Return $(Status) 
  364.  
  365. [DoDestPath]
  366. BeginDoDestPath =+
  367.   set Status = STATUS_FAILED
  368.   read-syms FileConstants
  369.   read-syms UiVars
  370.   detect    UiVars
  371.   ; must be after UIVARS
  372.   set !WANRootDir = $(WANRootDir)
  373.   read-syms DestPathDlg
  374.  
  375.   ui start $(DlgTemplate) $(!DLGHANDLE)
  376.  
  377.   ifstr(i) $(DLGEVENT) == "Continue"
  378.     ;
  379.     ; Check path validity.
  380.     ;
  381.     install LoadSetupLibrary
  382.     ifstr(i) $(!LIBHANDLE) != ""
  383.       LibraryProcedure IsFullPath $(!LIBHANDLE) +
  384.                CheckPathFullPathSpec $(EditTextOut)
  385.     endif
  386.  
  387.     ifstr(i) $(IsFullPath) == "No"
  388.       shell $(!STF_WINDOWSSYSPATH)"\SUBROUTN.INF" SetupMessage $(!STF_LANGUAGE) +
  389.         "NONFATAL" +
  390.         """"$(EditTextOut)""" is not a valid path!  Please try again."
  391.       ui pop 1
  392.       goto BeginDoDestPath
  393.     endif
  394.  
  395.     ;
  396.     ; Check that there's enough disk space on the target drive.
  397.     ;
  398. ;    read-syms TreeSizes
  399.  
  400.     detect FreeSpaceVars
  401.     install FreeSetupLibrary
  402.  
  403.     GetDriveInPath WANDrive $(EditTextOut)
  404.  
  405.     ForListDo $(STF_VolList)
  406.       ifstr(i) $($) == $(WANDrive)
  407.     set VolSpaceFree = *( $(STF_VolFreeList), $(#) )
  408.       endif
  409.     EndForListDo
  410.  
  411.     ifint $(VolSpaceFree) < 5
  412.       shell $(!STF_WINDOWSSYSPATH)"\SUBROUTN.INF" SetupMessage $(!STF_LANGUAGE) STATUS +
  413.         "Not enough room for the WAN Services on drive "+
  414.         $(WANDrive)" ("5") megs needed, "+
  415.         $(VolSpaceFree)" available)."$(!LF)$(!LF)+
  416.         "Click OK to try a path on a different drive."
  417.       ui pop 1
  418.       goto BeginDoDestPath
  419.     endif
  420.  
  421.     set Status = STATUS_SUCCESSFUL
  422.     set !WANRootDir = $(EditTextOut)
  423.     set !ProductDir = $(!WANRootDir)"\"
  424.  
  425.   else-ifstr(i) $(DLGEVENT) == "Back"
  426.        set Status = STATUS_FAILED
  427.   endif
  428.  
  429.   ui pop 1
  430.  return $(Status)
  431.  
  432.  
  433. [FileDependentDlgENG]
  434. DlgType = "MultiCombo"
  435. DlgTemplate = "WD"
  436. Caption = $(FunctionTitle$(Option))
  437.  
  438. ComboCardLabel = "&Card Selection"
  439.  
  440. Combo1Label = "&IRQ Level:"
  441. Combo2Label = "&Memory Base Address:"
  442. Combo3Label = "I&O Port Address:"
  443. Radio1 = "&Primary"
  444. Radio2 = "&Secondary"
  445.  
  446. ;ComboCardList = $(CardChoiceList)
  447. ;ComboCardOut = $(CardType)
  448.  
  449. Combo1List = $(IRQ_List)
  450. Combo1Out  = $(IRQLevel)
  451. Combo2List = $(WinBaseAddressList)
  452. Combo2Out  = $(WinBaseAddress)
  453. Combo3List = $(IOBaseAddressList)
  454. Combo3Out  = $(IOBaseAddress)
  455. ;ComboListItemsIn  = {Combo1List, Combo2List, Combo3List}
  456. ;ComboListItemsOut = {Combo1Out, Combo2Out, Combo3Out}
  457.  
  458. ;ComboListItemsIn  =  { ComboCardList }
  459. ;ComboListItemsOut =  { ComboCardOut }
  460.  
  461. EditTextIn = ""
  462. EditTextLim = ""
  463. NotifyFields = {NO, NO, NO}
  464. ;HelpContext = $(!IDH_DB_OEMNADWD_INS)
  465.  
  466.  
  467.  
  468. [DoAskEiconDest]
  469.     set Status      = STATUS_FAILED
  470. ;    set Src         = $($0)
  471.     set Src         = "C:\EICON"
  472.     set DriveToFree = ""
  473.     read-syms  AskEiconDestStrings$(!STF_LANGUAGE)
  474. askdest = +
  475.     read-syms DisketteDlg$(!STF_LANGUAGE)
  476.     ui start "Diskette"
  477.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  478.     LibraryProcedure IsFullPath, $(!LIBHANDLE), CheckPathFullPathSpec $(EditTextOut)
  479.     ifstr(i) $(IsFullPath) == "NO"
  480.         LibraryProcedure STATUS, $(!LIBHANDLE), ProcessForUNC $(EditTextOut)
  481.         ifstr(i) $(STATUS) == "ERROR"
  482.         Shell $(SubroutineInf), SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(String1)
  483.         goto askdest
  484.         else-ifstr(i) $(STATUS) == "NOT-UNC"
  485.         Shell $(SubroutineInf), SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(String2)
  486.         goto askdest
  487.         else-ifstr(i) $(STATUS) == "UNC-NOFREEDRIVE"
  488.         Shell $(SubroutineInf), SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(String3)
  489.         goto askdest
  490.         else-ifstr(i) $(STATUS) == "UNC-FAILCONNECT"
  491.         Shell $(SubroutineInf), SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(String4)
  492.         goto askdest
  493.         else
  494.         set Src = $(STATUS)
  495.         GetDriveInPath DriveToFree $(Src)
  496.         endif
  497.     else
  498.         set Src = $(EditTextOut)
  499.     endif
  500.     ui pop 1
  501.     LibraryProcedure STATUS, $(!LIBHANDLE), AppendBackSlash $(Src)
  502.     ifstr(i) $(STATUS) == "ERROR"
  503.         goto finish_DoAskDest
  504.     else
  505.         set Src = $(STATUS)
  506.         set Status = STATUS_SUCCESSFUL
  507.         goto finish_DoAskDest
  508.     endif
  509.     else-ifstr(i) $(DLGEVENT) == "BACK"
  510.     ui pop 1
  511.     set Status = STATUS_USERCANCEL
  512.     goto finish_DoAskDest
  513.     else
  514.     ui pop 1
  515.     goto finish_DoAskDest
  516.     endif
  517. finish_DoAskDest = +
  518.     Return $(Status) $(Src) $(DriveToFree)
  519. [AskEiconDestStringsENG]
  520. String1 = "Error processing path entered.  Please reenter the path."
  521. String2 = "Setup requires a full path where the Eicon WAN server files will be "+
  522.       "located.  "+
  523.       "Please reenter the path."
  524. String3 = "Setup failed to find a free drive to use to connect to the "+
  525.       "server specified.  Please free up some drives and try again."
  526. String4 = "Setup failed to connect to the server specified.  Please reenter "+
  527.       "the path."
  528. [DisketteDlgENG]
  529.     DlgType        = "Edit"
  530.     DlgTemplate    = "DISKETTE"
  531.     Caption        = "WAN Server Software for Windows/NT Setup"
  532.     DlgText        = "The WAN Server files will be installed in the "+
  533.              "directory shown below."$(!LF)$(!LF)+
  534.              "To install the files somewhere else, edit the path."
  535.     Continue       = "Continue"
  536.     Cancel         = "Cancel"
  537.     Edit1Label     = ""
  538.     EditTextIn     = $(Src)
  539.     EditFocus      = "ALL"
  540.  
  541.  
  542. [Identify]
  543.     read-syms Identification
  544.     set Status     = STATUS_SUCCESSFUL
  545.     set Identifier = $(OptionType)
  546.     set Media      = #("Source Media Descriptions", 1, 1)
  547.     Return $(Status) $(Identifier) $(Media)
  548.  
  549. [ReturnOptions]
  550.     set Status        = STATUS_FAILED
  551.     set OptionList     = {}
  552.     set OptionTextList = {}
  553.     set LanguageList = ^(LanguagesSupported, 1)
  554.     Ifcontains(i) $($0) in $(LanguageList)
  555.     ifstr(i) $($1) == ""
  556.        goto returnoptions
  557.     endif
  558.     set PlatformList = ^(PlatformsSupported, 1)
  559.     Ifcontains(i) $($1) in $(PlatformList)
  560.        goto returnoptions
  561.     else
  562.        set Status = STATUS_NOTSUPPORTED
  563.        goto finish_ReturnOptions
  564.     endif
  565.     else
  566.     set Status = STATUS_NOLANGUAGE
  567.     goto finish_ReturnOptions
  568.     endif
  569. returnoptions = +
  570.     set OptionList     = ^(Options, 1)
  571.     set OptionTextList = ^(OptionsText$($0), 1)
  572.     set Status         = STATUS_SUCCESSFUL
  573. finish_ReturnOptions = +
  574.     Return $(Status) $(OptionList) $(OptionTextList)
  575.  
  576.  
  577.  
  578. [InstallOption]
  579.     set Option   = $($1)
  580.     set SrcDir   = $($2)
  581.     set AddCopy  = $($3)
  582.     set DoCopy   = $($4)
  583.     set DoConfig = $($5)
  584.     set LanguageList = ^(LanguagesSupported, 1)
  585.  
  586.     set !SOURCEDIR = $(SrcDir)
  587.  
  588. ;    Shell $(SubroutineInf), SetupMessage, $(!STF_LANGUAGE), "STATUS" $(Option)
  589. ; !Cardselected to be used with addcard from ecutl_nt.dll
  590.  
  591.    
  592.     ifstr(i) $(Option) == "EiconEC"
  593.        Set !CardSelected = "EC/PC"
  594.        Set !SystemType   = "ISA"
  595.     else-Ifstr(i) $(Option) == "EiconHSI"
  596.        Set !CardSelected = "HSI/PC"
  597.        Set !SystemType   = "ISA"
  598.     else-Ifstr(i) $(Option) == "EiconDPNA"
  599.        Set !CardSelected = "DPNA/PC"
  600.        Set !SystemType   = "ISA"
  601.     else-Ifstr(i) $(Option) == "EiconMPNA"
  602.        Set !CardSelected = "MPNA/PC"
  603.        Set !SystemType   = "ISA"
  604.     else-Ifstr(i) $(Option) == "EiconIMC"
  605.        Set !CardSelected = "IMC/PC"
  606.        Set !SystemType   = "ISA"
  607.     else-Ifstr(i) $(Option) == "EiconECMC"
  608.        Set !CardSelected = "EC/MC"
  609.        Set !SystemType   = "MCA"
  610.     else-Ifstr(i) $(Option) == "EiconHSIMC"
  611.        Set !CardSelected = "HSI/MC"
  612.        Set !SystemType   = "MCA"
  613.     else-Ifstr(i) $(Option) == "EiconIMCMC"
  614.        Set !CardSelected = "IMC/MC"
  615.        Set !SystemType   = "MCA"
  616.     else-Ifstr(i) $(Option) == "EiconMPNAMC"
  617.        Set !CardSelected = "MPNA/MC"
  618.        Set !SystemType   = "MCA"
  619.     endif
  620.  
  621.     Shell $(UtilityInf), GetBusTypeNum
  622.  
  623.     ifstr(i) $(!STF_BUSTYPE) == "MCA"
  624.       ifstr(i) $(!SystemType) == "MCA"
  625.         set BusType = "CARDMC"
  626.       else
  627.         Shell $(!STF_WINDOWSSYSPATH)"\subrouTN.INF", SetupMessage, $(!STF_LANGUAGE), "STATUS",+
  628.         "You can not install such adapter due to the bus type of your system."
  629.         set CommonStatus = STATUS_NO_EFFECT
  630.         goto end
  631.       endif
  632.     else
  633.       ifstr(i) $(!SystemType) == "ISA"
  634.         set BusType = "CARDPC"
  635.       else
  636.         Shell $(!STF_WINDOWSSYSPATH)"\subrouTN.INF", SetupMessage, $(!STF_LANGUAGE), "STATUS",+
  637.         "You can not install such adapter due to the bus type of your system."
  638.         set CommonStatus = STATUS_NO_EFFECT
  639.         goto end
  640.       endif
  641.     endif
  642.  
  643.  
  644.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  645.     Return STATUS_NOLANGUAGE
  646.     endif
  647.     set-subst LF = "\n"
  648.     read-syms GeneralConstants
  649.     read-syms FileConstants
  650. ;    Shell $(UtilityInf), GetBindingInfo, "DEC"
  651. ;    ifint $($ShellCode) != $(!SHELL_CODE_OK)
  652. ;        Debug-Output "ShellCode error: cannot get an error string."
  653. ;        goto ShellCodeError
  654. ;    endif
  655. ;    set NetRuleSoftwareBindable = $($R1)
  656.     set NetRuleSoftwareBindable = {+
  657.               "ecnbDriver eiconECAdapter non exclusive 100",+
  658.               "ecnbDriver eiconHSIAdapter non exclusive 100",+
  659.               "ecnbDriver eiconDPNAAdapter non exclusive 100",+
  660.               "ecnbDriver eiconMPNAAdapter non exclusive 100",+
  661.               "ecnbDriver eiconIMCAdapter non exclusive 100",+
  662.               "ecnbDriver eiconNAAdapter non exclusive 100",+
  663. ;                          "ecnbDriver eiconDNAAdapter non exclusive 100",+
  664.               "ecnbDriver eiconECMCAdapter non exclusive 100",+
  665.               "ecnbDriver eiconHSIMCAdapter non exclusive 100",+
  666.               "ecnbDriver eiconIMCMCAdapter non exclusive 100",+
  667.               "ecnbDriver eiconMPNAMCAdapter non exclusive 100" +
  668.               }
  669.  
  670.     read-syms DialogConstants$(!STF_LANGUAGE)
  671.     ifstr(i) $(!NTN_Origination) == "NCPA"
  672.     set Continue = "OK"
  673.     endif
  674.     read-syms FileConstants$(!STF_LANGUAGE)
  675.     detect date
  676.     set-title  $(FunctionTitle$(Option))
  677.     set to   = Begin
  678.     set from = Begin
  679.     set CommonStatus = STATUS_SUCCESSFUL
  680.     EndWait
  681. Begin = +
  682.     Set ActivateDetection = FALSE
  683.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  684.     set StartLabel = removeadapter
  685.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  686.     set StartLabel = UpgradeSoftware
  687.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  688.     set StartLabel = bindingadapter
  689.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  690. ;mjt        Set ActivateDetection = TRUE
  691.     set StartLabel = configureadapter
  692.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  693.         Debug-Output "Cannot configure the software component."
  694.         Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  695.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  696.         Debug-Output "ShellCode error: cannot get an error string."
  697.         goto ShellCodeError
  698.         endif
  699.         set Error = $($R0)
  700.         set from = end
  701.         set to = end
  702.         goto nonfatalinfo
  703.     endif
  704. ; Install option    
  705.     else
  706.  
  707.     set StartLabel = installadapter
  708.     set OEM_ABANDON_OPTIONS = {}
  709.     set OEM_ABANDON_SOFTWARE = FALSE
  710.     set OEM_ABANDON_ON = TRUE
  711. ;mjt        Set ActivateDetection = TRUE
  712.     endif
  713.     Debug-Output "OEMNAD0.INF: =================================================="
  714.     Debug-Output "OEMNAD0.INF: STF_CWDIR is: "$(!STF_CWDIR)
  715.     Debug-Output "OEMNAD0.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  716.     Debug-Output "OEMNAD0.INF: Option is: "$(Option)
  717.     Debug-Output "OEMNAD0.INF: !STF_NCDETECT  is: "$(!STF_NCDETECT)
  718.     Debug-Output "OEMNAD0.INF: !STF_NCOPTION  is: "$(!STF_NCOPTION)
  719.     Debug-Output "OEMNAD0.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  720.     Debug-Output "OEMNAD0.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  721.     Debug-Output "OEMNAD0.INF: =================================================="
  722.     Set DetectedCard = FALSE
  723.     Ifstr(i) $(ActivateDetection) != TRUE
  724.     Goto skipdetection
  725.     Endif
  726.     Set TypeList = {{IRQ,IRQ_List,IRQLevel},+
  727.             {IOADDR, IOADDR_Addr_List, IOBaseAddress},+
  728.             {MEMADDR, MemBaseAddrDecList MemBaseAddrDec}}
  729.     Debug-Output "OEMNAD0.INF: Calling Param_BuildTypeLists"
  730.     Shell $(ParamInf) Param_BuildTypeLists $(Option) $(TypeList)
  731.     Set Status = $($R0)
  732.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  733.     Goto fataldetect
  734.     Endif
  735.     Debug-Output "OEMNAD0.INF: Calling Param_SetDefaults"
  736.     Shell $(ParamInf) Param_SetDefaults {}
  737.     Set IOADDR_Base_List = {1,2}
  738.     Shell $(ParamInf) HexListFromDecList $(MemBaseAddrDecList)
  739.     Set MemBaseAddrHexList = $($R0)
  740.     Ifstr(i) $(!STF_NCDETECT) == YES
  741.     Ifstr(i) $(!STF_NCOPTION) == $(Option)
  742.        Set DetectedCard = TRUE
  743.        Debug-Output "OEMNADD1.INF: Setting DetectedCard to TRUE"
  744.     Endif
  745.     Endif
  746. skipdetection =+
  747.     set from = $(fatal)
  748.     set to = $(fatal)
  749.     goto $(StartLabel)
  750. installadapter = +
  751.  
  752.  
  753.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  754.     Ifstr $(KeyProduct) != $(KeyNull)
  755.     CloseRegKey $(KeyProduct)
  756.     ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  757.        Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  758.            $(ProductVersion)
  759.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  760.            Debug-Output "ShellCode error: cannot get an error string."
  761.            goto ShellCodeError
  762.        endif
  763.        goto end
  764.     else
  765.        Shell $(UtilityInf), CardExistedDlg
  766.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  767.            Debug-Output "ShellCode error: cannot get an error string."
  768.            goto ShellCodeError
  769.        endif
  770.        ifstr(i) $($R1) != "OK"
  771.            goto end
  772.        endif
  773.        set OldVersionExisted = $(TRUE)
  774.     endif
  775.     endif
  776.  
  777.  
  778.     ifint $(OldVersionExisted) == $(FALSE)
  779.     ifstr(i) $(!NTN_InstallMode) == "install"
  780.        Ifstr(i) $(DoCopy) == "YES"
  781.           Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  782.           Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  783.           Goto ShellCodeError
  784.           Else-Ifstr(i) $($R0) == STATUS_FAILED
  785.           Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  786.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  787.              goto ShellCodeError
  788.           endif
  789.           set Error = $($R0)
  790.           Goto fatal
  791.           Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  792.           Goto successful
  793.           Endif
  794.           Set SrcDir = $($R1)
  795.        Endif
  796.  
  797.  
  798.        shell "" ShellCommands
  799.        ifstr(i) $($R0) == "STATUS_FAILED"
  800.          shell $(!STF_WINDOWSSYSPATH)"\SUBROUTN.INF" SetupMessage $(!STF_LANGUAGE) +
  801.          "STATUS", "Setup aborted by user" 
  802.          Return $($R0) 
  803.        endif
  804.  
  805.  
  806.        install "Install-Option"
  807.        ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  808.           Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  809.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  810.           goto ShellCodeError
  811.           endif
  812.           set Error = $($R0)
  813.           goto fatal
  814.        endif
  815.     endif
  816.     Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  817.         $(ProductSoftwareName), +
  818.         $(ProductSoftwareName), +
  819.         $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  820.         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  821.         $(NetEventDLL)
  822.     Set OEM_ABANDON_SOFTWARE = TRUE
  823.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  824.         Debug-Output "ShellCode error"
  825.         goto ShellCodeError
  826.     endif
  827.     set RegistryErrorIndex = $($R0)
  828.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  829.         EndWait
  830.         Debug-Output "Registry error: add software components"
  831.         CloseRegKey $($R1)
  832.         CloseRegKey $($R2)
  833.         CloseRegKey $($R3)
  834.         CloseRegKey $($R4)
  835.         CloseRegKey $($R5)
  836.         goto fatalregistry
  837.     endif
  838.     set SoftProductKey      = $($R1)
  839.     Set SoftNetRuleKey      = $($R2)
  840.     Set SoftServiceKey      = $($R3)
  841.     Set SoftParameterKey    = $($R4)
  842.     Set SoftLinkageKey      = $($R5)
  843.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  844.                {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  845.                {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  846.                {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  847.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  848.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  849.                {RootPath,$(NoTitle),$(!REG_VT_SZ),$(!WANRootDir)},+
  850.                {ConfigPath,$(NoTitle),$(!REG_VT_SZ),$(!WANRootDir)},+
  851.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  852.     Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  853.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  854.         Debug-Output "ShellCode error."
  855.         goto ShellCodeError
  856.     endif
  857.     set RegistryErrorIndex = $($R0)
  858.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  859.         EndWait
  860.         Debug-Output "Resgitry error: add value list."
  861.         CloseRegKey $(SoftProductKey)
  862.         CloseRegKey $(SoftNetRuleKey)
  863.         CloseRegKey $(SoftServiceKey)
  864.         CloseRegKey $(SoftParameterKey)
  865.         CloseRegKey $(SoftLinkageKey)
  866.         goto fatalregistry
  867.     endif
  868.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  869.                 {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  870.                 {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  871.                 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  872.                 {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  873.                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  874.     Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  875.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  876.         Debug-Output "ShellCode error."
  877.         goto ShellCodeError
  878.     endif
  879.     set RegistryErrorIndex = $($R0)
  880.     CloseRegKey $(SoftProductKey)
  881.     CloseRegKey $(SoftNetRuleKey)
  882.     CloseRegKey $(SoftServiceKey)
  883.     CloseRegKey $(SoftParameterKey)
  884.     CloseRegKey $(SoftLinkageKey)
  885.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  886.         EndWait
  887.         Debug-Output "Resgitry error: add value list."
  888.         goto fatalregistry
  889.     endif
  890.     endif
  891.  
  892.  
  893.   shell "" GetWANSoftwarePath
  894.   set WANRootDir = $($R1)
  895.  
  896.   set ConfigFilePath = $($R1)
  897.   set ConfigFileName = $($R1)"\eccfg.eic"
  898.  
  899.  
  900.   set !SVCHANDLE = ""
  901.  
  902.     ; Append a trailing backslash if necessary
  903.  
  904.     Split-String $(!SOURCEDIR) "\" _DirSplit
  905.     QueryListSize _DirSize $(_DirSplit)
  906.  
  907.     ifstr(i) *( $(_DirSplit), $(_DirSize) ) != "\"
  908.       set !SOURCEDIR = $(!SOURCEDIR)"\"
  909.     endif
  910.  
  911.   LoadLibrary "" $(!STF_WINDOWSSYSPATH)"\ECUTL_NT.DLL" !SVCHANDLE
  912.  
  913.  
  914.   ifstr(i) $(!SVCHANDLE) == ""
  915.     Shell $(SubroutineInf), SetupMessage, $(!STF_LANGUAGE), "STATUS",+
  916.     "Could not load the required missing ECUTL_NT.DLL file."
  917.  
  918. ;    shell $(SubroutineInf) SetupMessage $(!STF_LANGUAGE) +
  919. ;          "WARNING" +
  920. ;          "Couldn't load the DLL file (ECUTL_NT.DLL)!. This DLL contains all"$(!LF)+
  921. ;          "the services calls needed to configure the WAN Services for Windows NT"$(!LF)+
  922. ;          "software."$(!LF)+
  923. ;          "Please find this file and copy it into the same directory"$(!LF)+
  924. ;          "from which you ran Setup."
  925.     set CommonStatus = STATUS_NO_EFFECT
  926.     goto End
  927.   endif
  928.  
  929.  
  930.       LibraryProcedure CardNumber $(!SVCHANDLE) Eccfg_GetLastCard $(ConfigFileName)
  931.  
  932.       set CardNum = $(CardNumber)
  933.       set-add ConvertCard = $(CardNum), $(CardNum)
  934.       set-sub ConvertCard = $(ConvertCard), $(CardNum)
  935.       set !CardsBefore = $(ConvertCard)
  936.  
  937.     ifint $(!CardsBefore) < 0
  938.       set !CardsBefore = 0
  939.     endif
  940.  
  941.     ifint $(!CardsBefore) >= 6
  942.        Shell $(!STF_WINDOWSSYSPATH)"\subrouTN.INF", SetupMessage, $(!STF_LANGUAGE), "STATUS",+
  943.        "Only 6 EiconCards can be configured."
  944.        set CommonStatus = STATUS_NO_EFFECT
  945.        goto end
  946.     endif
  947.  
  948.  
  949.     LibraryProcedure Result $(!SVCHANDLE) Eccfg_AddCard $(ConfigFileName) $(BusType) $(!CardSelected)
  950.  
  951.     LibraryProcedure DateStringBefore $(!SVCHANDLE) Eccfg_GetIniFileDateTime $(ConfigFileName)
  952.  
  953.     RunProgram ExitCode "" "" $(ConfigFilePath)"\eccfgwnt.exe" $(ConfigFileName) "/DISABLE_DELETE /DSA /DO /DN"
  954.  
  955.     LibraryProcedure DateStringAfter $(!SVCHANDLE) Eccfg_GetIniFileDateTime $(ConfigFileName)
  956.  
  957.     LibraryProcedure CardNumber $(!SVCHANDLE) Eccfg_GetLastCard $(ConfigFileName)
  958.     set CardNum = $(CardNumber)
  959.     set-add ConvertCard = $(CardNum), $(CardNum)
  960.     set-sub ConvertCard = $(ConvertCard), $(CardNum)
  961.  
  962. ;    Shell $(!STF_WINDOWSSYSPATH)"\subrouTN.INF", SetupMessage, $(!STF_LANGUAGE), "STATUS",+
  963. ;    "card after config = "$(ConvertCard)
  964.     LibraryProcedure Result $(!SVCHANDLE) Eccfg_CardExists $(ConfigFileName) $(ConvertCard)
  965. ;    Shell $(!STF_WINDOWSSYSPATH)"\subrouTN.INF", SetupMessage, $(!STF_LANGUAGE), "STATUS",+
  966. ;    "Cardexist = "$(Result)
  967.  
  968.     ifstr(i) $(Result) == "0"
  969. ;    Shell $(!STF_WINDOWSSYSPATH)"\subrouTN.INF", SetupMessage, $(!STF_LANGUAGE), "STATUS",+
  970. ;    "remove card section"
  971.        LibraryProcedure Result $(!SVCHANDLE) Eccfg_DeleteCard $(ConfigFileName) $(ConvertCard)
  972.     endif
  973.  
  974. ; has to be here need to remove the card which was added manually by the setup
  975. ; program
  976.     ifstr(i) $(DateStringBefore) == $(DateStringAfter)
  977.        set CommonStatus = STATUS_NO_EFFECT
  978.        goto end
  979.     endif
  980.  
  981.  
  982.  
  983. ; Recheck if card was saved or not to get right number of card
  984.     LibraryProcedure CardNumber $(!SVCHANDLE) Eccfg_GetLastCard $(ConfigFileName)
  985.     set CardNum = $(CardNumber)
  986.     set-add ConvertCard = $(CardNum), $(CardNum)
  987.     set-sub ConvertCard = $(ConvertCard), $(CardNum)
  988.  
  989. ;    Shell $(!STF_WINDOWSSYSPATH)"\subrouTN.INF", SetupMessage, $(!STF_LANGUAGE), "STATUS",+
  990. ;"Recheck Card = "$(ConvertCard)
  991.     set !CardsAfter = $(ConvertCard)
  992.     set !MaxCards = $(ConvertCard)
  993.     set-add !MaxCards = $(!MaxCards), 1
  994.  
  995.     set !MyIndex = 1
  996.     set-add !MyIndex = $(!MyIndex), $(!CardsBefore)
  997.  
  998.     set StartIndex = $(!CardsBefore)
  999.     set EndIndex = $(!CardsAfter)
  1000.  
  1001. ; configuration starts
  1002.  
  1003.    set StartCard  = 1
  1004.    set !CardIndex = $(StartCard)
  1005.    set EndCard    = $(!CardsBefore)
  1006.    set-add EndCard = $(EndCard), 1
  1007.  
  1008. ;if first time but card was not saved, do nothing but exit
  1009.    
  1010.    ifint $(!CardsAfter) == 0
  1011. ;    Shell $(!STF_WINDOWSSYSPATH)"\subrouTN.INF", SetupMessage, $(!STF_LANGUAGE), "STATUS",+
  1012. ;"Card was not saved at first time"
  1013.      set CommonStatus = STATUS_NO_EFFECT
  1014.      goto end
  1015.    endif
  1016.  
  1017. ; if first time should not go to configure add since there is no cards
  1018.    ifint $(!CardsBefore) == 0
  1019.       goto AddCards
  1020.    endif
  1021.  
  1022.  
  1023. ConfigureAdd =+
  1024.  
  1025.     set CardType = ""
  1026.     LibraryProcedure CardType $(!SVCHANDLE) Eccfg_GetCardInfo $(ConfigFileName) $(!CardIndex) *($(!CardRequestList),2)
  1027.     
  1028.     ifstr(i) $(CardType) == "EC/PC"
  1029.        Set !CardToConfigure =  "EiconEC"
  1030.     else-Ifstr(i) $(CardType) == "HSI/PC" 
  1031.        Set !CardToConfigure = "EiconHSI"
  1032.     else-Ifstr(i) $(CardType) == "DPNA/PC" 
  1033.        Set !CardToConfigure = "EiconDPNA"
  1034.     else-Ifstr(i) $(CardType) == "MPNA/PC"
  1035.        Set !CardToConfigure = "EiconMPNA"
  1036.     else-Ifstr(i) $(CardType) == "IMC/PC" 
  1037.        Set !CardToConfigure = "EiconIMC"
  1038.     else-Ifstr(i) $(CardType) == "EC/MC"
  1039.        Set !CardToConfigure = "EiconECMC"
  1040.     else-Ifstr(i) $(CardType) == "HSI/MC"
  1041.        Set !CardToConfigure = "EiconHSIMC"
  1042.     else-Ifstr(i) $(CardType) == "IMC/MC"
  1043.        Set !CardToConfigure = "EiconIMCMC"
  1044.     else-Ifstr(i) $(CardType) == "MPNA/MC"
  1045.        Set !CardToConfigure = "EiconMPNAMC"
  1046.     endif
  1047.  
  1048.     set Option = $(!CardToConfigure)
  1049.  
  1050.  
  1051.      ifstr(i) $(!SystemType) == "ISA" 
  1052.     ; Update configuration registry for all possible cards
  1053.         LibraryProcedure CardIO $(!SVCHANDLE) Eccfg_GetCardInfo $(ConfigFileName) $(!CardIndex) *($(!CardRequestList),4)
  1054.     LibraryProcedure CardIRQ $(!SVCHANDLE)  Eccfg_GetCardInfo $(ConfigFileName) $(!CardIndex) *($(!CardRequestList),5)
  1055.     LibraryProcedure CardMemSeg $(!SVCHANDLE) Eccfg_GetCardInfo $(ConfigFileName) $(!CardIndex) *($(!CardRequestList),6)
  1056.  
  1057.      set IRQLevel = $(CardIRQ)
  1058.      set MyIOBaseChoice = $(CardIO)
  1059.      set MyMemBaseAddr  = $(CardMemSeg)"0"
  1060.  
  1061. ;     set-hextodec IRQLevel       = $(IRQLevel)
  1062.      set-hextodec MyMemBaseAddr  = $(MyMemBaseAddr)
  1063.      set-hextodec MyIOBaseChoice = $(MyIOBaseChoice)
  1064.      else
  1065.     LibraryProcedure CardSlot $(!SVCHANDLE) Eccfg_GetCardInfo $(ConfigFileName) $(!CardIndex) *($(!CardRequestList),10)
  1066.      endif
  1067. ; scan cards starts here
  1068.  
  1069.   Set ScanIndex = 1
  1070. ScanConfigureAddLoop =+
  1071.        ifint $(ScanIndex) < 10
  1072.           set IndexStr = "0"$(ScanIndex)
  1073.        else
  1074.           set IndexStr = $(ScanIndex)
  1075.        endif
  1076.        set SearchCardStr = "SYSTEM\CurrentControlSet\Services\Ecnb"$(IndexStr)"\Parameters"
  1077.        OpenRegKey $(!REG_H_LOCAL) "" $(SearchCardStr) $(MAXIMUM_ALLOWED) KeyCurVer
  1078.     Ifstr $(KeyCurVer) == $(KeyNull)
  1079.  
  1080.     set-add ScanIndex = $(ScanIndex), 1
  1081.     Ifint $(ScanIndex) < 99
  1082.        goto ScanConfigureAddLoop
  1083.    endif
  1084.  
  1085.       endif
  1086.  
  1087.     GetRegValue $(KeyCurVer) "CardNumber" CardNumberValueStr
  1088.     ifstr(i) $(CardNumberValueStr) != ""
  1089.       set CardNumberValue = *($(CardNumberValueStr),4)
  1090.     endif
  1091.  
  1092. ; Found same card index number with the configurator
  1093.    Ifint $(CardNumberValue) == $(!CardIndex)
  1094.       GetRegValue $(KeyCurVer) "CardIndex" ScanIndexValueStr
  1095.       ifstr(i) $(ScanIndexValueStr) != ""
  1096.       set ScanIndexValue = *($(ScanIndexValueStr),4)
  1097.     endif
  1098.    else
  1099.     set-add ScanIndex = $(ScanIndex), 1
  1100.     Ifint $(ScanIndex) < 99
  1101.        goto ScanConfigureAddLoop
  1102.    endif
  1103.    endif
  1104.  
  1105.     Ifint $(ScanIndex) > 99
  1106.        Shell $(!STF_WINDOWSSYSPATH)"\subrouTN.INF", SetupMessage, $(!STF_LANGUAGE), "STATUS",+
  1107.        "No such card"
  1108.        goto end
  1109.     endif
  1110.  
  1111.  
  1112.   ifint $(ScanIndexValue) < 10
  1113.     set comp = "0"
  1114.     set compstr = $(comp)$(ScanIndexValue)
  1115.   else
  1116.     set compstr = $(ScanIndexValue)
  1117.   endif
  1118.  
  1119. ; scan cards ends here
  1120.  
  1121.  
  1122.       set CardToConfigureStr = $(compstr)
  1123.  
  1124.        set EcnbKeyName = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$(CardToConfigureStr)
  1125.     OpenRegKey $(!REG_H_LOCAL) "" $(EcnbKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1126.  
  1127. ; Be careful not to blew up the data of the service name
  1128. ; reminder = to also modify subkey in 01
  1129.  
  1130.     Ifstr $(KeyProduct) != $(KeyNull)
  1131.  
  1132.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  1133.                {Title,$(NoTitle),$(!REG_VT_SZ),"["$(compstr)"] "$(ProductHardware$(Option)Title)},+
  1134.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  1135.                {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)}}
  1136. ;                       {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  1137. ;;                       {CallName,$(NoTitle),$(!REG_VT_SZ),$($R1)},+
  1138. ;                       {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  1139.  
  1140.     Shell  $(!STF_WINDOWSSYSPATH)"\utility.inf", AddValueList, $(KeyProduct), $(NewValueList)
  1141.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1142.     Debug-Output "ShellCode error"
  1143.     goto ShellCodeError
  1144.     endif
  1145.  
  1146.     endif
  1147.  
  1148.     OpenRegKey $(!REG_H_LOCAL) "" $(EcnbKeyName)"\NetRules" $(MAXIMUM_ALLOWED) KeyProdRules
  1149.     Ifstr $(KeyProdRules) != $(KeyNull)
  1150.  
  1151.     set AdapterNumber = $(CardToConfigureStr)
  1152.     set Option = $(!CardToConfigure)
  1153.  
  1154.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  1155.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  1156.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+
  1157.             {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  1158.             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)}, +
  1159.             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  1160.  
  1161.     Shell  $(!STF_WINDOWSSYSPATH)"\utility.inf", AddValueList, $(KeyProdRules), $(NewValueList)
  1162.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1163.     Debug-Output "ShellCode error"
  1164.     goto ShellCodeError
  1165.     endif
  1166.  
  1167.     endif
  1168.  
  1169.  
  1170.  
  1171.     Debug-Output "INF: Shelling to FindService"
  1172.     Shell $(!STF_WINDOWSSYSPATH)"\utility.inf" FindService, $(KeyProduct)
  1173.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1174.     Debug-Output "INF: FindService shell failure"
  1175.     Goto ShellCodeError
  1176.     Endif
  1177. ;    Ifstr(i) $($R0) != "STATUS_SUCCESSFUL"
  1178. ;        Debug-Output "INF: FindService Shell error: "$($R0)
  1179. ;        Goto fatalregistry
  1180. ;    endif
  1181.     set KeyParameters = $($R2)
  1182.     CloseRegKey $($R1)
  1183.     Ifstr $(KeyParameters) == $(KeyNull)
  1184.     set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  1185.     Debug-Output "Cannot find component service"
  1186.     goto fatalregistry
  1187.     endif
  1188.  
  1189. ;Set BusType = "999"
  1190. ;Set BusTypeNum = 999
  1191.  
  1192. ; should not write cardindex value
  1193. ; must keep whatever before
  1194.  
  1195.      ifstr(i) $(!SystemType) == "ISA" 
  1196.     set NewValueList = {+
  1197.                {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  1198. ;                       {BusType,$(NoTitle),$(!REG_VT_SZ),$(BusType)},+
  1199. ;                       {BusTypeNum,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  1200.                {CardType,$(NoTitle),$(!REG_VT_SZ),$(!CardToConfigure)},+
  1201.               {CardNumber,$(NoTitle),$(!REG_VT_DWORD),$(!CardIndex)},+
  1202. ;                       {CardIndex,$(NoTitle),$(!REG_VT_DWORD),$(!CardIndex)},+
  1203.               {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQLevel)},+
  1204.               {IOBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(MyIOBaseChoice)},+
  1205.                {MemoryMappedBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(MyMemBaseAddr)}+
  1206.                }
  1207.  
  1208.     else
  1209.     set NewValueList = {+
  1210.                {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  1211. ;                       {BusType,$(NoTitle),$(!REG_VT_SZ),$(BusType)},+
  1212. ;                       {BusTypeNum,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  1213.                {CardType,$(NoTitle),$(!REG_VT_SZ),$(!CardToConfigure)},+
  1214.               {CardNumber,$(NoTitle),$(!REG_VT_DWORD),$(!CardIndex)},+
  1215. ;                       {CardIndex,$(NoTitle),$(!REG_VT_DWORD),$(!CardIndex)},+
  1216.               {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(CardSlot)}}
  1217.  
  1218.     endif
  1219.  
  1220.     Shell  $(!STF_WINDOWSSYSPATH)"\utility.inf", AddValueList, $(KeyParameters), $(NewValueList)
  1221.     CloseRegKey $(KeyParameters)
  1222.  
  1223.     CloseRegKey $(KeyProduct)
  1224.  
  1225.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1226.     Debug-Output "ShellCode error."
  1227.     goto ShellCodeError
  1228.     endif
  1229.  
  1230.    set-add !CardIndex = $(!CardIndex), 1
  1231.    Ifint $(!CardIndex) < $(EndCard)
  1232.        goto ConfigureAdd
  1233.    endif
  1234.  
  1235.  
  1236.  
  1237. ; configuration ends
  1238.  
  1239. ; Only add cards which are new.
  1240. AddCards =+
  1241.  
  1242. ; only add cards if users did a save in the configurator
  1243.   ifint $(!CardsAfter) > $(!CardsBefore)
  1244.  
  1245.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1246.     Ifstr $(KeyProduct) != $(KeyNull)
  1247.     CloseRegKey $(KeyProduct)
  1248.     ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  1249.        Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  1250.            $(ProductVersion)
  1251.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1252.            Debug-Output "ShellCode error: cannot get an error string."
  1253.            goto ShellCodeError
  1254.        endif
  1255.        goto end
  1256.     else
  1257. ;           Shell $(UtilityInf), CardExistedDlg
  1258. ;           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1259. ;               Debug-Output "ShellCode error: cannot get an error string."
  1260. ;               goto ShellCodeError
  1261. ;           endif
  1262. ;           ifstr(i) $($R1) != "OK"
  1263. ;               goto end
  1264. ;           endif
  1265.        set OldVersionExisted = $(TRUE)
  1266.     endif
  1267.     endif
  1268.     Ifstr(i) $(DetectedCard) != TRUE
  1269.     Goto adaptersetup
  1270.     Endif
  1271.     ;; not used ...
  1272.     StartWait
  1273.     Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  1274.     EndWait
  1275.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1276.     Goto adaptersetup
  1277.     Endif
  1278.     Set DetectedParams = $($R1)
  1279.     Debug-Output "OEMNAD0.INF: Calling Param_SetDefaults to merge detected params"
  1280.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  1281.     Goto adaptersetup
  1282.  
  1283.   else
  1284.    goto end
  1285.   endif
  1286. configureadapter = +
  1287.  
  1288.   ; Default card is 1
  1289.     read-syms GeneralConstants
  1290.     read-syms FileConstants
  1291.  
  1292.   shell "" GetWANSoftwarePath
  1293.   set WANRootDir = $($R1)
  1294.  
  1295.   set ConfigFilePath = $($R1)
  1296.   set ConfigFileName = $($R1)"\eccfg.eic"
  1297.  
  1298.    set !SVCHANDLE = ""
  1299.  
  1300.     LoadLibrary "" $(!STF_WINDOWSSYSPATH)"\ECUTL_NT.DLL" !SVCHANDLE
  1301.  
  1302.  
  1303.     LibraryProcedure DateStringBefore $(!SVCHANDLE) Eccfg_GetIniFileDateTime $(ConfigFileName)
  1304.  
  1305.     RunProgram ExitCode "" "" $(ConfigFilePath)"\eccfgwnt.exe" $(ConfigFileName) "/DA /DD /DSA /DO /DN"
  1306.  
  1307.     LibraryProcedure DateStringAfter $(!SVCHANDLE) Eccfg_GetIniFileDateTime $(ConfigFileName)
  1308.  
  1309.  
  1310.     ifstr(i) $(DateStringBefore) == $(DateStringAfter)
  1311.        set CommonStatus = STATUS_NO_EFFECT
  1312.        goto end
  1313.     endif
  1314.  
  1315.     LibraryProcedure CardNumber $(!SVCHANDLE) Eccfg_GetLastCard $(ConfigFileName)
  1316.  
  1317.     set CardNum = $(CardNumber)
  1318.     set-add ConvertCard = $(CardNum), $(CardNum)
  1319.     set-sub ConvertCard = $(ConvertCard), $(CardNum)
  1320.  
  1321.    set StartCard  = 1
  1322.    set !CardIndex = $(StartCard)
  1323.     set EndCard    = $(ConvertCard)
  1324.    set-add EndCard = $(EndCard), 1
  1325.  
  1326. ConfigureCards =+
  1327.  
  1328.     set CardType = ""
  1329.     LibraryProcedure CardType $(!SVCHANDLE) Eccfg_GetCardInfo $(ConfigFileName) $(!CardIndex) *($(!CardRequestList),2)
  1330.  
  1331.     ifstr(i) $(CardType) == "EC/PC"
  1332.        Set !CardToConfigure =  "EiconEC"
  1333.     else-Ifstr(i) $(CardType) == "HSI/PC" 
  1334.        Set !CardToConfigure = "EiconHSI"
  1335.     else-Ifstr(i) $(CardType) == "DPNA/PC" 
  1336.        Set !CardToConfigure = "EiconDPNA"
  1337.     else-Ifstr(i) $(CardType) == "MPNA/PC"
  1338.        Set !CardToConfigure = "EiconMPNA"
  1339.     else-Ifstr(i) $(CardType) == "IMC/PC" 
  1340.        Set !CardToConfigure = "EiconIMC"
  1341.     else-Ifstr(i) $(CardType) == "EC/MC"
  1342.        Set !CardToConfigure = "EiconECMC"
  1343.     else-Ifstr(i) $(CardType) == "HSI/MC"
  1344.        Set !CardToConfigure = "EiconHSIMC"
  1345.     else-Ifstr(i) $(CardType) == "IMC/MC"
  1346.        Set !CardToConfigure = "EiconIMCMC"
  1347.     else-Ifstr(i) $(CardType) == "MPNA/MC"
  1348.        Set !CardToConfigure = "EiconMPNAMC"
  1349.     endif
  1350.  
  1351.     set Option = $(!CardToConfigure)
  1352.  
  1353.  
  1354.  
  1355.     ifstr(i) $(!SystemType) == "ISA"
  1356.  
  1357.        LibraryProcedure CardIO $(!SVCHANDLE) Eccfg_GetCardInfo $(ConfigFileName) $(!CardIndex) *($(!CardRequestList),4)
  1358.        LibraryProcedure CardIRQ $(!SVCHANDLE)  Eccfg_GetCardInfo $(ConfigFileName) $(!CardIndex) *($(!CardRequestList),5)
  1359.        LibraryProcedure CardMemSeg $(!SVCHANDLE) Eccfg_GetCardInfo $(ConfigFileName) $(!CardIndex) *($(!CardRequestList),6)
  1360.  
  1361.      set IRQLevel = $(CardIRQ)
  1362.      set MyIOBaseChoice = $(CardIO)
  1363.      set MyMemBaseAddr  = $(CardMemSeg)"0"
  1364. ;     set-hextodec IRQLevel       = $(IRQLevel)
  1365.      set-hextodec MyMemBaseAddr  = $(MyMemBaseAddr)
  1366.      set-hextodec MyIOBaseChoice = $(MyIOBaseChoice)
  1367.     else
  1368.        LibraryProcedure CardSlot $(!SVCHANDLE) Eccfg_GetCardInfo $(ConfigFileName) $(!CardIndex) *($(!CardRequestList),10)
  1369.     endif
  1370.  
  1371.  
  1372. ; scan cards starts here
  1373.  
  1374.   Set ScanIndex = 1
  1375. ScanConfigureLoop =+
  1376.        ifint $(ScanIndex) < 10
  1377.           set IndexStr = "0"$(ScanIndex)
  1378.        else
  1379.           set IndexStr = $(ScanIndex)
  1380.        endif
  1381.        set SearchCardStr = "SYSTEM\CurrentControlSet\Services\Ecnb"$(IndexStr)"\Parameters"
  1382.        OpenRegKey $(!REG_H_LOCAL) "" $(SearchCardStr) $(MAXIMUM_ALLOWED) KeyCurVer
  1383.  
  1384.     Ifstr $(KeyCurVer) == $(KeyNull)
  1385.     set-add ScanIndex = $(ScanIndex), 1
  1386.     Ifint $(ScanIndex) < 99
  1387.        goto ScanConfigureLoop
  1388.    endif
  1389.  
  1390.     endif
  1391.  
  1392.     GetRegValue $(KeyCurVer) "CardNumber" CardNumberValueStr
  1393.     ifstr(i) $(CardNumberValueStr) != ""
  1394.       set CardNumberValue = *($(CardNumberValueStr),4)
  1395.     endif
  1396.  
  1397. ; Found same card index number with the configurator
  1398.    Ifint $(CardNumberValue) == $(!CardIndex)
  1399.     GetRegValue $(KeyCurVer) "CardIndex" ScanIndexValueStr
  1400.       ifstr(i) $(ScanIndexValueStr) != ""
  1401.       set ScanIndexValue = *($(ScanIndexValueStr),4)
  1402.     endif
  1403.    else
  1404.     set-add ScanIndex = $(ScanIndex), 1
  1405.     Ifint $(ScanIndex) < 99
  1406.        goto ScanConfigureLoop
  1407.    endif
  1408.    endif
  1409.  
  1410.     Ifint $(ScanIndex) > 99
  1411.        Shell $(!STF_WINDOWSSYSPATH)"\subrouTN.INF", SetupMessage, $(!STF_LANGUAGE), "STATUS",+
  1412.        "No such cards"
  1413.        goto end
  1414.     endif
  1415.  
  1416.   ifint $(ScanIndexValue) < 10
  1417.     set comp = "0"
  1418.     set compstr = $(comp)$(ScanIndexValue)
  1419.   else
  1420.     set compstr = $(ScanIndexValue)
  1421.   endif
  1422.  
  1423. ; scan cards ends here
  1424.  
  1425.       set CardToConfigureStr = $(compstr)
  1426.        set EcnbKeyName = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$(CardToConfigureStr)
  1427. ;  Shell $(!STF_WINDOWSSYSPATH)"\subrouTN.INF", SetupMessage, $(!STF_LANGUAGE), "STATUS",+
  1428. ;  $(EcnbKeyName)
  1429.     OpenRegKey $(!REG_H_LOCAL) "" $(EcnbKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1430.  
  1431. ; Be careful not to blew up the data of the service name
  1432. ; reminder = to also modify subkey in 01
  1433.  
  1434.     Ifstr $(KeyProduct) != $(KeyNull)
  1435.  
  1436.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  1437.                {Title,$(NoTitle),$(!REG_VT_SZ),"["$(compstr)"] "$(ProductHardware$(Option)Title)},+
  1438.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  1439.                {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)}}
  1440. ;                       {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  1441. ;;                       {CallName,$(NoTitle),$(!REG_VT_SZ),$($R1)},+
  1442. ;                       {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  1443.  
  1444.     Shell  $(!STF_WINDOWSSYSPATH)"\utility.inf", AddValueList, $(KeyProduct), $(NewValueList)
  1445.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1446.     Debug-Output "ShellCode error"
  1447.     goto ShellCodeError
  1448.     endif
  1449.  
  1450.     OpenRegKey $(!REG_H_LOCAL) "" $(EcnbKeyName)"\NetRules" $(MAXIMUM_ALLOWED) KeyProdRules
  1451.     Ifstr $(KeyProdRules) != $(KeyNull)
  1452.  
  1453.     set AdapterNumber = $(CardToConfigureStr)
  1454.     set Option = $(!CardToConfigure)
  1455.  
  1456.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  1457.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  1458.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+
  1459.             {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  1460.             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)}, +
  1461.             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  1462.  
  1463.     Shell  $(!STF_WINDOWSSYSPATH)"\utility.inf", AddValueList, $(KeyProdRules), $(NewValueList)
  1464.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1465.     Debug-Output "ShellCode error"
  1466.     goto ShellCodeError
  1467.     endif
  1468.  
  1469.  
  1470.     Debug-Output "INF: Shelling to FindService"
  1471.     Shell $(!STF_WINDOWSSYSPATH)"\utility.inf" FindService, $(KeyProduct)
  1472.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1473.     Debug-Output "INF: FindService shell failure"
  1474.     Goto ShellCodeError
  1475.     Endif
  1476. ;    Ifstr(i) $($R0) != "STATUS_SUCCESSFUL"
  1477. ;        Debug-Output "INF: FindService Shell error: "$($R0)
  1478. ;        Goto fatalregistry
  1479. ;    endif
  1480.     set KeyParameters = $($R2)
  1481.     CloseRegKey $($R1)
  1482.     Ifstr $(KeyParameters) == $(KeyNull)
  1483.     set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  1484.     Debug-Output "Cannot find component service"
  1485.     goto fatalregistry
  1486.     endif
  1487.  
  1488. ; card index should not be changed so do not change it
  1489.  
  1490.     ifstr(i) $(!SystemType) == "ISA"
  1491.  
  1492.     set NewValueList = {+
  1493.                {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  1494. ;                       {BusType,$(NoTitle),$(!REG_VT_SZ),$(BusType)},+
  1495. ;                       {BusTypeNum,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  1496.                {CardType,$(NoTitle),$(!REG_VT_SZ),$(!CardToConfigure)},+
  1497.               {CardNumber,$(NoTitle),$(!REG_VT_DWORD),$(!CardIndex)},+
  1498. ;                       {CardIndex,$(NoTitle),$(!REG_VT_DWORD),$(ScanIndexValue)},+
  1499.               {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQLevel)},+
  1500.               {IOBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(MyIOBaseChoice)},+
  1501.                {MemoryMappedBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(MyMemBaseAddr)}+
  1502.                }
  1503.  
  1504.     else
  1505.     set NewValueList = {+
  1506.                {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  1507. ;                       {BusType,$(NoTitle),$(!REG_VT_SZ),$(BusType)},+
  1508. ;                       {BusTypeNum,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  1509.                {CardType,$(NoTitle),$(!REG_VT_SZ),$(!CardToConfigure)},+
  1510.               {CardNumber,$(NoTitle),$(!REG_VT_DWORD),$(!CardIndex)},+
  1511. ;                       {CardIndex,$(NoTitle),$(!REG_VT_DWORD),$(ScanIndexValue)},+
  1512.               {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(CardSlot)}}
  1513.  
  1514.     endif
  1515.     Shell  $(!STF_WINDOWSSYSPATH)"\utility.inf", AddValueList, $(KeyParameters), $(NewValueList)
  1516.     CloseRegKey $(KeyParameters)
  1517.  
  1518.     CloseRegKey $(KeyProduct)
  1519.  
  1520.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1521.     Debug-Output "ShellCode error."
  1522.     goto ShellCodeError
  1523.     endif
  1524.  
  1525.    set-add !CardIndex = $(!CardIndex), 1
  1526.    Ifint $(!CardIndex) < $(EndCard)
  1527.        goto ConfigureCards
  1528.    endif
  1529.  
  1530.    FreeLibrary $(!SVCHANDLE)
  1531.  
  1532. goto end
  1533.  
  1534. adaptersetup =+
  1535. ;    Set IOBaseChoice = *($(IOADDR_Base_List),~($(IOADDR_Addr_List),$(IOBaseAddress)))
  1536.     Debug-Output "OEMNAD0.INF: setting IOBaseChoice to: "$(IOBaseChoice)
  1537.  
  1538. ;;;    Set MemBaseAddrHex = *($(MemBaseAddrHexList), ~($(MemBaseAddrDecList),+
  1539. ;;;                            $(MemBaseAddrDec)))
  1540.  
  1541.     Ifstr(i) $(DetectedCard) == TRUE
  1542.     Ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  1543.         Goto adapterverify
  1544.     Endif
  1545.     Endif
  1546.  
  1547.  
  1548. adapteroptions = +
  1549.  
  1550.     Shell $(UtilityInf), GetBusTypeNum
  1551.  
  1552.     ifstr(i) $($R1) == 3
  1553.       set BusType = "CARDMC"
  1554.     else
  1555.       set BusType = "CARDPC"
  1556.     endif
  1557.  
  1558.     set Result = ""
  1559.  
  1560.    ; Need from card info the following datas
  1561.  
  1562. ; new added
  1563.     set CardType = ""
  1564.     LibraryProcedure CardType $(!SVCHANDLE) Eccfg_GetCardInfo $(ConfigFileName) $(!MyIndex) *($(!CardRequestList),2)
  1565.     ifstr(i) $(CardType) == "EC/PC"
  1566.        Set !CardToAdd =  "EiconEC"
  1567.     else-Ifstr(i) $(CardType) == "HSI/PC" 
  1568.        Set !CardToAdd = "EiconHSI"
  1569.     else-Ifstr(i) $(CardType) == "DPNA/PC" 
  1570.        Set !CardToAdd = "EiconDPNA"
  1571.     else-Ifstr(i) $(CardType) == "MPNA/PC"
  1572.        Set !CardToAdd = "EiconMPNA"
  1573.     else-Ifstr(i) $(CardType) == "IMC/PC" 
  1574.        Set !CardToAdd = "EiconIMC"
  1575.     else-Ifstr(i) $(CardType) == "EC/MC"
  1576.        Set !CardToAdd = "EiconECMC"
  1577.     else-Ifstr(i) $(CardType) == "HSI/MC"
  1578.        Set !CardToAdd = "EiconHSIMC"
  1579.     else-Ifstr(i) $(CardType) == "IMC/MC"
  1580.        Set !CardToAdd = "EiconIMCMC"
  1581.     else-Ifstr(i) $(CardType) == "MPNA/MC"
  1582.        Set !CardToAdd = "EiconMPNAMC"
  1583.     endif
  1584.  
  1585.     set Option = $(!CardToAdd)
  1586.  
  1587.    ifstr(i) $(!SystemType) == "ISA" 
  1588.    LibraryProcedure CardIO $(!SVCHANDLE) Eccfg_GetCardInfo $(ConfigFileName) $(!MyIndex) *($(!CardRequestList),4)
  1589.    LibraryProcedure CardIRQ $(!SVCHANDLE) Eccfg_GetCardInfo $(ConfigFileName) $(!MyIndex) *($(!CardRequestList),5)
  1590.    LibraryProcedure CardMemSeg $(!SVCHANDLE) Eccfg_GetCardInfo $(ConfigFileName) $(!MyIndex) *($(!CardRequestList),6)
  1591.  
  1592.    set IRQLevel = $(CardIRQ)
  1593.    set MyIOBaseChoice = $(CardIO)
  1594.    set MyMemBaseAddr  = $(CardMemSeg)"0"
  1595.  
  1596. ;   set-hextodec IRQLevel       = $(IRQLevel)
  1597.    set-hextodec MyMemBaseAddr  = $(MyMemBaseAddr)
  1598.    set-hextodec MyIOBaseChoice = $(MyIOBaseChoice)
  1599.  
  1600.    else
  1601.    LibraryProcedure CardSlot $(!SVCHANDLE) Eccfg_GetCardInfo $(ConfigFileName) $(!MyIndex) *($(!CardRequestList),10)
  1602.    endif
  1603.     set from = adapteroptions
  1604.  
  1605. adapterverify =+
  1606.     Ifstr(i) $(DetectedCard) != TRUE
  1607.     Goto skipoptions
  1608.     Endif
  1609.     Debug-Output "OEMNAD0.INF: Calling Param_VerifyCard"
  1610.     Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  1611.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  1612.     Debug-Output "OEMNAD0.INF: Param_VerifyCard succeeded"
  1613.     Goto skipoptions
  1614.     Endif
  1615.     Set from = adapteroptions
  1616.     Set to = skipoptions
  1617.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  1618.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1619.     Debug-Output "ShellCode error: cannot get an error string."
  1620.     goto ShellCodeError
  1621.     endif
  1622.     set Error = $($R0)
  1623.     Goto Warning
  1624. skipoptions =+
  1625.     ifint $(OldVersionExisted) == $(TRUE)
  1626.     ifstr(i) $(!NTN_InstallMode) == configure
  1627.         goto writeparameters
  1628.     endif
  1629.     endif
  1630.     StartWait
  1631.     ifint $(OldVersionExisted) == $(FALSE)
  1632.     ifstr(i) $(!NTN_InstallMode) == "install"
  1633.        Ifstr(i) $(DoCopy) == "YES"
  1634.           Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  1635.           Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1636.           Goto ShellCodeError
  1637.           Else-Ifstr(i) $($R0) == STATUS_FAILED
  1638.           Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  1639.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1640.              goto ShellCodeError
  1641.           endif
  1642.           set Error = $($R0)
  1643.           Goto fatal
  1644.           Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  1645.           Goto successful
  1646.           Endif
  1647.           Set SrcDir = $($R1)
  1648.        Endif
  1649.        install "Install-Option"
  1650.        ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1651.           Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  1652.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1653.           goto ShellCodeError
  1654.           endif
  1655.           set Error = $($R0)
  1656.           goto fatal
  1657.        endif
  1658.     endif
  1659.     Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  1660.         $(ProductSoftwareName), +
  1661.         $(ProductSoftwareName), +
  1662.         $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  1663.         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  1664.         $(NetEventDLL)
  1665.     Set OEM_ABANDON_SOFTWARE = TRUE
  1666.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1667.         Debug-Output "ShellCode error"
  1668.         goto ShellCodeError
  1669.     endif
  1670.     set RegistryErrorIndex = $($R0)
  1671.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1672.         EndWait
  1673.         Debug-Output "Registry error: add software components"
  1674.         CloseRegKey $($R1)
  1675.         CloseRegKey $($R2)
  1676.         CloseRegKey $($R3)
  1677.         CloseRegKey $($R4)
  1678.         CloseRegKey $($R5)
  1679.         goto fatalregistry
  1680.     endif
  1681.     set SoftProductKey      = $($R1)
  1682.     Set SoftNetRuleKey      = $($R2)
  1683.     Set SoftServiceKey      = $($R3)
  1684.     Set SoftParameterKey    = $($R4)
  1685.     Set SoftLinkageKey      = $($R5)
  1686.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  1687.                {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  1688.                {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  1689.                {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  1690.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  1691.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  1692.                {RootPath,$(NoTitle),$(!REG_VT_SZ),$(!WANRootDir)},+
  1693.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  1694.     Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  1695.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1696.         Debug-Output "ShellCode error."
  1697.         goto ShellCodeError
  1698.     endif
  1699.     set RegistryErrorIndex = $($R0)
  1700.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1701.         EndWait
  1702.         Debug-Output "Resgitry error: add value list."
  1703.         CloseRegKey $(SoftProductKey)
  1704.         CloseRegKey $(SoftNetRuleKey)
  1705.         CloseRegKey $(SoftServiceKey)
  1706.         CloseRegKey $(SoftParameterKey)
  1707.         CloseRegKey $(SoftLinkageKey)
  1708.         goto fatalregistry
  1709.     endif
  1710.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  1711.                 {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  1712.                 {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  1713.                 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  1714.                 {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  1715.                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  1716.     Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  1717.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1718.         Debug-Output "ShellCode error."
  1719.         goto ShellCodeError
  1720.     endif
  1721.     set RegistryErrorIndex = $($R0)
  1722.     CloseRegKey $(SoftProductKey)
  1723.     CloseRegKey $(SoftNetRuleKey)
  1724.     CloseRegKey $(SoftServiceKey)
  1725.     CloseRegKey $(SoftParameterKey)
  1726.     CloseRegKey $(SoftLinkageKey)
  1727.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1728.         EndWait
  1729.         Debug-Output "Resgitry error: add value list."
  1730.         goto fatalregistry
  1731.     endif
  1732.     endif
  1733.     Shell $(UtilityInf), AddHardwareComponent,$(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  1734.     ifint $($R4) != -1
  1735.     Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  1736.     endif
  1737.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1738.     Debug-Output "Cannot add hardware component"
  1739.     goto ShellCodeError
  1740.     endif
  1741.     set RegistryErrorIndex = $($R0)
  1742.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1743.     EndWait
  1744.     Debug-Output "Registry error: add hardware component"
  1745.     Debug-Output $(RegistryErrorIndex)
  1746.     CloseRegKey $($R1)
  1747.     CloseRegKey $($R2)
  1748.     CloseRegKey $($R3)
  1749.     goto fatalregistry
  1750.     endif
  1751.     set KeyParameters = $($R3)
  1752.     set KeyAdapterRules = $($R2)
  1753.     set AdapterNumber = $($R4)
  1754.  
  1755.  
  1756.     set !CardRegIndex = $($R4)
  1757. ; Call name field will be used to change title in configuration in case
  1758. ; add hardware component is not supported while doing the configuration
  1759. ; or removal or even adding
  1760.  
  1761.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  1762.                {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  1763. ;                        {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(!CardTitle)},+
  1764.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  1765.                {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  1766.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  1767. ;                       {CallName,$(NoTitle),$(!REG_VT_SZ),$($R1)},+
  1768.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  1769.  
  1770.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  1771.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1772.     Debug-Output "ShellCode error"
  1773.     goto ShellCodeError
  1774.     endif
  1775.     CloseRegKey $($R1)
  1776.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  1777.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  1778.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+
  1779.             {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  1780.             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)}, +
  1781.             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  1782.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  1783.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1784.     Debug-Output "ShellCode error."
  1785.     goto ShellCodeError
  1786.     endif
  1787.     set RegistryErrorIndex = $($R0)
  1788.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1789.     EndWait
  1790.     Debug-Output "Resgitry error: add value list."
  1791.     CloseRegKey $(KeyParameters)
  1792.     CloseRegKey $(KeyAdapterRules)
  1793.     goto fatalregistry
  1794.     endif
  1795.     CloseRegKey $(KeyAdapterRules)
  1796.     goto writeparameters
  1797. writeparameters = +
  1798.     set MemBaseAddrDec = *($(MemBaseAddrDecList), ~($(MemBaseAddrHexList),+
  1799.               $(MemBaseAddrHex)))
  1800. ;    ifstr(i) $(Option) == "DEC100"
  1801. ;        set CardTypeValue = 1
  1802. ;    else
  1803. ;        set CardTypeValue = 7
  1804.     set CardTypeValue = 0
  1805.  
  1806. ;    set CardNumberValue = $(CardNum)
  1807.  
  1808.     endif
  1809.     Shell $(UtilityInf), GetBusTypeNum
  1810.     set BusTypeNum = $($R1)
  1811.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1812.     Debug-Output "ShellCode error."
  1813.     goto ShellCodeError
  1814.     endif
  1815.  
  1816.    set-hextodec BusTypeNum       = $(BusTypeNum)
  1817.    
  1818.     ifstr(i) $(!SystemType) == "ISA"
  1819.     set NewValueList = {+
  1820.                {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  1821.                {BusType,$(NoTitle),$(!REG_VT_SZ),$(BusType)},+
  1822.                {BusTypeNum,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  1823.                {CardType,$(NoTitle),$(!REG_VT_SZ),$(CardType)},+
  1824.                        {CardNumber,$(NoTitle),$(!REG_VT_DWORD),$(!MyIndex)},+
  1825.                {CardIndex,$(NoTitle),$(!REG_VT_DWORD),$(!CardRegIndex)},+
  1826.                {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQLevel)},+
  1827.                {IOBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(MyIOBaseChoice)},+
  1828.                {MemoryMappedBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(MyMemBaseAddr)}+
  1829.                }
  1830.     else
  1831.     set NewValueList = {+
  1832.                {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  1833.                {BusType,$(NoTitle),$(!REG_VT_SZ),$(BusType)},+
  1834.                {BusTypeNum,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  1835.                {CardType,$(NoTitle),$(!REG_VT_SZ),$(CardType)},+
  1836.                        {CardNumber,$(NoTitle),$(!REG_VT_DWORD),$(!MyIndex)},+
  1837.                {CardIndex,$(NoTitle),$(!REG_VT_DWORD),$(!CardRegIndex)},+
  1838.                {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(CardSlot)}}
  1839.     endif
  1840.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  1841.     CloseRegKey $(KeyParameters)
  1842.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1843.     Debug-Output "ShellCode error."
  1844.     goto ShellCodeError
  1845.     endif
  1846.     set RegistryErrorIndex = $($R0)
  1847.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1848.     Debug-Output "Registry error: Add value list"
  1849.     goto fatalregistry
  1850.     endif
  1851. ; Create Eicon Cards Service Only for install or for other, to check ???
  1852.  
  1853.    set ServiceName = "EiconCards"
  1854.    set DisplayName = "Eicon Cards"
  1855.    set ImagePath = $(!WANRootDir)"\ECSRV.EXE"
  1856.    set CreateServiceDesc  = "serviceauto"
  1857.    set Group = ""
  1858.    set DependList     = { "Ecnb" }
  1859.    set Objectname     = "LocalSystem"
  1860.    set EventLogFile   = {""}
  1861.    set EventTypes     = ""
  1862.    set EventLocation  = ""
  1863.    set ErrorControl   = 1
  1864.  
  1865.    shell $(!STF_WINDOWSSYSPATH)\UTILITY.INF CreateService +
  1866.      $(ServiceName) $(DisplayName) $(ImagePath) $(CreateServiceDesc) +
  1867.      $(Group) $(DependList) $(ObjectName) $(EventLogFile) +
  1868.      $(EventTypes) $(EventLocation) $(ErrorControl)
  1869.  
  1870.    EndWait
  1871.    set-add !MyIndex = $(!MyIndex), 1
  1872.    Ifint $(!MyIndex) < $(!MaxCards)
  1873.     goto AddCards
  1874.    endif
  1875.  
  1876. FinishAdd=+
  1877. ;  Shell $(!STF_WINDOWSSYSPATH)"\subrouTN.INF", SetupMessage, $(!STF_LANGUAGE), "STATUS",+
  1878. ;  "Finish adding cards"
  1879.  
  1880.    install FreeServiceLibrary
  1881.  
  1882. ; add wan path to system environment
  1883.  
  1884.     shell "" ModifySystemPath "Add" $(!WANRootDir)
  1885.  
  1886.     goto successful
  1887. bindingadapter =+
  1888.     set Error = "Binding: Sorry, not yet implemented."
  1889.     goto fatal
  1890. removeadapter = +
  1891.   shell "" GetWANSoftwarePath
  1892.   set WANRootDir = $($R1)
  1893.   set ConfigFilePath = $($R1)
  1894.   set ConfigFileName = $($R1)"\eccfg.eic"
  1895.  
  1896.   set !SVCHANDLE = ""
  1897.  
  1898.     ; Append a trailing backslash if necessary
  1899.  
  1900. ;    Split-String $(!SOURCEDIR) "\" _DirSplit
  1901. ;    QueryListSize _DirSize $(_DirSplit)
  1902. ;
  1903. ;    ifstr(i) *( $(_DirSplit), $(_DirSize) ) != "\"
  1904. ;      set !SOURCEDIR = $(!SOURCEDIR)"\"
  1905. ;    endif
  1906.  
  1907.    set !SVCHANDLE = ""
  1908.    LoadLibrary "" $(!STF_WINDOWSSYSPATH)"\ECUTL_NT.DLL" !SVCHANDLE
  1909.  
  1910.  
  1911.   ifstr(i) $(!SVCHANDLE) == ""
  1912.     Shell $(SubroutineInf), SetupMessage, $(!STF_LANGUAGE), "STATUS",+
  1913.     "Could not load the required missing ECUTL_NT.DLL file."
  1914.  
  1915. ;    shell $(SubroutineInf) SetupMessage $(!STF_LANGUAGE) +
  1916. ;          "WARNING" +
  1917. ;          "Couldn't load the DLL file (ECUTL_NT.DLL)!. This DLL contains all"$(!LF)+
  1918. ;          "the services calls needed to configure the WAN Services for Windows NT"$(!LF)+
  1919. ;          "software."$(!LF)+
  1920. ;          "Please find this file and copy it into the same directory"$(!LF)+
  1921. ;          "from which you ran Setup."
  1922.     goto End
  1923.   endif
  1924.  
  1925.  
  1926.     LibraryProcedure CardNumber $(!SVCHANDLE) Eccfg_GetLastCard $(ConfigFileName)
  1927.  
  1928.     set CardNum = $(CardNumber)
  1929.     set-add ConvertCard = $(CardNum), $(CardNum)
  1930.     set-sub ConvertCard = $(ConvertCard), $(CardNum)
  1931.     set !CardsBefore = $(ConvertCard)
  1932.  
  1933.     ifint $(!CardsBefore) <= 1
  1934.  
  1935.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1936.     Ifstr $(KeyProduct) != $(KeyNull)
  1937.         Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  1938.         set !UG_Filename = $($R0)
  1939.         LibraryProcedure Status , $(!LIBHANDLE), DelFile $(!STF_WINDOWSSYSPATH)"\"$(!UG_Filename)
  1940.     CloseRegKey $(KeyProduct)
  1941.     endif
  1942.  
  1943.  
  1944.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  1945.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1946.             $(ProductSoftwareName)
  1947.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1948.             Debug-Output "ShellCode error"
  1949.             goto ShellCodeError
  1950.         endif
  1951.  
  1952. ;  Shell $(!STF_WINDOWSSYSPATH)"\subrouTN.INF", SetupMessage, $(!STF_LANGUAGE), "STATUS",+
  1953. ;  "removesoftwarecompo = "$($ShellCode)
  1954. ;        set RegistryErrorIndex = $($R0)
  1955. ;        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1956. ;            goto fatalregistry
  1957. ;        endif
  1958.     else
  1959.  
  1960.  
  1961.  
  1962.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1963.         $(ProductSoftwareName), $(!NTN_RegBase)
  1964.  
  1965.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1966.         Debug-Output "ShellCode error"
  1967.         goto ShellCodeError
  1968.     endif
  1969. ;    set RegistryErrorIndex = $($R0)
  1970. ;        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1971. ;            goto fatalregistry
  1972. ;        endif
  1973.  
  1974.     endif
  1975.     set InitConfigStr = "[Tree]"$(LF)"Tree.1=Server, SERVER, 1, SERVER, Wan Services"$(LF)
  1976.  
  1977. ;        set SystemTypeISAStr = $(InitConfigStr)"[SERVER]"$(LF)"0067=ID_SERVER_InterType, 0031, Industry Standard Architecture (PCbus)"
  1978. ; For last card do not need to reset the contents anymore since files are
  1979. ; deleted
  1980. ;    LibraryProcedure Result $(!SVCHANDLE) Eccfg_ResetConfig $(ConfigFileName) $(InitConfigStr)
  1981.  
  1982.    install FreeServiceLibrary
  1983.  
  1984.  
  1985. ; this is the place to call remove files
  1986.    install "DeInstall-Option"
  1987.  
  1988.     shell "" ModifySystemPath "Delete" $(WANRootDir)
  1989.  
  1990.     set ServiceName = "EiconCards"
  1991.  
  1992.     Shell $(UtilityInf), RemoveService, $(ServiceName), "YES"
  1993.  
  1994.     goto end
  1995.  
  1996.     else
  1997.  
  1998.  
  1999.     LibraryProcedure DateStringBefore $(!SVCHANDLE) Eccfg_GetIniFileDateTime $(ConfigFileName)
  2000.  
  2001.     RunProgram ExitCode "" "" $(ConfigFilePath)"\eccfgwnt.exe" $(ConfigFileName) "/DISABLE_ADD /DSA /DO /DN"
  2002.  
  2003.     LibraryProcedure DateStringAfter $(!SVCHANDLE) Eccfg_GetIniFileDateTime $(ConfigFileName)
  2004.  
  2005.  
  2006.     ifstr(i) $(DateStringBefore) == $(DateStringAfter)
  2007.        set CommonStatus = STATUS_NO_EFFECT
  2008.        goto end
  2009.     endif
  2010.  
  2011.     LibraryProcedure CardNumber $(!SVCHANDLE) Eccfg_GetLastCard $(ConfigFileName)
  2012.  
  2013.     set CardNum = $(CardNumber)
  2014.     set-add ConvertCard = $(CardNum), $(CardNum)
  2015.     set-sub ConvertCard = $(ConvertCard), $(CardNum)
  2016.     set !CardsAfter = $(ConvertCard)
  2017.  
  2018.     set !MaxCards = $(ConvertCard)
  2019.  
  2020.     set StartIndex = $(!CardsAfter)
  2021.  
  2022.     set-add StartIndex = $(StartIndex), 1
  2023.     set EndIndex = $(!CardsBefore)
  2024.     set-add EndIndex = $(EndIndex), 1
  2025.  
  2026. ; start card to remove
  2027.     set CardIndex = $(StartIndex)
  2028.  
  2029. ; configuration starts here
  2030.  
  2031.    set StartCard  = 1
  2032.    set !CardIndex = $(StartCard)
  2033.    set EndCard    = $(!CardsAfter)
  2034.    set-add EndCard = $(EndCard), 1
  2035.  
  2036. ConfigureRemove =+
  2037.  
  2038.     LibraryProcedure CardIO $(!SVCHANDLE) Eccfg_GetCardInfo $(ConfigFileName) $(!CardIndex) *($(!CardRequestList),4)
  2039.  
  2040.     ifstr(i) $(CardIO) != ""
  2041.  
  2042.     set CardType = ""
  2043.     LibraryProcedure CardType $(!SVCHANDLE) Eccfg_GetCardInfo $(ConfigFileName) $(!CardIndex) *($(!CardRequestList),2)
  2044.  
  2045.     ifstr(i) $(CardType) == "EC/PC"
  2046.        Set !CardToConfigure =  "EiconEC"
  2047.     else-Ifstr(i) $(CardType) == "HSI/PC" 
  2048.        Set !CardToConfigure = "EiconHSI"
  2049.     else-Ifstr(i) $(CardType) == "DPNA/PC" 
  2050.        Set !CardToConfigure = "EiconDPNA"
  2051.     else-Ifstr(i) $(CardType) == "MPNA/PC"
  2052.        Set !CardToConfigure = "EiconMPNA"
  2053.     else-Ifstr(i) $(CardType) == "IMC/PC" 
  2054.        Set !CardToConfigure = "EiconIMC"
  2055.     else-Ifstr(i) $(CardType) == "EC/MC"
  2056.        Set !CardToConfigure = "EiconECMC"
  2057.     else-Ifstr(i) $(CardType) == "HSI/MC"
  2058.        Set !CardToConfigure = "EiconHSIMC"
  2059.     else-Ifstr(i) $(CardType) == "IMC/MC"
  2060.        Set !CardToConfigure = "EiconIMCMC"
  2061.     else-Ifstr(i) $(CardType) == "MPNA/MC"
  2062.        Set !CardToConfigure = "EiconMPNAMC"
  2063.     endif
  2064.  
  2065.     set Option = $(!CardToConfigure)
  2066.  
  2067.     ifstr(i) $(!SystemType) == "ISA"
  2068.          LibraryProcedure CardIRQ $(!SVCHANDLE)  Eccfg_GetCardInfo $(ConfigFileName) $(!CardIndex) *($(!CardRequestList),5)
  2069.          LibraryProcedure CardMemSeg $(!SVCHANDLE) Eccfg_GetCardInfo $(ConfigFileName) $(!CardIndex) *($(!CardRequestList),6)
  2070.  
  2071.      set IRQLevel = $(CardIRQ)
  2072.      set MyIOBaseChoice = $(CardIO)
  2073.      set MyMemBaseAddr  = $(CardMemSeg)"0"
  2074.  
  2075. ;     set-hextodec IRQLevel       = $(IRQLevel)
  2076.      set-hextodec MyMemBaseAddr  = $(MyMemBaseAddr)
  2077.      set-hextodec MyIOBaseChoice = $(MyIOBaseChoice)
  2078.  
  2079.     else
  2080.          LibraryProcedure CardSlot $(!SVCHANDLE) Eccfg_GetCardInfo $(ConfigFileName) $(!CardIndex) *($(!CardRequestList),10)
  2081.     endif
  2082.  
  2083. ; scan cards starts here
  2084.  
  2085.  
  2086.  
  2087.   Set ScanIndex = 1
  2088. ScanConfigureRemoveLoop =+
  2089.        ifint $(ScanIndex) < 10
  2090.           set IndexStr = "0"$(ScanIndex)
  2091.        else
  2092.           set IndexStr = $(ScanIndex)
  2093.        endif
  2094.        set SearchCardStr = "SYSTEM\CurrentControlSet\Services\Ecnb"$(IndexStr)"\Parameters"
  2095.        OpenRegKey $(!REG_H_LOCAL) "" $(SearchCardStr) $(MAXIMUM_ALLOWED) KeyCurVer
  2096.     Ifstr $(KeyCurVer) == $(KeyNull)
  2097.  
  2098.           set-add ScanIndex = $(ScanIndex), 1
  2099.           Ifint $(ScanIndex) < 99
  2100.             goto ScanConfigureRemoveLoop
  2101.           endif
  2102.  
  2103.     endif
  2104.  
  2105.     GetRegValue $(KeyCurVer) "CardNumber" CardNumberValueStr
  2106.     ifstr(i) $(CardNumberValueStr) != ""
  2107.       set CardNumberValue = *($(CardNumberValueStr),4)
  2108.     endif
  2109.  
  2110. ; Found same card index number with the configurator
  2111.    Ifint $(CardNumberValue) == $(!CardIndex)
  2112.     GetRegValue $(KeyCurVer) "CardIndex" ScanIndexValueStr
  2113.         ifstr(i) $(ScanIndexValueStr) != ""
  2114.            set ScanIndexValue = *($(ScanIndexValueStr),4)
  2115.     endif
  2116.    else
  2117.     set-add ScanIndex = $(ScanIndex), 1
  2118.      Ifint $(ScanIndex) < 99
  2119.         goto ScanConfigureRemoveLoop
  2120.      endif
  2121.    endif
  2122.  
  2123.     Ifint $(ScanIndex) > 99
  2124.        Shell $(!STF_WINDOWSSYSPATH)"\subrouTN.INF", SetupMessage, $(!STF_LANGUAGE), "STATUS",+
  2125.        "No such cards"
  2126.        goto end
  2127.     endif
  2128.  
  2129.   ifint $(ScanIndexValue) < 10
  2130.     set comp = "0"
  2131.     set compstr = $(comp)$(ScanIndexValue)
  2132.   else
  2133.     set compstr = $(ScanIndexValue)
  2134.   endif
  2135. ; scan cards ends here
  2136.  
  2137.     set CardToConfigureStr = $(compstr)
  2138.  
  2139.        set EcnbKeyName = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$(CardToConfigureStr)
  2140.     OpenRegKey $(!REG_H_LOCAL) "" $(EcnbKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  2141.  
  2142. ; Be careful not to blew up the data of the service name
  2143. ; reminder = to also modify subkey in 01
  2144.  
  2145.     Ifstr $(KeyProduct) != $(KeyNull)
  2146.  
  2147.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  2148.                {Title,$(NoTitle),$(!REG_VT_SZ),"["$(compstr)"] "$(ProductHardware$(Option)Title)},+
  2149.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  2150.                {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)}}
  2151. ;                       {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  2152. ;;                       {CallName,$(NoTitle),$(!REG_VT_SZ),$($R1)},+
  2153. ;                       {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  2154.  
  2155.     Shell  $(!STF_WINDOWSSYSPATH)"\utility.inf", AddValueList, $(KeyProduct), $(NewValueList)
  2156.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2157.     Debug-Output "ShellCode error"
  2158.     goto ShellCodeError
  2159.     endif
  2160.     endif
  2161.     OpenRegKey $(!REG_H_LOCAL) "" $(EcnbKeyName)"\NetRules" $(MAXIMUM_ALLOWED) KeyProdRules
  2162.     Ifstr $(KeyProdRules) != $(KeyNull)
  2163.  
  2164.     set AdapterNumber = $(CardToConfigureStr)
  2165.     set Option = $(!CardToConfigure)
  2166.  
  2167.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  2168.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  2169.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+
  2170.             {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  2171.             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)}, +
  2172.             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  2173.  
  2174.     Shell  $(!STF_WINDOWSSYSPATH)"\utility.inf", AddValueList, $(KeyProdRules), $(NewValueList)
  2175.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2176.     Debug-Output "ShellCode error"
  2177.     goto ShellCodeError
  2178.     endif
  2179.  
  2180.  
  2181.     endif
  2182.     Debug-Output "INF: Shelling to FindService"
  2183.     Shell $(!STF_WINDOWSSYSPATH)"\utility.inf" FindService, $(KeyProduct)
  2184.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2185.     Debug-Output "INF: FindService shell failure"
  2186.     Goto ShellCodeError
  2187.     Endif
  2188. ;    Ifstr(i) $($R0) != "STATUS_SUCCESSFUL"
  2189. ;        Debug-Output "INF: FindService Shell error: "$($R0)
  2190. ;        Goto fatalregistry
  2191. ;    endif
  2192.     set KeyParameters = $($R2)
  2193.     CloseRegKey $($R1)
  2194.     Ifstr $(KeyParameters) == $(KeyNull)
  2195.     set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  2196.     Debug-Output "Cannot find component service"
  2197.     goto fatalregistry
  2198.     endif
  2199.  
  2200. ;Set BusType = "999"
  2201. ;Set BusTypeNum = 999
  2202.  
  2203. ; should not modify index when removing card other wise
  2204. ; it will remove a bad one !!!!
  2205.  
  2206.     ifstr(i) $(!SystemType) == "ISA"
  2207.  
  2208.     set NewValueList = {+
  2209.                {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  2210. ;                       {BusType,$(NoTitle),$(!REG_VT_SZ),$(BusType)},+
  2211. ;                       {BusTypeNum,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  2212.                {CardType,$(NoTitle),$(!REG_VT_SZ),$(!CardToConfigure)},+
  2213.               {CardNumber,$(NoTitle),$(!REG_VT_DWORD),$(!CardIndex)},+
  2214. ;                      {CardIndex,$(NoTitle),$(!REG_VT_DWORD),$(!CardIndex)},+
  2215.               {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQLevel)},+
  2216.               {IOBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(MyIOBaseChoice)},+
  2217.                {MemoryMappedBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(MyMemBaseAddr)}+
  2218.                }
  2219.      else
  2220.     set NewValueList = {+
  2221.                {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  2222. ;                       {BusType,$(NoTitle),$(!REG_VT_SZ),$(BusType)},+
  2223. ;                       {BusTypeNum,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  2224.                {CardType,$(NoTitle),$(!REG_VT_SZ),$(!CardToConfigure)},+
  2225.               {CardNumber,$(NoTitle),$(!REG_VT_DWORD),$(!CardIndex)},+
  2226. ;                      {CardIndex,$(NoTitle),$(!REG_VT_DWORD),$(!CardIndex)},+
  2227.               {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(CardSlot)}}
  2228.  
  2229.      endif
  2230.  
  2231.  
  2232.     Shell  $(!STF_WINDOWSSYSPATH)"\utility.inf", AddValueList, $(KeyParameters), $(NewValueList)
  2233.     CloseRegKey $(KeyParameters)
  2234.  
  2235.     CloseRegKey $(KeyProduct)
  2236.  
  2237.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2238.     Debug-Output "ShellCode error."
  2239.     goto ShellCodeError
  2240.     endif
  2241.  
  2242.    set-add !CardIndex = $(!CardIndex), 1
  2243.    Ifint $(!CardIndex) < $(EndCard)
  2244.        goto ConfigureRemove
  2245.    endif
  2246.  
  2247.     else
  2248. ; no more cards to process, must remove if any extra from configuration
  2249. ; registry so remember the last card number from the configurator
  2250.        set NumberOfCards = $(Index)
  2251. ;  Shell $(!STF_WINDOWSSYSPATH)"\subrouTN.inf", SetupMessage, $(!STF_LANGUAGE), "STATUS",+
  2252. ;  "No more cards to configure in remove"
  2253.     endif
  2254.  
  2255.  
  2256. ; configuration ends here
  2257.  
  2258. ; must be at outer loop
  2259.   Set Inc = 0
  2260.   Set Val = 0
  2261.  
  2262.  
  2263. RemoveCards =+
  2264.  
  2265. ; Remove cards only if cards were removed in the configurator with
  2266. ; a save 
  2267.   ifint $(!CardsAfter) < $(!CardsBefore)
  2268.  
  2269. ;        Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  2270. ;           $(ProductSoftwareName) $(!NTN_RegBase)
  2271. ;       ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2272. ;           Debug-Output "ShellCode error"
  2273. ;           goto ShellCodeError
  2274. ;       endif
  2275. ;goto end
  2276. ;        Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  2277. ;            $(ProductSoftwareName)
  2278. ;        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2279. ;            Debug-Output "ShellCode error"
  2280. ;            goto ShellCodeError
  2281. ;        endif
  2282. ;        set RegistryErrorIndex = $($R0)
  2283. ;;        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  2284. ;;            goto fatalregistry
  2285. ;;        endif
  2286. ;
  2287. ;goto end
  2288.  
  2289. ; scan cards starts here
  2290.  
  2291.   Set ScanIndex = 1
  2292. ScanRemoveLoop =+
  2293.        ifint $(ScanIndex) < 10
  2294.           set IndexStr = "0"$(ScanIndex)
  2295.        else
  2296.           set IndexStr = $(ScanIndex)
  2297.        endif
  2298.        set SearchCardStr = "SYSTEM\CurrentControlSet\Services\Ecnb"$(IndexStr)"\Parameters"
  2299.  
  2300.        OpenRegKey $(!REG_H_LOCAL) "" $(SearchCardStr) $(MAXIMUM_ALLOWED) KeyCurVer
  2301.     Ifstr $(KeyCurVer) == $(KeyNull)
  2302.  
  2303.           set-add ScanIndex = $(ScanIndex), 1
  2304.           Ifint $(ScanIndex) < 99
  2305.              goto ScanRemoveLoop
  2306.           endif
  2307.  
  2308.     endif
  2309.  
  2310.  
  2311.     GetRegValue $(KeyCurVer) "CardNumber" CardNumberValueStr
  2312.     ifstr(i) $(CardNumberValueStr) != ""
  2313.       set CardNumberValue = *($(CardNumberValueStr),4)
  2314.     endif
  2315.  
  2316.    set-add Val = $(!CardIndex), $(Inc)
  2317.    Ifint $(CardNumberValue) == $(Val)
  2318.  
  2319. ; if found same card must increment otherwise will not be able to find
  2320. ; the card value which matchs since the previous card is
  2321. ; already removed.
  2322.        set-add Inc = $(Inc), 1
  2323.  
  2324. ; get the value which was assigned by setup
  2325.     GetRegValue $(KeyCurVer) "CardIndex" ScanIndexValueStr
  2326.       ifstr(i) $(ScanIndexValueStr) != ""
  2327.       set ScanIndexValue = *($(ScanIndexValueStr),4)
  2328.     endif
  2329.    else
  2330.     set-add ScanIndex = $(ScanIndex), 1
  2331.     Ifint $(ScanIndex) < 99
  2332.        goto ScanRemoveLoop
  2333.    endif
  2334.    endif
  2335.  
  2336.     Ifint $(ScanIndex) > 99
  2337.        Shell $(!STF_WINDOWSSYSPATH)"\subrouTN.INF", SetupMessage, $(!STF_LANGUAGE), "STATUS",+
  2338.        "No such cards"
  2339.         goto end
  2340.     endif
  2341.  
  2342.   ifint $(ScanIndexValue) < 10
  2343.     set comp = "0"
  2344.     set compstr = $(comp)$(ScanIndexValue)
  2345.   else
  2346.     set compstr = $(ScanIndexValue)
  2347.   endif
  2348.  
  2349. ; scan cards ends here
  2350.  
  2351.        set CardToRemoveStr = $(compstr)
  2352.  
  2353.        set EcnbKeyName = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$(CardToRemoveStr)
  2354.  
  2355.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  2356.         $(ProductSoftwareName), $(EcnbKeyName)
  2357.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2358.         Debug-Output "ShellCode error"
  2359.         goto ShellCodeError
  2360.     endif
  2361.     set RegistryErrorIndex = $($R0)
  2362. ;        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  2363. ;            goto fatalregistry
  2364. ;        endif
  2365.   
  2366.   set-add CardIndex = $(CardIndex), 1
  2367.  
  2368.    Ifint $(CardIndex) < $(EndIndex)
  2369.        goto RemoveCards
  2370.    endif
  2371.  
  2372.  
  2373.   endif
  2374.  
  2375.    install FreeServiceLibrary
  2376.  
  2377.    ; remove wan configurator files 
  2378.  
  2379.  
  2380.     goto end
  2381.  
  2382.   else
  2383.     goto end
  2384.   endif
  2385.  
  2386.   endif
  2387.  
  2388. UpgradeSoftware = +
  2389.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  2390.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  2391.     Ifstr $(KeyProduct) != $(KeyNull)
  2392.         GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  2393.         set Version = *($(VersionInfo), 4)
  2394.         Split-String $(!NTN_Infname), "\", FilenameList
  2395.         QueryListSize ListSize $(FilenameList)
  2396.         set !UG_Filename = *($(FilenameList), $(ListSize))
  2397.         install "Install-Update"
  2398.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  2399.         goto fatal
  2400.         endif
  2401.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  2402.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  2403.         ifint $(Version) != $(ProductVersion)
  2404.         endif
  2405.         CloseRegKey $(KeyProduct)
  2406.     else
  2407.         goto fatalregistry
  2408.     endif
  2409.     else
  2410.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  2411.           $(MAXIMUM_ALLOWED) NetworkCardKey
  2412.     Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  2413.         GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  2414.         set ServiceName = *($(ServiceNameInfo), 4)
  2415.         OpenRegKey $(NetworkCardKey) "" "NetRules" +
  2416.         $(MAXIMUM_ALLOWED) NetRuleKey
  2417.         Ifstr(i) $(NetRuleKey) != $(KeyNull)
  2418.         else
  2419.         goto fatalregistry
  2420.         endif
  2421.         CloseRegKey $(NetRules)
  2422.         CloseRegKey $(NetworkCardKey)
  2423.     else
  2424.         goto fatalregistry
  2425.     endif
  2426.     OpenRegKey $(!REG_H_LOCAL) "" +
  2427.           $(!NTN_ServiceBase)"\"$(ServiceName) +
  2428.           $(MAXIMUM_ALLOWED) ServiceKey
  2429.     Ifstr(i) $(ServiceKey) != $(KeyNull)
  2430.         CloseRegKey $(ServiceKey)
  2431.     else
  2432.         goto fatalregistry
  2433.     endif
  2434.     endif
  2435.     goto end
  2436. successful = +
  2437.     goto end
  2438. abandon = +
  2439.     ForListDo $(OEM_ABANDON_OPTIONS)
  2440.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  2441.         $(ProductSoftwareName), $($)
  2442.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2443.         Debug-Output "ShellCode error"
  2444.         goto ShellCodeError
  2445.     endif
  2446.     set RegistryErrorIndex = $($R0)
  2447.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  2448.         goto fatalregistry
  2449.     endif
  2450.     EndForListDo
  2451.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  2452.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  2453.         $(ProductSoftwareName), FALSE
  2454.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2455.         Debug-Output "ShellCode error"
  2456.         goto ShellCodeError
  2457.     endif
  2458.     set RegistryErrorIndex = $($R0)
  2459.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  2460.         goto fatalregistry
  2461.     endif
  2462.     endif
  2463.     goto end
  2464. warning = +
  2465.     Shell $(SubroutineInf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  2466.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2467.     goto ShellCodeError
  2468.     endif
  2469.     ifstr(i) $($R1) == "OK"
  2470.     goto $(to)
  2471.     else-ifstr(i) $($R1) == "CANCEL"
  2472.     goto $(from)
  2473.     else
  2474.     goto "end"
  2475.     endif
  2476. nonfatalinfo = +
  2477.     Set CommonStatus = STATUS_USERCANCEL
  2478.     Set Severity = STATUS
  2479.     goto nonfatalmsg
  2480. nonfatal = +
  2481.     Set Severity = NONFATAL
  2482.     goto nonfatalmsg
  2483. nonfatalmsg = +
  2484.     ifstr(i) $(Error) == ""
  2485.     Set Severity = NONFATAL
  2486.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  2487.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2488.         goto ShellCodeError
  2489.     endif
  2490.     set Error = $($R0)
  2491.     endif
  2492.     Shell $(SubroutineInf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  2493.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2494.     goto ShellCodeError
  2495.     endif
  2496.     ifstr(i) $($R1) == "OK"
  2497.     goto $(from)
  2498.     else
  2499.     goto "end"
  2500.     endif
  2501. fatalregistry = +
  2502.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  2503.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2504.     goto ShellCodeError
  2505.     endif
  2506.     set Error = $($R0)
  2507.     goto fatal
  2508. fataldetect = +
  2509.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  2510.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2511.     Debug-Output "ShellCode error: cannot get an error string."
  2512.     goto ShellCodeError
  2513.     endif
  2514.     set Error = $($R0)
  2515.     Goto fatal
  2516. fatal = +
  2517.     ifstr(i) $(Error) == ""
  2518.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  2519.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2520.         goto ShellCodeError
  2521.     endif
  2522.     set Error = $($R0)
  2523.     endif
  2524.     Shell $(SubroutineInf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  2525.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2526.     goto ShellCodeError
  2527.     endif
  2528.     goto setfailed
  2529. ShellCodeError = +
  2530.     set DlgType      = "MessageBox"
  2531.     set STF_MB_TITLE = "Error: "$(FunctionTitle$(Option))
  2532.     set STF_MB_TEXT  = "Shell Code Error"
  2533.     set STF_MB_TYPE  = 1
  2534.     set STF_MB_ICON  = 3
  2535.     set STF_MB_DEF   = 1
  2536.     ui start "Error Message"
  2537.     goto setfailed
  2538. setfailed = +
  2539.     set CommonStatus = STATUS_FAILED
  2540.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  2541.     set OEM_ABANDON_ON = FALSE
  2542.     goto abandon
  2543.     endif
  2544.     goto end
  2545. end = +
  2546.     goto term
  2547. term = +
  2548.     Return $(CommonStatus)
  2549.  
  2550.  
  2551. [ModifySystemPath]
  2552.   read-syms "Registry Constants"
  2553.   set Status = STATUS_FAILED
  2554.    set !True = 1
  2555.    set !False = 0
  2556.   ifstr(i) $($0) == ""
  2557.     goto EndModifySystemPath
  2558.   else-ifstr(i) $($1) == ""
  2559.     goto EndModifySystemPath
  2560.   endif
  2561.  
  2562.   set Action = $($0)
  2563.   set Dir    = $($1)
  2564.   OpenRegKey $(!REG_H_LOCAL) "" $(PathRegKeyName) $(MaskAllAccess) EnvKey
  2565.   ifstr(i) $(EnvKey) == $(KeyNull)
  2566.     goto EndModifySystemPath
  2567.   endif
  2568.  
  2569.   GetRegValue $(EnvKey) "Path" PathValue
  2570.   ifstr(i) $(PathValue) == $(KeyNull)
  2571.     CloseRegKey $(EnvKey)
  2572.     goto EndModifySystemPath
  2573.   endif
  2574.  
  2575.   set PathString    = *( $(PathValue), 4 )
  2576.   set FoundFlag     = $(!False)
  2577.   set Modify        = $(!False)
  2578.   set NewPathString = ""
  2579.  
  2580.   Split-String $(PathString) ";" PathDirList
  2581.   QueryListSize LastItem $(PathDirList)
  2582.  
  2583.   ForListDo $(PathDirList)
  2584.     ifstr(i) $($) != ";"
  2585.       ifstr(i) $($) == $(Dir)
  2586.         set FoundFlag = $(!True)
  2587.       else
  2588.         set NewPathString = $(NewPathString)$($)";"
  2589.       endif
  2590.     endif
  2591.   EndForListDo
  2592.  
  2593.   ifstr(i) $(FoundFlag) == $(!True)
  2594.     ifstr(i) $(Action) == "Delete"
  2595.       set Modify = $(!True)
  2596.     endif
  2597.   else
  2598.     ifstr(i) $(Action) == "Add"
  2599.       set NewPathString = $(NewPathString)$(Dir)";"
  2600.       set Modify = $(!True)
  2601.     endif
  2602.   endif
  2603.  
  2604.   ifstr(i) $(Modify) == $(!True)
  2605.     SetRegValue $(EnvKey) { "Path", $(NoTitle), $(!REG_VT_EXPAND_SZ), $(NewPathString) }
  2606.  
  2607.   set !LIB2HANDLE = ""
  2608.  
  2609.   LoadLibrary "" $(!STF_WINDOWSSYSPATH)\setupdll.dll !LIB2HANDLE
  2610.     ifstr(i) $(!LIB2HANDLE) != ""
  2611.       LibraryProcedure Result, $(!LIB2HANDLE), SetEnvVar, SYSTEM, +
  2612.                        "Path", $(NoTitle), $(!REG_VT_EXPAND_SZ), $(NewPathString)
  2613.   FreeLibrary $(!LIB2HANDLE)
  2614.   set !LIB2HANDLE = ""
  2615.  
  2616.     endif
  2617.   endif
  2618.  
  2619.   set Status = STATUS_SUCCESSFUL
  2620.   CloseRegKey $(EnvKey)
  2621.  
  2622. EndModifySystemPath =+
  2623.   return $(Status)
  2624.  
  2625.  
  2626. [GetWANSoftwarePath]
  2627.   set Status = STATUS_SUCCESSFUL
  2628.   set ProductPathStr = ""
  2629.   OpenRegKey $(!REG_H_LOCAL), "", +
  2630.          "SOFTWARE\Eicon\Ecnb\CurrentVersion", +
  2631.          $(!REG_KEY_READ), KeyCurVer
  2632.  
  2633.   ifstr(i) $(KeyCurVer) != $(KeyNull)
  2634.     GetRegValue $(KeyCurVer) "ConfigPath" ProductPathStr
  2635.  
  2636.     ifstr(i) $(ProductPathStr) != ""
  2637.       set !WANSoftwarePath = *($(ProductPathStr),4)
  2638. ;      Shell $(SubroutineInf), SetupMessage, $(!STF_LANGUAGE), "STATUS",  $(!WANSoftwarePath)
  2639.     endif
  2640.  
  2641.     CloseRegKey $(KeyCurVer)
  2642.  
  2643.     return $(Status) $(!WANSoftwarePath)
  2644.  
  2645.   else
  2646.     return STATUS_FAILED ""
  2647.  
  2648.   endif
  2649.  
  2650.  
  2651. [Install-Option]
  2652.     set STF_VITAL = ""
  2653.     ifstr(i) $(AddCopy) == "YES"
  2654.  
  2655.     CreateDir $(!WANRootDir)
  2656.  
  2657.         AddSectionFilesToCopyList Files-Wan $(SrcDir) $(!WANRootDir)
  2658.         AddSectionFilesToCopyList Files-WanSys $(SrcDir) $(!STF_WINDOWSSYSPATH)
  2659.  
  2660.     AddSectionFilesToCopyList Files-driver $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  2661.     AddSectionFilesToCopyList Files-Eicon-DLL $(SrcDir) $(!STF_WINDOWSSYSPATH)
  2662.         AddSectionFilesToCopyList Files-Eicon $(SrcDir) $(!WANRootDir)
  2663.         ifstr(i) $(!SystemType) == "ISA"
  2664.            AddSectionFilesToCopyList Files-CfgISA $(SrcDir) $(!WANRootDir)
  2665.         else
  2666.            AddSectionFilesToCopyList Files-CfgMCA $(SrcDir) $(!WANRootDir)
  2667.         endif
  2668.     AddSectionFilesToCopyList Files-EcUtl $(SrcDir) $(!STF_WINDOWSSYSPATH)
  2669.  
  2670.  
  2671.     endif
  2672.     ifstr(i) $(DoCopy) == "YES"
  2673.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  2674.        CopyFilesInCopyList
  2675.  
  2676.        set EiconGroup = "Eicon Technology"
  2677.  
  2678.        CreateCommonProgManGroup $(EiconGroup) ""
  2679.  
  2680.        CreateCommonProgmanItem  $(EiconGroup) "Release Notes" +
  2681.                 "notepad.exe "$(!WANRootDir)"\wanntrel.txt" +
  2682.                 "" 0
  2683.  
  2684.        CreateCommonProgmanItem  $(EiconGroup) "Error Messages" +
  2685.                 "notepad.exe "$(!WANRootDir)"\wannterr.txt" +
  2686.                 "" 0
  2687.     endif
  2688.     ifstr(i) $(DoConfig) == "YES"
  2689.     endif
  2690.     Exit
  2691.  
  2692. ;-----------------------------------------------------------------------------
  2693. [DestPathDlg]
  2694.   DlgType       = "Edit"
  2695.   DlgTemplate   = "IDD_DESTPATH"
  2696.   Caption       = "Installation Path"
  2697.   DlgText1      = "The WAN Services for Windows NT files will be installed in the "+
  2698.          "directory shown below."$(!LF)$(!LF)+
  2699.           "To install the files somewhere else, edit the path."
  2700.   EditLabel1    = "Install to:"
  2701.   EditTextIn    = $(!WANRootDir)
  2702.   EditFocus     = "END"
  2703.   EditTextLim   = 255
  2704.   Continue      = "&OK"
  2705.   Back          = "&Cancel"
  2706. ;  Help          = "&Help"
  2707. ;  Exit          = "E&xit"
  2708. ;  HelpContext   = #( HelpContextIDs, $(DlgTemplate), 1 )
  2709.  
  2710.  
  2711.  
  2712.  
  2713. ;;-----------------------------------------------------------------------------
  2714. ;[SetupModeDlg]
  2715. ;  DlgType       = "MultiCombo"
  2716. ;  DlgTemplate   = "IDD_SETUPMODE"
  2717. ;  Caption       = "Eicon Card Selection"
  2718. ;  DlgText1      = "Please choose the type of Eicon Card you need to install on your system"
  2719. ;  ComboCardLabel = "&Card Type"
  2720. ;  Continue      = "&OK"
  2721. ;  Back          = "&Cancel"
  2722. ;;  Help          = "&Help"
  2723. ;;  Exit          = "E&xit"
  2724. ;;  HelpContext   = #( HelpContextIDs, $(DlgTemplate), 1 )
  2725. ;
  2726.  
  2727.  
  2728. [Install-Update]
  2729.    set STF_VITAL        = ""
  2730.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  2731.    AddSectionFilesToCopyList Files-driver $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  2732.    AddSectionFilesToCopyList Files-Eicon-DLL $(SrcDir) $(!STF_WINDOWSSYSPATH)
  2733.  
  2734. ; must add code to scan wan path to update software
  2735.   shell "" GetWANSoftwarePath
  2736.  
  2737.    AddSectionFilesToCopyList Files-WanSys $(SrcDir) $(!STF_WINDOWSSYSPATH)
  2738.    AddSectionFilesToCopyList Files-Wan $(SrcDir) $(!WANRootDir)
  2739.    AddSectionFilesToCopyList Files-Eicon $(SrcDir) $(!WANRootDir)
  2740.    AddSectionFilesToCopyList Files-EcUtl $(SrcDir) $(!STF_WINDOWSSYSPATH)
  2741.  
  2742.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  2743.    CopyFilesInCopyList
  2744.    exit
  2745.  
  2746.  
  2747. [DeInstall-Option]
  2748.  
  2749. ;   Debug-Msg "DeInstall-Option"
  2750.  
  2751.     set RemoveList = {}
  2752.     set RemoveList = >($(RemoveList), #(UtilFiles-RemoveList, FILE1, 1))
  2753.     set RemoveList = >($(RemoveList), #(UtilFiles-RemoveList, FILE2, 1))
  2754.     set RemoveList = >($(RemoveList), #(UtilFiles-RemoveList, FILE3, 1))
  2755.  
  2756.  
  2757.     ForListDo $(RemoveList)
  2758. ;       Debug-Msg "Removing "$($)
  2759.         LibraryProcedure Status , $(!LIBHANDLE), DelFile $(!STF_WINDOWSSYSPATH)"\"$($)
  2760. ;       Debug-Msg "Status is "$(Status)
  2761.     EndForListDo
  2762.  
  2763.  
  2764.  
  2765.     set RemoveList = {}
  2766.     set RemoveList = >($(RemoveList), #(ConfigFiles-RemoveList, FILE1, 1))
  2767.     set RemoveList = >($(RemoveList), #(ConfigFiles-RemoveList, FILE2, 1))
  2768.     set RemoveList = >($(RemoveList), #(ConfigFiles-RemoveList, FILE3, 1))
  2769.     set RemoveList = >($(RemoveList), #(ConfigFiles-RemoveList, FILE4, 1))
  2770.     set RemoveList = >($(RemoveList), #(ConfigFiles-RemoveList, FILE5, 1))
  2771.     set RemoveList = >($(RemoveList), #(ConfigFiles-RemoveList, FILE6, 1))
  2772.     set RemoveList = >($(RemoveList), #(ConfigFiles-RemoveList, FILE7, 1))
  2773.     set RemoveList = >($(RemoveList), #(ConfigFiles-RemoveList, FILE8, 1))
  2774.     set RemoveList = >($(RemoveList), #(ConfigFiles-RemoveList, FILE9, 1))
  2775.     set RemoveList = >($(RemoveList), #(ConfigFiles-RemoveList, FILE10, 1))
  2776.     set RemoveList = >($(RemoveList), #(ConfigFiles-RemoveList, FILE11, 1))
  2777.     set RemoveList = >($(RemoveList), #(ConfigFiles-RemoveList, FILE12, 1))
  2778.     set RemoveList = >($(RemoveList), #(ConfigFiles-RemoveList, FILE13, 1))
  2779.     set RemoveList = >($(RemoveList), #(ConfigFiles-RemoveList, FILE14, 1))
  2780.     set RemoveList = >($(RemoveList), #(ConfigFiles-RemoveList, FILE15, 1))
  2781.     set RemoveList = >($(RemoveList), #(ConfigFiles-RemoveList, FILE16, 1))
  2782.     set RemoveList = >($(RemoveList), #(ConfigFiles-RemoveList, FILE17, 1))
  2783.     set RemoveList = >($(RemoveList), #(ConfigFiles-RemoveList, FILE18, 1))
  2784.  
  2785.     ForListDo $(RemoveList)
  2786. ;       Debug-Msg "Removing "$($)
  2787.         LibraryProcedure Status , $(!LIBHANDLE), DelFile $(ConfigFilePath)"\"$($)
  2788. ;       Debug-Msg "Status is "$(Status)
  2789.     EndForListDo
  2790.  
  2791.  
  2792.     set RemoveList = {}
  2793. ;    set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE1, 1))
  2794. ;    set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE2, 1))
  2795.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE3, 1))
  2796.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE4, 1))
  2797.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE5, 1))
  2798.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE6, 1))
  2799.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE7, 1))
  2800.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE8, 1))
  2801.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE9, 1))
  2802.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE10, 1))
  2803.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE11, 1))
  2804.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE12, 1))
  2805.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE13, 1))
  2806.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE14, 1))
  2807.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE15, 1))
  2808.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE16, 1))
  2809.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE17, 1))
  2810.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE18, 1))
  2811.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE19, 1))
  2812.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE20, 1))
  2813.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE21, 1))
  2814.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE22, 1))
  2815.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE23, 1))
  2816.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE24, 1))
  2817.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE25, 1))
  2818.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE26, 1))
  2819.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE27, 1))
  2820.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE28, 1))
  2821.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE29, 1))
  2822.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE30, 1))
  2823.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE31, 1))
  2824.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE32, 1))
  2825.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE33, 1))
  2826.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE34, 1))
  2827.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE35, 1))
  2828.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE36, 1))
  2829.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE37, 1))
  2830.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE38, 1))
  2831.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE39, 1))
  2832.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE40, 1))
  2833.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE41, 1))
  2834.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE42, 1))
  2835.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE43, 1))
  2836.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE44, 1))
  2837.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE45, 1))
  2838.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE46, 1))
  2839.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE47, 1))
  2840.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE48, 1))
  2841.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE49, 1))
  2842.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE50, 1))
  2843.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE51, 1))
  2844.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE52, 1))
  2845.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE53, 1))
  2846.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE54, 1))
  2847.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE55, 1))
  2848.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE56, 1))
  2849.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE57, 1))
  2850.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE58, 1))
  2851.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE59, 1))
  2852.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE60, 1))
  2853.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE61, 1))
  2854.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE62, 1))
  2855.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE63, 1))
  2856.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE64, 1))
  2857.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE65, 1))
  2858.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE66, 1))
  2859.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE67, 1))
  2860.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE68, 1))
  2861.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE69, 1))
  2862.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE70, 1))
  2863.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE71, 1))
  2864.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE72, 1))
  2865.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE73, 1))
  2866.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE74, 1))
  2867.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE75, 1))
  2868.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE76, 1))
  2869.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE77, 1))
  2870.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE78, 1))
  2871.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE79, 1))
  2872.     set RemoveList = >($(RemoveList), #(DriverFiles-RemoveList, FILE80, 1))
  2873.  
  2874.     ForListDo $(RemoveList)
  2875. ;       Debug-Msg "Removing "$($)
  2876.         LibraryProcedure Status , $(!LIBHANDLE), DelFile $(ConfigFilePath)"\"$($)
  2877. ;       Debug-Msg "Status is "$(Status)
  2878.     EndForListDo
  2879.  
  2880. ; Remove eicon group in progman
  2881. ; Do not remove for now
  2882. ;    set EiconGroup = "Eicon Technology"
  2883. ;    set EiconGroupItem1 = "Release Notes"
  2884. ;    set EiconGroupItem2 = "Error Messages"
  2885.  
  2886. ;    RemoveCommonProgManItem $(EiconGroup), $(EiconGroupItem1)
  2887. ;    RemoveCommonProgManItem $(EiconGroup), $(EiconGroupItem2)
  2888. ;    RemoveCommonProgManGroup $(EiconGroup)
  2889.  
  2890.     exit
  2891.  
  2892. [Source Media Descriptions]
  2893.     1  = "WAN Services for Windows NT Disk #1"  , TAGFILE = disk1
  2894.     2  = "WAN Services for Windows NT Disk #2"  , TAGFILE = disk2
  2895. [ProductType]
  2896. STF_PRODUCT  = Winnt
  2897. STF_PLATFORM = I386
  2898. ;[Files-Inf]
  2899. ;1,     oemsetup.inf,    SIZE=1000,     RENAME=$(!UG_Filename)
  2900.  
  2901.  
  2902. [Files-Driver]
  2903. 1, Ecnb.sys
  2904. [Files-Eicon-DLL]
  2905. 1, ecbios.dll
  2906. 1, eccrpi.dll
  2907.  
  2908. [Files-CfgISA]
  2909. 1, tempisa.eic, RENAME=eccfg.eic
  2910.  
  2911. [Files-CfgMCA]
  2912. 1, tempmca.eic, RENAME=eccfg.eic
  2913.  
  2914. [Files-Wan]
  2915. 2, eccfgwnt.lod    
  2916. 2, uk.dat          
  2917. 2, us_other.dat    
  2918. ;2, eccfg.eic       
  2919. 2, eem.dll         
  2920. 2, cfgerr.dll      
  2921. 2, eccfgwnt.exe    
  2922. 2, hproto.dll      
  2923. 2, cfg_itoc.dll    
  2924. 2, dlg.dll         
  2925. 2, dialers.dll     
  2926. 2, cfglib.dll      
  2927. 2, base.dll        
  2928. 2, lproto.dll      
  2929. 2, wntconf.hlp     
  2930. 2, elibs.dll       
  2931.  
  2932.  
  2933. [Files-WanSys]
  2934. 2, ctl3d.dll
  2935.  
  2936.  
  2937. [Files-EcUtl]
  2938. 1, ecutl_nt.dll
  2939. 1, ecutl_nt.exp
  2940.  
  2941. [Files-Eicon]
  2942. 1, relnotes.txt, RENAME=wanntrel.txt
  2943. 1, wannterr.txt
  2944.  
  2945. ;1, oemsetup.inf
  2946. 1, eccard.msg
  2947. 1, ecmderr.msg
  2948. 1, eccommon.msg
  2949. ;1, eccfg.hlp
  2950. 1, alrm.elm
  2951. 1, alrmbios.elm  
  2952. 1, asydpna.elm   
  2953. 1, asyec.elm     
  2954. 1, asyhsi.elm    
  2955. ;1, asyimc.elm   
  2956. 1, asympn2.elm   
  2957. 1, asyna.elm     
  2958. 1, asyspcc.elm   
  2959. 1, bios.elm      
  2960. 1, bopdpna.elm   
  2961. 1, bopec.elm     
  2962. 1, bophsi.elm    
  2963. 1, bopimc.elm    
  2964. 1, bopmpn2.elm   
  2965. 1, bopmpna.elm   
  2966. 1, bopna.elm     
  2967. 1, bopspcc.elm   
  2968. 1, conm.elm      
  2969. 1, conmbios.elm  
  2970. 1, dial.elm      
  2971. 1, dialbios.elm  
  2972. 1, dlc.elm       
  2973. 1, dlcbios.elm   
  2974. 1, ectest.elm    
  2975. 1, hdlc.elm      
  2976. 1, hdlcbios.elm  
  2977. 1, os_dpna.elm   
  2978. 1, os_ec.elm     
  2979. 1, os_hsi.elm    
  2980. 1, os_mpn2.elm   
  2981. 1, os_mpna.elm   
  2982. 1, os_na.elm     
  2983. 1, os_imc.elm    
  2984. 1, os_spcc.elm   
  2985. 1, rs_dpna.elm   
  2986. 1, rs_ec.elm     
  2987. 1, rs_hsi.elm    
  2988. 1, rs_mpn2.elm   
  2989. 1, rs_mpna.elm   
  2990. 1, rs_na.elm     
  2991. 1, rs_spcc.elm   
  2992. 1, sdlc.elm      
  2993. 1, sdlcbios.elm  
  2994. 1, v22imc.elm
  2995. 1, v25bdpna.elm  
  2996. 1, v25bec.elm    
  2997. 1, v25bhsi.elm   
  2998. 1, v25bmpn2.elm  
  2999. 1, v25bmpna.elm  
  3000. 1, v25bna.elm    
  3001. 1, v25bspcc.elm  
  3002. 1, v32bimc.elm
  3003. 1, verifcfg.elm  
  3004. 1, x25.elm       
  3005. 1, x25bios.elm 
  3006. 1, xpti.elm  
  3007. 1, xptibios.elm  
  3008. 1, xptt.elm  
  3009. 1, xpttbios.elm  
  3010.  
  3011. 2, eclist.exe    
  3012. 2, eccard.exe    
  3013. ;2, eccfg.exe    
  3014. 2, ecload.exe    
  3015. 2, ecport.exe    
  3016. 2, ecmodule.exe  
  3017. 2, ecstatus.exe  
  3018. 2, ecstats.exe   
  3019. 2, ectrace.exe   
  3020. 2, ecver.exe     
  3021. 2, ecsrv.exe     
  3022. 2, ecdialer.exe
  3023.  
  3024.  
  3025. [ConfigFiles-RemoveList]
  3026.  
  3027. FILE1=eccfgwnt.lod
  3028. FILE2=uk.dat
  3029. FILE3=us_other.dat
  3030. FILE4=eccfg.eic
  3031. FILE5=eem.dll
  3032. FILE6=cfgerr.dll
  3033. FILE7=eccfgwnt.exe
  3034. FILE8=hproto.dll
  3035. FILE9=cfg_itoc.dll
  3036. FILE10=dlg.dll
  3037. FILE11=dialers.dll
  3038. FILE12=cfglib.dll
  3039. FILE13=base.dll
  3040. FILE14=lproto.dll
  3041. FILE15=wntconf.hlp
  3042. FILE16=elibs.dll
  3043. FILE17=eccfg.ini
  3044. FILE18=ec.cfg
  3045.        
  3046.  
  3047.  
  3048. [DriverFiles-RemoveList]
  3049. FILE1=ecutl_nt.dll
  3050. FILE2=ecutl_nt.exp
  3051. FILE3=eccard.msg
  3052. FILE4=ecmderr.msg
  3053. FILE5=eccommon.msg
  3054. FILE6=alrm.elm
  3055. FILE7=alrmbios.elm  
  3056. FILE8=asydpna.elm   
  3057. FILE9=asyec.elm     
  3058. FILE10=asyhsi.elm    
  3059. FILE11=asympn2.elm   
  3060. FILE12=asyna.elm     
  3061. FILE13=asyspcc.elm   
  3062. FILE14=bios.elm      
  3063. FILE15=bopdpna.elm   
  3064. FILE16=bopec.elm     
  3065. FILE17=bophsi.elm    
  3066. FILE18=bopimc.elm    
  3067. FILE19=bopmpn2.elm   
  3068. FILE20=bopmpna.elm   
  3069. FILE21=bopna.elm     
  3070. FILE22=bopspcc.elm   
  3071. FILE23=conm.elm      
  3072. FILE24=conmbios.elm  
  3073. FILE25=dial.elm      
  3074. FILE26=dialbios.elm  
  3075. FILE27=dlc.elm       
  3076. FILE28=dlcbios.elm   
  3077. FILE29=ectest.elm    
  3078. FILE30=hdlc.elm      
  3079. FILE31=hdlcbios.elm  
  3080. FILE32=os_dpna.elm   
  3081. FILE33=os_ec.elm     
  3082. FILE34=os_hsi.elm  
  3083. FILE35=os_mpn2.elm 
  3084. FILE36=os_mpna.elm 
  3085. FILE37=os_na.elm   
  3086. FILE38=os_imc.elm  
  3087. FILE39=os_spcc.elm 
  3088. FILE40=rs_dpna.elm 
  3089. FILE41=rs_ec.elm   
  3090. FILE42=rs_hsi.elm  
  3091. FILE43=rs_mpn2.elm 
  3092. FILE44=rs_mpna.elm 
  3093. FILE45=rs_na.elm   
  3094. FILE46=rs_spcc.elm 
  3095. FILE47=sdlc.elm    
  3096. FILE48=sdlcbios.elm
  3097. FILE49=v22imc.elm
  3098. FILE50=v25bdpna.elm  
  3099. FILE51=v25bec.elm    
  3100. FILE52=v25bhsi.elm   
  3101. FILE53=v25bmpn2.elm  
  3102. FILE54=v25bmpna.elm  
  3103. FILE55=v25bna.elm    
  3104. FILE56=v25bspcc.elm  
  3105. FILE57=v32bimc.elm
  3106. FILE58=verifcfg.elm  
  3107. FILE59=x25.elm       
  3108. FILE60=x25bios.elm   
  3109. FILE61=eclist.exe    
  3110. FILE62=eccard.exe    
  3111. FILE63=ecload.exe    
  3112. FILE64=ecport.exe    
  3113. FILE65=ecmodule.exe  
  3114. FILE66=ecstatus.exe  
  3115. FILE67=ecstats.exe   
  3116. FILE68=ectrace.exe   
  3117. FILE69=ecver.exe     
  3118. FILE70=ecsrv.exe     
  3119. FILE71=ecbios.dll
  3120. FILE72=eccrpi.dll
  3121. FILE73=Ecnb.sys
  3122. FILE74=wanntrel.txt
  3123. FILE75=wannterr.txt
  3124. FILE76=ecdialer.exe
  3125. FILE77=xpti.elm
  3126. FILE78=xptibios.elm
  3127. FILE79=xptt.elm
  3128. FILE80=xpttbios.elm
  3129.  
  3130.  
  3131. [UtilFiles-RemoveList]
  3132. FILE1=ecutl_nt.dll
  3133. FILE2=ecutl_nt.exp
  3134. FILE3=ctl3d.dll
  3135.