home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2000 March / VPR0003B.ISO / drvlibj / ras / surf2 / oemsetnt.inf < prev    next >
INI File  |  1999-10-14  |  66KB  |  1,671 lines

  1. ;***********************************************************************
  2. ; Elmic Systems ELRASNS Driver Setup File. (NT 4.0)
  3. ;***********************************************************************
  4. [Identification]
  5.     OptionType = NetAdapter
  6.  
  7. ;***********************************************************************
  8. ;
  9. ;***********************************************************************
  10. [PlatformsSupported]
  11.     ISA
  12.     EISA
  13.     "Jazz-Internal Bus"
  14.  
  15. ;***********************************************************************
  16. ;
  17. ;***********************************************************************
  18. [Options]
  19.    ELRASNS_ISA
  20.    ELRASNS_PCMCIA
  21.  
  22. ;***********************************************************************
  23. ;
  24. ;***********************************************************************
  25. [FileConstants]
  26.     InfName                 = "OEMELRAS.INF"
  27.     UtilityInf              = "UTILITY.INF"
  28.     ParamInf                = "NCPARAM.INF"
  29.     subroutineinf           = "SUBROUTN.INF"
  30.     SoftwareType            = "driver"
  31.     Exit_Code               = 0
  32.     NetEventDLL             = "%SystemRoot%\System32\netevent.dll"
  33.     IoLogMsgDLL             = "%SystemRoot%\System32\IoLogMsg.dll"
  34.     Manufacturer            = "Elmic Systems"
  35.     ProductMajorVersion     = "4"
  36.     ProductMinorVersion     = "0"
  37.     ProductVersion          = $(ProductMajorVersion)"."$(ProductMinorVersion)
  38.     ProductSoftwareName     = "ELRASNS"
  39.     ProductSoftwareImagePath = "\SystemRoot\System32\drivers\ELRASNSN.SYS"
  40.     NetRuleSoftwareType     = "ELRASNSSys ELRASNSDriver"
  41.     NetRuleSoftwareUse      = $(SoftwareType)
  42.     NetRuleSoftwareBindForm = """ELRASNSSys"" yes no container"
  43.     NetRuleSoftwareClass    = {"ELRASNSDriver basic"}
  44.     NetRuleSoftwareBindable = {"ELRASNSDriver ELRASNSAdapter non exclusive 100"}
  45.     ProductHardwareName     = "ELRASNS"
  46.     NetRuleHardwareBindForm = " yes yes container"
  47.     NetRuleHardwareELRASNSType = "ELRASNS ELRASNSAdapter"
  48.     NetRuleHardwareELRASNSClass = {"ELRASNSAdapter basic"}
  49.     BindableELRASNSTxt      = {"ELRASNSDriver ELRASNSAdapter non exclusive 100"}
  50.     DeviceMap               = "HARDWARE\DEVICEMAP"
  51.     TapiDevices             = "TAPI DEVICES"
  52.     TapiDeviceKey           = $(ProductHardwareName)
  53.     TapiMediaType           = "ISDN"
  54.     ProductKeyName          = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"+
  55.                               $(ProductSoftwareName)"\CurrentVersion"
  56.     ParamKeyName            = $(!NTN_ServiceBase)"\"$(ProductHardwareName)+
  57.                               "\Parameters"
  58. ;'96 11/14
  59.     ProductOpSupport     = 134
  60.  
  61. ;   FIXME - default to dialup line mode = 1 -- leased line = 0
  62. ;   In dialup mode we need to write the parameters so RAS/TAPI will bind to us
  63. ;   In leased mode we need to write the parameters so NDIS/WAN will bind to us
  64. ;   Right now this file only supports dialup mode - leased line changes are needed 
  65.  
  66.     LineType                = 1
  67.     DebugFlags              = 0
  68.     IO_Addr_List           = {800, 768, 832, 864, 896, 928, 960, 992}
  69.     IRQ_List                = {15, 3, 4, 5, 7, 10, 11,12}
  70.     SwitchType_List         = {16, 1, 2, 4}
  71.  
  72. ;***********************************************************************
  73. ; '96 5/27
  74. ;***********************************************************************
  75.  
  76.     NumberOfLines            = 2
  77.     BoardName                = "ELRASNS"
  78.     Port1Name                = "ISDN1"
  79.     Port2Name                = "ISDN2"
  80.  
  81.     !ELInterruptNumber        = "15"
  82.     !ELIoBaseAddress            = "800"
  83.     !ELSwitchType                = "16"
  84.     Channel0_SPID            = ""
  85.     Channel0_Phone            = ""
  86.     Channel1_SPID            = ""
  87.     Channel1_Phone            = ""
  88.  
  89. ; '96 6/6
  90.     AfterInit                = 0
  91. ;'96 11/5
  92.     ErrorLog                = 1
  93. ;'96 11/7
  94.     ELHANDLE                = 0
  95. ;'96 11/8
  96.     !ELHardName                = 0
  97.  
  98. ;***********************************************************************
  99. ; '96 6/6
  100. ;***********************************************************************
  101.  
  102. ; PCMCIA FIXED BEGINE
  103.  
  104. PCMCIADBKeyName                = $(!NTN_ServiceBase)"\Pcmcia\DataBase"
  105. PCMCIAManufacture            = "ELMIC SYSTEMS, INC."
  106. PCMCIAModel                    = "PC-INS/NS1-PS"
  107.  
  108. ; PCMCIA FIXED END
  109.  
  110.  
  111. ;***********************************************************************
  112. ;
  113. ;***********************************************************************
  114. [GeneralConstants]
  115.     from                    = ""
  116.     to                      = ""
  117.     ExitCodeOk              = 0
  118.     ExitCodeCancel          = 1
  119.     ExitCodeFatal           = 2
  120.     KeyNull                 = ""
  121.     MAXIMUM_ALLOWED         = 33554432
  122.     RegistryErrorIndex      = NO_ERROR
  123.     KeyProduct              = ""
  124.     KeyParameters           = ""
  125.     KeyElmic                = ""
  126.     TRUE                    = 1
  127.     FALSE                   = 0
  128.     NoTitle                 = 0
  129.     ExitState               = "Active"
  130.     OldVersionExisted       = $(FALSE)
  131.     DriverPath              = $(!STF_NTPATH)\drivers
  132.  
  133. ;***********************************************************************
  134. ;
  135. ;***********************************************************************
  136. [Date]
  137.     Now                     = {} ? $(!LIBHANDLE) GetSystemDate
  138.  
  139. ;***********************************************************************
  140. ;
  141. ;***********************************************************************
  142. [Identify]
  143.     Read-Syms Identification
  144.     Set Status      = STATUS_SUCCESSFUL
  145.     Set Identifier  = $(OptionType)
  146.     Set Media       = #("Source Media Descriptions", 1, 1)
  147.     Return $(Status) $(Identifier) $(Media)
  148.  
  149. ;***********************************************************************
  150. ;
  151. ;***********************************************************************
  152. [ReturnOptions]
  153.     Set Status          = STATUS_FAILED
  154.     Set OptionList      = {}
  155.     Set OptionTextList  = {}
  156.     Set LanguageList    = ^(LanguagesSupported, 1)
  157.  
  158.     IfContains(i) $($0) in $(LanguageList)
  159.         IfStr(i) $($1) == ""
  160.             GoTo SetOptions
  161.         EndIf
  162.         Set PlatformList = ^(PlatformsSupported, 1)
  163.         IfContains(i) $($1) in $(PlatformList)
  164.             GoTo SetOptions
  165.         Else
  166.             Set Status = STATUS_NOTSUPPORTED
  167.             GoTo ExitReturnOptions
  168.         EndIf
  169.     Else
  170.         Set Status = STATUS_NOLANGUAGE
  171.         GoTo ExitReturnOptions
  172.     EndIf
  173.  
  174. SetOptions = +
  175.     Set OptionList     = ^(Options, 1)
  176.     Set OptionTextList = ^(OptionsText$($0), 1)
  177.     Set Status         = STATUS_SUCCESSFUL
  178.  
  179. ExitReturnOptions = +
  180.     Return $(Status) $(OptionList) $(OptionTextList)
  181.  
  182. ;***********************************************************************
  183. ;
  184. ;***********************************************************************
  185. [InstallOption]
  186.     Set Status   = STATUS_FAILED
  187.     Set Option   = $($1)
  188.     Set SrcDir   = $($2)
  189.     Set RasDir   = $($2)
  190.     Set AddCopy  = $($3)
  191.     Set DoCopy   = $($4)
  192.     Set DoConfig = $($5)
  193.     Set LanguageList = ^(LanguagesSupported, 1)
  194.  
  195.     Set OptionSub = $(Option)
  196.     Set Option    = "ELRASNS"
  197. ;'96 8/28    Set Option    = "Surf2Surf Model II"
  198.  
  199.     IfContains(i) $($0) NOT-IN $(LanguageList)
  200.         Return STATUS_NOLANGUAGE
  201.     EndIf
  202.     ;
  203.     ; FIXME - make sure this flag is disabled before shipping
  204.     ;
  205.     Set OldDebugControl = $(!DebugOutputControl)
  206. ;'96 11/1    Set !DebugOutputControl = 1
  207.  
  208.     Set-Subst LF = "\n"
  209.  
  210.     Read-Syms GeneralConstants
  211.     Read-Syms FileConstants
  212.     Read-Syms DialogConstants$(!STF_LANGUAGE)
  213.  
  214.     IfStr(i) $(!NTN_Origination) == "NCPA"
  215.         Set Continue = $(OK)
  216.     EndIf
  217.  
  218.     Read-Syms FileConstants$(!STF_LANGUAGE)
  219.     Detect Date
  220.     Set-Title  $(FunctionTitle)$(OptionSub)
  221.  
  222.     Set to   = Begin
  223.     Set from = Begin
  224.     Set CommonStatus = STATUS_SUCCESSFUL
  225.  
  226.     EndWait
  227.  
  228. ;***********************************************************************
  229. ;
  230. ;***********************************************************************
  231. Begin = +
  232.     Set ActivateDetection = FALSE
  233.     IfStr(i) $(!NTN_InstallMode) == deinstall
  234.         Set StartLabel = RemoveAdapter
  235.     Else-IfStr(i) $(!NTN_InstallMode) == Update
  236.         Set StartLabel = UpgradeSoftware
  237.     Else-IfStr(i) $(!NTN_InstallMode) == bind
  238.         Set StartLabel = BindingAdapter
  239.     Else-IfStr(i) $(!NTN_InstallMode) == configure
  240.         Set StartLabel = ConfigureAdapter
  241. ;'96 11/5        Set ActivateDetection = TRUE
  242.         Set CommonStatus = STATUS_REBOOT
  243.         IfStr(i) $(ProductKeyName) == $(!NTN_RegBase)
  244.             Debug-Output $(InfName)": Cannot configure the EtherWORKS 3 driver software."
  245.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  246.             IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  247.                 Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  248.                 GoTo ShellCodeError
  249.             EndIf
  250.             Set Error = $($R0)
  251.             Set from = end
  252.             Set to = end
  253.             GoTo NonFatalInfo
  254.         EndIf
  255.     Else
  256.         Set StartLabel = InstallAdapter
  257.         Set ActivateDetection = TRUE
  258.         Set OEM_ABANDON_OPTIONS = {}
  259.         Set OEM_ABANDON_SOFTWARE = FALSE
  260.         Set OEM_ABANDON_ON = TRUE
  261.     EndIf
  262.  
  263.     Debug-Output $(InfName)": =================================================="
  264.     Debug-Output $(InfName)": STF_CWDIR is: "$(!STF_CWDIR)
  265.     Debug-Output $(InfName)": STF_LANGUAGE is: "$(!STF_LANGUAGE)
  266.     Debug-Output $(InfName)": Option is: "$(Option)
  267.     Debug-Output $(InfName)": !STF_NCDETECT  is: "$(!STF_NCDETECT)
  268.     Debug-Output $(InfName)": !STF_NCOPTION  is: "$(!STF_NCOPTION)
  269.     Debug-Output $(InfName)": !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  270.     Debug-Output $(InfName)": !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  271.     Debug-Output $(InfName)": =================================================="
  272.  
  273.     Set DetectedCard = FALSE
  274.     IfStr(i) $(ActivateDetection) != TRUE
  275.         GoTo $(StartLabel)
  276.     EndIf
  277.  
  278.     Debug-Output $(InfName)": Calling Param_SetDefaults"
  279.     Shell $(ParamInf) Param_SetDefaults {}
  280.  
  281.     Shell $(ParamInf) HexListFromDecList $(IO_Addr_List)
  282.     Set IO_Hex_List = $($R0)
  283.  
  284.     Shell $(ParamInf) HexListFromDecList $(SwitchType_List)
  285.     Set SwitchType_Hex_List = $($R0)
  286.  
  287.     IfStr(i) $(!STF_NCDETECT) == YES
  288.         IfStr(i) $(!STF_NCOPTION) == $(Option)
  289.            Set DetectedCard = TRUE
  290.            Debug-Output $(InfName)": Setting DetectedCard to TRUE"
  291.         EndIf
  292.     EndIf
  293.  
  294.     Shell "" DebugConfiguration "After parameter querying"
  295.     Set from = FatalError
  296.     Set to = FatalError
  297.     GoTo $(StartLabel)
  298.  
  299. ;***********************************************************************
  300. ;
  301. ;***********************************************************************
  302. InstallAdapter = +
  303. ; '96 10/28 PCMCIA FIXED BEGINE
  304.  
  305.     ifstr(i) $(OptionSub) == ELRASNS_PCMCIA
  306.         OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADBKeyName) $(MAXIMUM_ALLOWED) PCMCIADBKey
  307.         ifstr $(PCMCIADBKey) == $(NULL)    
  308.             CloseRegKey $(PCMCIADBKey)      
  309.         Debug-Output "PCMCIA service not present"
  310.             goto nonfatal
  311.         else
  312.             OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADBKeyName)"\"$(PCMCIAManufacture) $(MAXIMUM_ALLOWED) PCMCIA$(PCMCIAManufacture)Key
  313.             ifstr $(PCMCIA$(PCMCIAManufacture)Key) == $(NULL)
  314.                 debug-output "Adding "$(PCMCIADBKeyName)"\"$(PCMCIAManufacture)
  315.             CreateRegKey $(PCMCIADBKey) {$(PCMCIAManufacture), 0, 0} "" $(MAXIMUM_ALLOWED) "" PCMCIA$(PCMCIAManufacture)Key
  316.             else 
  317.                 debug-output "Manufacture sub key already exist"
  318.             endif
  319.             OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADBKeyName)"\"$(PCMCIAManufacture)"\"$(PCMCIAModel) $(MAXIMUM_ALLOWED) PCMCIA$(PCMCIAManufacture)$(PCMCIAModel)Key
  320.             ifstr $(PCMCIA$(PCMCIAManufacture)$(PCMCIAModel)Key) == $(NULL)
  321.                 debug-output "Adding "$(PCMCIADBKeyName)"\"$(PCMCIAManufacture)"\"$(PCMCIAModel)
  322.                 CreateRegKey $(PCMCIA$(PCMCIAManufacture)Key) {$(PCMCIAModel), 0, 0} "" $(MAXIMUM_ALLOWED) "" PCMCIA$(PCMCIAManufacture)$(PCMCIAModel)Key
  323.                 SetRegValue $(PCMCIA$(PCMCIAManufacture)$(PCMCIAModel)Key) {Driver, 0, $(!REG_VT_SZ),"ELRASNS"}
  324. ;'96 11/15
  325.                 SetRegValue $(PCMCIA$(PCMCIAManufacture)$(PCMCIAModel)Key) {DeviceType, 0, $(!REG_VT_SZ),"NET"}
  326.             else
  327.                 debug-output "Device sub key already exist"
  328.             endif
  329.             CloseRegKey $(PCMCIA$(PCMCIAManufacture)$(PCMCIAModel)Key)
  330.             CloseRegKey $(PCMCIA$(PCMCIAManufacture)Key)
  331.             CloseRegKey $(PCMCIADBKey)
  332.         endif
  333.         Debug-Output $(InfName)": Option = $(OptionSub)(PCMCIA)"
  334.     else
  335.         ; '96 10/28 ISA Bus
  336.         Debug-Output $(InfName)": Option = $(OptionSub)(ISA)"
  337.     endif
  338.  
  339. ; '96 6/6 PCMCIA FIXED END
  340.  
  341. ;    Debug-Output ": RegistryPath : "$(!REG_H_LOCAL)"\SYSTEM\CurrentControlSet\Services"
  342.     OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\ELMIC" $(!REG_KEY_ALL_ACCESS) KeyElmic
  343.     IfStr $(KeyElmic) != $(KeyNull)
  344.         CloseRegKey $(KeyElmic)
  345.         OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services" $(!REG_KEY_SET_VALUE) KeyElmic 
  346.         DeleteRegTree $(KeyElmic) "ELMIC"
  347.         CloseRegKey $(KeyElmic)
  348.     EndIf
  349.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  350.     IfStr $(KeyProduct) != $(KeyNull)
  351.         CloseRegKey $(KeyProduct)
  352.         IfStr(i) !(NTN_RegBase) == $(ProductKeyName)
  353.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftware$(OptionSub)Title),+
  354.                $(ProductVersion)
  355.            IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  356.                Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  357.                GoTo ShellCodeError
  358.            EndIf
  359.            GoTo end
  360.         Else
  361.            Shell $(UtilityInf), CardExistedDlg
  362.            IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  363.                Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  364.                GoTo ShellCodeError
  365.            EndIf
  366.            IfStr(i) $($R1) != "OK"
  367.                Set CommonStatus = STATUS_USERCANCEL
  368.                GoTo end
  369.            EndIf
  370.            Set OldVersionExisted = $(TRUE)
  371.         EndIf
  372.     EndIf
  373.  
  374.     Set CurrParamSettings = {}
  375.     IfStr(i) $(DetectedCard) != TRUE
  376.         GoTo AdapterSetup
  377.     EndIf
  378.  
  379.     StartWait
  380.         Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  381.     EndWait
  382.  
  383.     IfStr(i) $($R0) != STATUS_SUCCESSFUL
  384.         GoTo AdapterSetup
  385.     EndIf
  386.  
  387.     Set DetectedParams = $($R1)
  388.     Debug-Output $(InfName)": Calling Param_SetDefaults to merge detected params"
  389.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  390.     GoTo AdapterSetup
  391.  
  392. ;***********************************************************************
  393. ;
  394. ;***********************************************************************
  395. ConfigureAdapter = +
  396.     IfStr $(KeyProduct) == $(KeyNull)
  397.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  398.         IfStr $(KeyProduct) == $(KeyNull)
  399.             Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  400.             Debug-Output $(InfName)": Cannot find component product key"
  401.             GoTo FatalRegistry
  402.         EndIf
  403.     EndIf
  404.  
  405.     Debug-Output $(InfName)": Shelling to FindService (Configure Adapter)"
  406.     Shell $(UtilityInf) FindService, $(KeyProduct)
  407.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  408.         Debug-Output $(InfName)": FindService shell failure"
  409.         GoTo ShellCodeError
  410.     EndIf
  411.     IfStr(i) $($R0) != NO_ERROR
  412.         Debug-Output $(InfName)": FindService Shell error: "$($R0)
  413.         GoTo FatalRegistry
  414.     EndIf
  415.  
  416.     Set KeyParameters = $($R2)
  417.     CloseRegKey $($R1)
  418.     IfStr $(KeyParameters) == $(KeyNull)
  419.         Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  420.         Debug-Output $(InfName)": Cannot find component service"
  421.         GoTo FatalRegistry
  422.     EndIf
  423.  
  424.     Set OldVersionExisted = $(TRUE)
  425.     Set ValueName = ""
  426.     Set ValueData = ""
  427.     Set ValueStr  = ""
  428.     Set ValueList = {}
  429.     EnumRegValue $(KeyParameters) ValueList
  430.     ForListDo $(ValueList)
  431.         Set ValueItem = $($)
  432.         Set ValueName = *($(ValueItem),1)
  433.         Set ValueData = *($(ValueItem),4)
  434.         Debug-Output $(InfName)": "$(ValueName)"="$(ValueData)
  435.         IfStr(i) $(ValueName) == "IoBaseAddress"
  436.             Set !ELIoBaseAddress = $(ValueData)
  437.         Else-IfStr(i) $(ValueName) == "InterruptNumber"
  438.             Set !ELInterruptNumber = $(ValueData)
  439.         Else-IfStr(i) $(ValueName) == "LineType"
  440.             Set LineType = $(ValueData)
  441.         Else-IfStr(i) $(ValueName) == "BusNumber"
  442.             set BusNumber = $(ValueData)
  443.         Else-IfStr(i) $(ValueName) == "BusType"
  444.             set BusType = $(ValueData)
  445.         Else-IfStr(i) $(ValueName) == "Line0.Channel0.Phone"
  446.             set Channel0_Phone = $(ValueData)
  447.         Else-IfStr(i) $(ValueName) == "Line0.Channel0.SPID"
  448.             set Channel0_SPID = $(ValueData)
  449.         Else-IfStr(i) $(ValueName) == "Line0.Channel1.Phone"
  450.             set Channel1_Phone = $(ValueData)
  451.         Else-IfStr(i) $(ValueName) == "Line0.Channel1.SPID"
  452.             set Channel1_SPID = $(ValueData)
  453.         Else-IfStr(i) $(ValueName) == "Line0.SwitchType"
  454.             set !ELSwitchType = $(ValueData)
  455.         EndIf
  456.     EndForListDo
  457.     Shell $(ParamInf) Param_SaveValues
  458.     Set CurrParamSettings = $($R0)
  459.  
  460. ;***********************************************************************
  461. ;
  462. ;***********************************************************************
  463. AdapterSetup = +
  464.     Shell "" DebugConfiguration "before displaying dialog"
  465.     Set from = AdapterOptions
  466.     Set !ELInterruptNumber = *($(IRQ_List), ~($(IRQ_List),$(!ELInterruptNumber)))
  467.     Set IO_Hex_Value = *($(IO_Hex_List), ~($(IO_Addr_List),$(!ELIoBaseAddress)))
  468.     Set SwitchType_Hex_Value = *($(SwitchType_Hex_List), ~($(SwitchType_List),$(!ELSwitchType)))
  469.  
  470.     Shell $(ParamInf) Param_ParameterConfidence
  471.     IfStr(i) $($R0) != STATUS_SUCCESSFUL
  472.         Debug-Output $(InfName)": parameter confidence too low to bypass configuration"
  473.         GoTo AdapterOptions
  474.     EndIf
  475.     IfStr(i) $(DetectedCard) == TRUE
  476.         IfStr(i) $(!STF_INSTALL_MODE) != CUSTOM
  477.             GoTo AdapterVerify
  478.         EndIf
  479.     EndIf
  480.  
  481. ;***********************************************************************
  482. ;
  483. ;***********************************************************************
  484. AdapterOptions = +
  485. ;    Read-Syms FileDependentDlg$(!STF_LANGUAGE)
  486. ;    UI Start "InputDlg"
  487. ;    IfStr(i) $(DLGEVENT) == "CONTINUE"
  488. ;        Set InterruptNumber = $(Combo1Out)
  489. ;        Set IO_Hex_Value = $(Combo2Out)
  490. ;        Set IoBaseAddress = *($(IO_Addr_List), ~($(IO_Hex_List),$(IO_Hex_Value)))
  491. ;        ui pop 1
  492. ;    Else-IfStr(i) $(DLGEVENT) == "BACK"
  493. ;        Set CommonStatus = STATUS_USERCANCEL
  494. ;        Debug-Output $(InfName)": Action: exit. Bye."
  495. ;        ui pop 1
  496. ;        GoTo end
  497. ;    Else
  498. ;        Debug-Output $(InfName)": Action: unknown. Bye."
  499. ;        ui pop 1
  500. ;        GoTo end
  501. ;    EndIf
  502. ;*****************************************************************************
  503.  
  504. ;'96 10/28 ifstr $(OptionSub)追加
  505.     ifstr(i) $(OptionSub) == ELRASNS_ISA
  506.         IfStr(i) $(!STF_NCDETINFO) == {}
  507.             Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(OptionSub)Description) $(BusType) $(BusNumber)
  508.             ifInt $($ShellCode) != $(!SHELL_CODE_OK)
  509.                 Debug-Output $(InfName)": ShellCode error."
  510.                 GoTo ShellCodeError
  511.             EndIf
  512.             Set BusType = $($R1)
  513.             Set BusNumber = $($R2)
  514.         Else
  515.             Set BusType = *($(!STF_NCDETINFO),5)
  516.             Set BusNumber = *($(!STF_NCDETINFO),6)
  517.         EndIf
  518.  
  519.         Debug-Output $(InfName)": Option = $(OptionSub)(ISA)"
  520.     else
  521.         ;'96 10/28 PCMICIA
  522.         set CardType = 1
  523.         set BusType  = 1
  524.         Debug-Output $(InfName)": Option = $(OptionSub)(PCMCIA)"
  525.     endif
  526.  
  527. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  528. ;;'96 8/14
  529. ;;    Read-Syms SPIDDependentDlg$(!STF_LANGUAGE)
  530. ;;    UI Start "InputDlg"
  531. ;    IfStr(i) $(DLGEVENT) == "CONTINUE"
  532. ;
  533. ;       Set SwitchType      = $(Combo1Out)
  534. ;        Set Channel0_SPID   = $(Edit1TextOut)
  535. ;        Set Channel0_Phone  = $(Edit2TextOut)
  536. ;        Set Channel1_SPID   = $(Edit3TextOut)
  537. ;        Set Channel1_Phone  = $(Edit4TextOut)
  538. ;       ui pop 1
  539. ;  Else-IfStr(i) $(DLGEVENT) == "BACK"
  540. ;        Set CommonStatus = STATUS_USERCANCEL
  541. ;        Debug-Output $(InfName)": Action: exit. Bye."
  542. ;        ui pop 1
  543. ;        GoTo end
  544. ;    Else
  545. ;        Debug-Output $(InfName)": Action: unknown. Bye."
  546. ;        ui pop 1
  547. ;        GoTo end
  548. ;    EndIf
  549. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  550.  
  551. ;;'96 8/28
  552. ;    Read-Syms TelNumberDlg$(!STF_LANGUAGE)
  553. ;    UI Start "InputDlg"
  554. ;    IfStr(i) $(DLGEVENT) == "CONTINUE"
  555. ;        Set Channel0_Phone   = $(EditTextOut)
  556. ;       ui pop 1
  557. ;  Else-IfStr(i) $(DLGEVENT) == "BACK"
  558. ;        Set CommonStatus = STATUS_USERCANCEL
  559. ;        Debug-Output $(InfName)": Action: exit. Bye."
  560. ;        ui pop 1
  561. ;        GoTo end
  562. ;    Else
  563. ;        Debug-Output $(InfName)": Action: unknown. Bye."
  564. ;        ui pop 1
  565. ;        GoTo end
  566. ;    EndIf
  567.  
  568.  
  569. ;***********************************************************************
  570. ;
  571. ;***********************************************************************
  572. AdapterVerify = +
  573.     Shell "" DebugConfiguration "after running dialog"
  574.     IfStr(i) $(DetectedCard) != TRUE
  575.         Shell $(ParamInf) Param_SaveValues
  576.         Set NewParamSettings = $($R0)
  577.         IfStr(i) $(CurrParamSettings) == {}
  578.             Set DiffParamSettings = $(NewParamSettings)
  579.         Else
  580.             Shell $(ParamInf) Param_DiffValues $(CurrParamSettings)
  581.             Set DiffParamSettings = $($R0)
  582.         EndIf
  583.         Debug-Output $(InfName)": Calling Param_VerifyResources"
  584.         Shell $(ParamInf) Param_VerifyResources $(DiffParamSettings)
  585.         IfStr(i) $($R0) == STATUS_SUCCESSFUL
  586.             Debug-Output $(InfName)": Param_VerifyResources succeeded"
  587.             GoTo SkipOptions
  588.         EndIf
  589.     Else
  590.         Set CardVerifyIndex = $(!STF_NCDETCARD)
  591.         Debug-Output $(InfName)": Calling Param_VerifyCard"
  592.         Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  593.         IfStr(i) $($R0) == STATUS_SUCCESSFUL
  594.             Debug-Output $(InfName)": Param_VerifyCard succeeded"
  595.             GoTo SkipOptions
  596.         EndIf
  597.     EndIf
  598.  
  599.     Set from = AdapterOptions
  600.     Set to = SkipOptions
  601.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  602.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  603.         Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  604.         GoTo ShellCodeError
  605.     EndIf
  606.     Set Error = $($R0)
  607.     GoTo WarningMsg
  608.  
  609. ;***********************************************************************
  610. ;
  611. ;***********************************************************************
  612. SkipOptions =+
  613.     IfInt $(OldVersionExisted) == $(TRUE)
  614.         IfStr(i) $(!NTN_InstallMode) == configure
  615.             Debug-Output $(InfName)": SkipOption To WriteParameter"
  616.             GoTo WriteParameters
  617.         EndIf
  618.     EndIf
  619.     StartWait
  620.     IfInt $(OldVersionExisted) == $(FALSE)
  621.         IfStr(i) $(!NTN_InstallMode) == "install"
  622.            IfStr(i) $(DoCopy) == "YES"
  623.               Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  624.               IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  625.                   GoTo ShellCodeError
  626.               Else-IfStr(i) $($R0) == STATUS_FAILED
  627.                   Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  628.                   IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  629.                       GoTo ShellCodeError
  630.                   EndIf
  631.                   Set Error = $($R0)
  632.                   GoTo FatalError
  633.               Else-IfStr(i) $($R0) == STATUS_USERCANCEL
  634.                   GoTo SuccessfulOption
  635.               EndIf
  636.               Set SrcDir = $($R1)
  637.            EndIf
  638.  
  639.            Install "Install-Option"
  640.            IfStr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  641.               Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  642.               IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  643.                   GoTo ShellCodeError
  644.               EndIf
  645.               Set Error = $($R0)
  646.               GoTo FatalError
  647.           EndIf
  648.         EndIf
  649.  
  650.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  651.             $(ProductSoftwareName), +
  652.             $(ProductSoftwareName), +
  653.             $(ProductSoftware$(OptionSub)Title), $(STF_CONTEXTINFNAME), +
  654.             $(ProductSoftwareImagePath), "kernelautostart", "NDIS", {}, "",+
  655.             $(NetEventDLL)
  656.         Set OEM_ABANDON_SOFTWARE = TRUE
  657.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  658.             Debug-Output $(InfName)": ShellCode error"
  659.             GoTo ShellCodeError
  660.         EndIf
  661.         Set RegistryErrorIndex = $($R0)
  662.         Set KeyProduct      = $($R1)
  663.         Set SoftNetRulesKey = $($R2)
  664.         CloseRegKey $($R3)
  665.         CloseRegKey $($R4)
  666.         CloseRegKey $($R5)
  667.  
  668.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  669.             EndWait
  670.             Debug-Output $(InfName)": Registry error: add software components"
  671.             CloseRegKey $(KeyProduct)
  672.             CloseRegKey $(SoftNetRulesKey)
  673.             GoTo FatalRegistry
  674.         EndIf
  675.  
  676.         Set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  677.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  678.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  679.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(OptionSub)Title)},+
  680.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(OptionSub)Description)},+
  681.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  682.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  683.         Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  684.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  685.             Debug-Output $(InfName)": ShellCode error."
  686.             GoTo ShellCodeError
  687.         EndIf
  688.         Set RegistryErrorIndex = $($R0)
  689.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  690.             EndWait
  691.             Debug-Output $(InfName)": Registry error: add value list."
  692.             CloseRegKey $(KeyProduct)
  693.             CloseRegKey $(SoftNetRulesKey)
  694.             GoTo FatalRegistry
  695.         EndIf
  696.  
  697.         Set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  698.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  699.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  700.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  701.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(Bindable$(Option)Txt)}, +
  702.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  703.         Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  704.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  705.             Debug-Output $(InfName)": ShellCode error."
  706.             GoTo ShellCodeError
  707.         EndIf
  708.         Set RegistryErrorIndex = $($R0)
  709.         CloseRegKey $(KeyProduct)
  710.         CloseRegKey $(SoftNetRulesKey)
  711.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  712.             EndWait
  713.             Debug-Output $(InfName)": Resgitry error: add value list."
  714.             GoTo FatalRegistry
  715.         EndIf
  716.     EndIf
  717.  
  718.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  719.     IfInt $($R4) != -1
  720.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  721.     EndIf
  722.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  723.         Debug-Output $(InfName)": Cannot add hardware component"
  724.         GoTo ShellCodeError
  725.     EndIf
  726.     Set RegistryErrorIndex = $($R0)
  727.     IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  728.         EndWait
  729.         Debug-Output $(InfName)": Registry error: add hardware component"
  730.         CloseRegKey $($R1)
  731.         CloseRegKey $($R2)
  732.         CloseRegKey $($R3)
  733.         GoTo FatalRegistry
  734.     EndIf
  735.  
  736.     Set KeyParameters = $($R3)
  737.     Set KeyAdapterRules = $($R2)
  738.     Set AdapterNumber = $($R4)
  739.     Set    !ELHardName = $($R5)    ;'96 11/8
  740.     Debug-Output $(InfName)": Service=$(!ELHardName)"
  741.  
  742.     Set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  743.                        {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(OptionSub)Title)},+
  744.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(OptionSub)Description)},+
  745.                        {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  746.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  747.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  748.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  749.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  750.         Debug-Output $(InfName)": ShellCode error"
  751.         GoTo ShellCodeError
  752.     EndIf
  753.     CloseRegKey $($R1)
  754.  
  755.     Set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  756.     Set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  757.     Set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+
  758.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  759.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)}, +
  760.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  761.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  762.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  763.         Debug-Output $(InfName)": ShellCode error."
  764.         GoTo ShellCodeError
  765.     EndIf
  766.     Set RegistryErrorIndex = $($R0)
  767.     IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  768.         EndWait
  769.         Debug-Output $(InfName)": Resgitry error: add value list."
  770.         CloseRegKey $(KeyParameters)
  771.         CloseRegKey $(KeyAdapterRules)
  772.         GoTo FatalRegistry
  773.     EndIf
  774.     CloseRegKey $(KeyAdapterRules)
  775.  
  776.     GoTo WriteParameters
  777.  
  778. ;***********************************************************************
  779. ;
  780. ;***********************************************************************
  781. WriteParameters = +
  782. ;;; You need one address entry in the list for each channel on your device.
  783. ;;; FIXME - at this point RAS requires there to be one logical line per address
  784. ;;; FIXME - so the address (channel) number is ignored and the line number is used
  785.     Set TapiAddressList = {$(AdapterNumber)" 1 0"}
  786. ;'96 5/27    IfStr(i) $(Option) == HTDSU42
  787.         Set TapiAddressList = >($(TapiAddressList),$(AdapterNumber)" 2 0")
  788. ;'96 5/27    EndIf
  789.  
  790. ;'96 10/28 ifstr $(OptionSub)追加
  791.     IfStr(i) $(!NTN_InstallMode) == configure
  792.         Set NewValueList = {+
  793. ;{InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(InterruptNumber)},+
  794. ;{RamBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IoBaseAddress)},+
  795. ;{IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IoBaseAddress)},+
  796. ;{Line0.SwitchType,$(NoTitle),$(!REG_VT_DWORD),$(SwitchType)},+
  797. ;{Line0.Channel0.SPID,$(NoTitle),$(!REG_VT_SZ),$(Channel0_SPID)},+
  798. ;{Line0.Channel0.Phone,$(NoTitle),$(!REG_VT_SZ),$(Channel0_Phone)},+
  799. ;{Line0.Channel1.SPID,$(NoTitle),$(!REG_VT_SZ),$(Channel1_SPID)},+        
  800. ;{Line0.Channel1.Phone,$(NoTitle),$(!REG_VT_SZ),$(Channel1_Phone)},+
  801.                         {AfterInit,$(NoTitle),$(!REG_VT_DWORD),$(AfterInit)},+
  802.                         {ErrorLog,$(NoTitle),$(!REG_VT_DWORD),$(ErrorLog)}+
  803.                        }
  804.         Debug-Output $(InfName)": WriteParametaer Configure Mode"
  805.     else
  806.         ifstr(i) $(OptionSub) == ELRASNS_PCMCIA
  807.             set CardType = 1
  808.             set BusType = 1
  809.  
  810.             Set NewValueList = {+
  811. ;{InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(InterruptNumber)},+
  812. ;{RamBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IoBaseAddress)},+
  813. ;{IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IoBaseAddress)},+
  814. ;{Line0.SwitchType,$(NoTitle),$(!REG_VT_DWORD),$(SwitchType)},+
  815. ;{Line0.Channel0.SPID,$(NoTitle),$(!REG_VT_SZ),$(Channel0_SPID)},+
  816. ;{Line0.Channel0.Phone,$(NoTitle),$(!REG_VT_SZ),$(Channel0_Phone)},+
  817. ;{Line0.Channel1.SPID,$(NoTitle),$(!REG_VT_SZ),$(Channel1_SPID)},+        
  818. ;{Line0.Channel1.Phone,$(NoTitle),$(!REG_VT_SZ),$(Channel1_Phone)},+
  819.                         {NT351,$(NoTitle),$(!REG_VT_DWORD),1},+
  820.                         {Pcmcia,$(NoTitle),$(!REG_VT_DWORD),1},+
  821.                         {AddressList,$(NoTitle),$(!REG_VT_MULTI_SZ),$(TapiAddressList)},+
  822.                         {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  823.                         {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusType)},+
  824.                         {CardType,$(NoTitle),$(!REG_VT_DWORD),$(CardType)},+
  825.                         {DeviceName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  826.                         {LineType,$(NoTitle),$(!REG_VT_DWORD),$(LineType)},+
  827.                         {MediaType,$(NoTitle),$(!REG_VT_SZ),$(TapiMediaType)},+
  828.                         {IoLength,$(NoTitle),$(!REG_VT_DWORD), 16},+
  829.                         {NumberOfLines,$(NoTitle),$(!REG_VT_DWORD),$(NumberOfLines)},+
  830.                         {BoardName,$(NoTitle),$(!REG_VT_SZ),$(BoardName)},+
  831.                         {Port1Name,$(NoTitle),$(!REG_VT_SZ),$(Port1Name)},+
  832.                         {Port2Name,$(NoTitle),$(!REG_VT_SZ),$(Port2Name)},+
  833.                         {AfterInit,$(NoTitle),$(!REG_VT_DWORD),$(AfterInit)},+
  834.                         {ErrorLog,$(NoTitle),$(!REG_VT_DWORD),$(ErrorLog)}+
  835.                        }
  836.             Debug-Output $(InfName)": Option = $(OptionSub)(PCMCIA)"
  837.         else
  838.             Set NewValueList = {+
  839. ;{InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(InterruptNumber)},+
  840. ;{RamBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IoBaseAddress)},+
  841. ;{IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IoBaseAddress)},+
  842. ;{Line0.SwitchType,$(NoTitle),$(!REG_VT_DWORD),$(SwitchType)},+
  843. ;{Line0.Channel0.SPID,$(NoTitle),$(!REG_VT_SZ),$(Channel0_SPID)},+
  844. ;{Line0.Channel0.Phone,$(NoTitle),$(!REG_VT_SZ),$(Channel0_Phone)},+
  845. ;{Line0.Channel1.SPID,$(NoTitle),$(!REG_VT_SZ),$(Channel1_SPID)},+        
  846. ;{Line0.Channel1.Phone,$(NoTitle),$(!REG_VT_SZ),$(Channel1_Phone)},+
  847.                         {AddressList,$(NoTitle),$(!REG_VT_MULTI_SZ),$(TapiAddressList)},+
  848.                         {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  849.                         {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusType)},+
  850.                         {DeviceName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  851.                         {LineType,$(NoTitle),$(!REG_VT_DWORD),$(LineType)},+
  852.                         {MediaType,$(NoTitle),$(!REG_VT_SZ),$(TapiMediaType)},+
  853.                         {NumberOfLines,$(NoTitle),$(!REG_VT_DWORD),$(NumberOfLines)},+
  854.                         {BoardName,$(NoTitle),$(!REG_VT_SZ),$(BoardName)},+
  855.                         {Port1Name,$(NoTitle),$(!REG_VT_SZ),$(Port1Name)},+
  856.                         {Port2Name,$(NoTitle),$(!REG_VT_SZ),$(Port2Name)},+
  857.                         {AfterInit,$(NoTitle),$(!REG_VT_DWORD),$(AfterInit)},+
  858.                         {ErrorLog,$(NoTitle),$(!REG_VT_DWORD),$(ErrorLog)}+
  859.                        }
  860.             Debug-Output $(InfName)": Option = $(OptionSub)(ISA)"
  861.         endif
  862.     endif
  863. ;;;                       {DebugFlags,$(NoTitle),$(!REG_VT_DWORD),$(DebugFlags)},+
  864.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  865.     Debug-Output $(InfName)": Key = $(KeyParameters)"
  866.     CloseRegKey $(KeyParameters)
  867.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  868.         Debug-Output $(InfName)": ShellCode error."
  869.         GoTo ShellCodeError
  870.     EndIf
  871.     Set RegistryErrorIndex = $($R0)
  872.     IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  873.         Debug-Output $(InfName)": Registry error: Add value list"
  874.         GoTo FatalRegistry
  875.     EndIf
  876.     ;
  877.     ; Skip TAPI/RAS setup if already installed.
  878.     ;
  879.  
  880. ;*****************************************************************************
  881.     IfStr(i) $(!NTN_InstallMode) == configure
  882.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  883.               $(MAXIMUM_ALLOWED) NetworkCardKey
  884.         IfStr(i) $(NetworkCardKey) != $(KeyNull)
  885.             GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  886.             Set ServiceName = *($(ServiceNameInfo), 4)
  887.             CloseRegKey $(NetworkCardKey)
  888.         Else
  889.             GoTo FatalRegistry
  890.         EndIf
  891.         Set WriteReg    =    $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters"
  892.         LoadLibrary "" $(!STF_NTPATH)\ELRASCNF.dll !ELHANDLE
  893.     else
  894.         Install "Install-DLL"
  895.         Set WriteReg    =    $(!NTN_ServiceBase)"\"$(!ELHardName)"\Parameters"
  896.         LoadLibrary "" $(!STF_NTPATH)\ELRASCNF.dll !ELHANDLE
  897.     endif
  898.  
  899.     Debug-Output $(InfName)": LibHandle = $(!ELHANDLE)"
  900.  
  901.     Set-DecToHex  IoBaseStr    = $(!ELIoBaseAddress)
  902.     Set InterruptStr    = $(!ELInterruptNumber)
  903.     Set-DecToHex  SwitchStr    = $(!ELSwitchType)
  904.  
  905.     Debug-Output $(InfName)": I/O=$(IoBaseStr) IRQ=$(InterruptStr) Sw=$(SwitchStr)"
  906.  
  907.  
  908.     Debug-Output $(InfName)": Reg=$(WriteReg)"
  909.  
  910.     LibraryProcedure ISDNResult, $(!ELHANDLE), +
  911.         ISDN_Configuer,    +
  912.         $(WriteReg), +
  913.         $(IoBaseStr), +
  914.         $(InterruptStr), +
  915.         $(SwitchStr), +
  916.         $(Channel0_Phone), +
  917.         $(Channel0_SPID), +
  918.         $(Channel1_Phone), +
  919.         $(Channel1_SPID)
  920.  
  921.     Debug-Output $(InfName)": I/O=$(IoBaseStr) IRQ=$(InterruptStr) Sw=$(SwitchStr)"
  922.     Debug-Output $(InfName)": TEL1=$(Channel0_Phone) SPID1=$(Channel0_SPID) TEL2=$(Channel1_Phone) SPID2=$(Channel1_SPID)"
  923.  
  924.     Set-HexToDec !ELIoBaseAddress        = $(IoBaseStr)
  925.     Set !ELInterruptNumber    = $(InterruptStr)
  926.     Set-HexToDec !ELSwitchType            = $(SwitchStr)
  927.  
  928.     Debug-Output $(InfName)": I/O=$(!ELIoBaseAddress) IRQ=$(!ELInterruptNumber) Sw=$(!ELSwitchType)"
  929.  
  930.     Debug-Output $(InfName)": Dialog Result is $(ISDNResult)"
  931.  
  932. ;    Ifstr(i) $(ISDNResult) == Cancel
  933. ;    else-Ifstr(i) $(ISDNResult) == Error
  934.  
  935.     Ifstr(i) $(ISDNResult) != "0"
  936.         IfStr(i) $(!NTN_InstallMode) == "install"
  937.             Goto SetFailed
  938.         Else-Ifstr(i) $(ISDNResult) == "1"
  939.             Debug-Output $(InfName)": ELRASCNF Cancel"
  940.             goto cancel
  941.         else-Ifstr(i) $(ISDNResult) == "2"
  942.             Debug-Output $(InfName)": ELRASCNF Fatal"
  943.             GoTo FatalRegistry
  944.         endif
  945.     Endif
  946.  
  947. ;   FreeLibrary $(!ELHANDLE)
  948. ;*****************************************************************************
  949.  
  950. ;'96 11/8  上から移動
  951.     IfStr(i) $(!NTN_InstallMode) == "install"
  952.         Install "Install-Option2"
  953.         IfStr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  954.               Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  955.               IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  956.                   GoTo ShellCodeError
  957.               EndIf
  958.               Set Error = $($R0)
  959.               GoTo FatalError
  960.         EndIf
  961.     Endif
  962.  
  963.     IfStr(i) $(!NTN_InstallMode) == configure
  964. ;'96 11/5        GoTo SuccessfulOption
  965.         GoTo end
  966.     EndIf
  967.     ;
  968.     ; Create the HARDWARE\DEVICEMAP\TAPI DEVICES\ELRASNS key
  969.     ;
  970.     OpenRegKey $(!REG_H_LOCAL) "" "HARDWARE\DEVICEMAP" $(MAXIMUM_ALLOWED) BaseKey
  971.     shell "" HtCreateRegKey $(BaseKey) "TAPI DEVICES\ELRASNS"
  972.     IfStr(i) $($R0) != NO_ERROR
  973.         Debug-Output $(InfName)": Error creating registry key!"
  974.         GoTo FatalRegistry
  975.     EndIf
  976.     Set TapiDeviceKey = $($R1)
  977.     Set NewValueList = {+
  978.                        {Address,$(NoTitle),$(!REG_VT_MULTI_SZ),$(TapiAddressList)},+
  979.                        {"Media Type",$(NoTitle),$(!REG_VT_SZ),$(TapiMediaType)}}
  980.     Shell  $(UtilityInf), AddValueList, $(TapiDeviceKey), $(NewValueList)
  981.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  982.         Debug-Output $(InfName)": ShellCode error."
  983.         GoTo ShellCodeError
  984.     EndIf
  985.     Set RegistryErrorIndex = $($R0)
  986.     IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  987.         Debug-Output $(InfName)": Registry error: Add value list"
  988.         GoTo FatalRegistry
  989.     EndIf
  990.     CloseRegKey $(TapiDeviceKey)
  991.     CloseRegKey $(BaseKey)
  992.     ;
  993.     ; if RAS is not installed, then shell ras setup INF file to install RAS
  994.     ; else invoke RAS to allow user to configure RAS for INS64. 
  995.     ;
  996.     Read-Syms InvokeRasDlg$(!STF_LANGUAGE)
  997.     Shell "oemnsvra.inf" CheckRasInstalled
  998.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  999.         Debug-Output $(InfName)": Error Shelling the RAS INF file oemnsvra.inf" 
  1000.         Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE),  +
  1001.                 "STATUS", $(InvokeRasError)
  1002.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1003.             GoTo ShellCodeError
  1004.         EndIf
  1005.         GoTo SuccessfulOption
  1006.     EndIf
  1007.     Set RasInstalled = $($R0)
  1008.     Debug-Output $(InfName)": Is RAS Installed? "$(RasInstalled)
  1009.     ;
  1010.     ; display a message to the user that RAS setup will now be invoked
  1011.     ;
  1012.     IfStr(i) $(RasInstalled) == FALSE
  1013.         Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  1014.                 $(InvokeRasSetupMsg)
  1015.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1016.             GoTo SuccessfulOption
  1017.         EndIf
  1018.     Else
  1019.         Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  1020.                 $(InvokeRasConfigMsg)
  1021.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1022.             GoTo SuccessfulOption
  1023.         EndIf
  1024.     EndIf
  1025.     ;
  1026.     ; FIXME - RAS INF will not locate the files if it is spawned here.
  1027.     ;
  1028. ;'96 10/25    EndWait
  1029. ;'96 10/25    GoTo SuccessfulOption
  1030.  
  1031.     ;
  1032.     ; Set the flags based on whether this is an IDW installation
  1033.     ;
  1034.     IfStr(i) $(!STF_IDW) == TRUE
  1035.         Set AddCopy  = NO
  1036.         Set DoCopy   = NO
  1037.         Set DoConfig = NO
  1038.     Else
  1039.         Set AddCopy  = YES
  1040.         Set DoCopy   = YES
  1041.         Set DoConfig = YES
  1042.     EndIf
  1043.     ;
  1044.     ; change the global install mode flag to configure if RAS is already installed
  1045.     ;
  1046. ;'96 11/14
  1047.         Debug-Output "OEMSETNT.INF: before - NTN_InstallMode = "$(!NTN_InstallMode)
  1048.         set SaveNTN_InstallMode = $(!NTN_InstallMode)
  1049. ;'96 10/25 ***********************************************************************
  1050.         ifstr(i) $(RasInstalled) == TRUE
  1051.              set !NTN_InstallMode = configure
  1052.         else
  1053.             set !NTN_InstallMode = install
  1054.         endif
  1055.         Debug-Output "OEMSETNT.INF: after - NTN_InstallMode = "$(!NTN_InstallMode)
  1056.         set SaveSTF_SRCDIR_OVERRIDE = $(!STF_SRCDIR_OVERRIDE)
  1057.         set !STF_SRCDIR_OVERRIDE = ""
  1058.         Debug-Output "OEMSETNT.INF: Shelling to oemnsvra.inf InstallOption with parameters:"
  1059.         Debug-Output "                  STF_LANGUAGE = "$(!STF_LANGUAGE)
  1060.         Debug-Output "                  SrcDir = "$(SrcDir)
  1061.         Debug-Output "                  AddCopy = "$(AddCopy)
  1062.         Debug-Output "                  DoCopy = "$(DoCopy)
  1063.         Debug-Output "                  DoConfig = "$(DoConfig)
  1064.         Shell "oemnsvra.inf" InstallOption $(!STF_LANGUAGE) "RAS" $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig)
  1065.         set !NTN_InstallMode = $(SaveNTN_InstallMode)
  1066.         set !STF_SRCDIR_OVERRIDE = $(SaveSTF_SRCDIR_OVERRIDE)
  1067.         ifstr(i) $(!NTN_InstallMode) == "install"
  1068.             set iSearch = 1
  1069.         nextnci = +
  1070.             Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  1071.             set KeyNetcard = $($R0)
  1072.             set iSearch = $($R1)
  1073.             Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  1074.             Ifstr $(KeyNetcard) != $(KeyNull)
  1075.                 Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  1076.                 SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  1077.                 CloseRegKey $(KeyNetcard)
  1078.                 Goto nextnci
  1079.             Endif
  1080.         endif
  1081.         Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1082.             Debug-Output "OEMNADDI.INF: Error Shelling the RAS INF file oemnsvra.inf"
  1083.             Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS",  +
  1084.               $(InvokeRasError)
  1085.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1086.             Goto ShellCodeError
  1087.             endif
  1088.             GoTo SuccessfulOption
  1089.         Endif
  1090. skipRAS = +
  1091.         GoTo SuccessfulOption
  1092.     else-Ifstr(i) $(Result) == Cancel
  1093.         goto Cancel
  1094.     else-Ifstr(i) $(Result) == Error
  1095.         goto FatalError
  1096.  
  1097. ;***********************************************************************
  1098. ;    IfStr(i) $(RasInstalled) == TRUE
  1099. ;           Set SaveNTN_InstallMode = $(!NTN_InstallMode)
  1100. ;            Set !NTN_InstallMode = configure
  1101. ;    EndIf
  1102. ;    ;
  1103. ;    ; now invoke RAS setup to do the right thing
  1104. ;    ;
  1105. ;    Shell "oemnsvra.inf" InstallOption $(!STF_LANGUAGE) "RAS" $(RasDir) $(AddCopy) $(DoCopy) $(DoConfig)
  1106. ;    ;
  1107. ;    ; restore the global instal mode flag if it was changed
  1108. ;    ;
  1109. ;    IfStr(i) $(RasInstalled) == TRUE
  1110. ;            Set !NTN_InstallMode = $(SaveNTN_InstallMode)
  1111. ;    EndIf
  1112. ;    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1113. ;        Debug-Output $(InfName)": Error Shelling the RAS INF file oemnsvra.inf" 
  1114. ;        Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS",  +
  1115. ;                $(InvokeRasError)
  1116. ;        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1117. ;            GoTo ShellCodeError
  1118. ;        EndIf
  1119. ;        GoTo SuccessfulOption
  1120. ;    EndIf
  1121. ;
  1122. ;    EndWait
  1123. ;    GoTo SuccessfulOption
  1124. ;
  1125. ;***********************************************************************
  1126. ;
  1127. ;***********************************************************************
  1128. BindingAdapter =+
  1129.     Set Error = "Binding: Sorry, not yet implemented."
  1130.     GoTo FatalError
  1131.  
  1132. ;***********************************************************************
  1133. ;
  1134. ;***********************************************************************
  1135. RemoveAdapter = +
  1136.     OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\ELMIC" $(!REG_KEY_ALL_ACCESS) KeyElmic
  1137.     IfStr $(KeyElmic) != $(KeyNull)
  1138.         CloseRegKey $(KeyElmic)
  1139.         OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services" $(!REG_KEY_SET_VALUE) KeyElmic 
  1140.         DeleteRegTree $(KeyElmic) "ELMIC"
  1141.         CloseRegKey $(KeyElmic)
  1142.     EndIf
  1143.     IfStr(i) $(ProductKeyName) == $(!NTN_RegBase)
  1144.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1145.             $(ProductSoftwareName)
  1146.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1147.             Debug-Output $(InfName)": ShellCode error"
  1148.             GoTo ShellCodeError
  1149.         EndIf
  1150.         Set RegistryErrorIndex = $($R0)
  1151.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  1152.             GoTo FatalRegistry
  1153.         EndIf
  1154.     Else
  1155.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1156.             $(ProductSoftwareName), $(!NTN_RegBase)
  1157.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1158.             Debug-Output $(InfName)": ShellCode error"
  1159.             GoTo ShellCodeError
  1160.         EndIf
  1161.         Set RegistryErrorIndex = $($R0)
  1162.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  1163.             GoTo FatalRegistry
  1164.         EndIf
  1165.     EndIf
  1166.     GoTo end
  1167.  
  1168. ;***********************************************************************
  1169. ;
  1170. ;***********************************************************************
  1171. UpgradeSoftware = +
  1172.     IfStr(i) $(ProductKeyName) == $(!NTN_RegBase)
  1173.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1174.         IfStr $(KeyProduct) != $(KeyNull)
  1175.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  1176.             Set Version = *($(VersionInfo), 4)
  1177.             Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  1178.             IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1179.                 Debug-Output $(InfName)": ShellCode error"
  1180.                 GoTo ShellCodeError
  1181.             EndIf
  1182.             Set !UG_Filename = $($R0)
  1183.             IfStr(i) $(!UG_Filename) != ""
  1184.                 install "Install-Update"
  1185.                 IfStr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1186.                     GoTo FatalError
  1187.                 EndIf
  1188.             EndIf
  1189.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  1190.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  1191.             IfInt $(Version) != $(ProductVersion)
  1192.             EndIf
  1193.             CloseRegKey $(KeyProduct)
  1194.         Else
  1195.             GoTo FatalRegistry
  1196.         EndIf
  1197.     Else
  1198.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  1199.               $(MAXIMUM_ALLOWED) NetworkCardKey
  1200.         IfStr(i) $(NetworkCardKey) != $(KeyNull)
  1201.             GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  1202.             Set ServiceName = *($(ServiceNameInfo), 4)
  1203.             OpenRegKey $(NetworkCardKey) "" "NetRules" +
  1204.                 $(MAXIMUM_ALLOWED) NetRuleKey
  1205.             IfStr(i) $(NetRuleKey) != $(KeyNull)
  1206.             Else
  1207.                 GoTo FatalRegistry
  1208.             EndIf
  1209.             CloseRegKey $(NetRules)
  1210.             CloseRegKey $(NetworkCardKey)
  1211.         Else
  1212.             GoTo FatalRegistry
  1213.         EndIf
  1214.         OpenRegKey $(!REG_H_LOCAL) "" +
  1215.               $(!NTN_ServiceBase)"\"$(ServiceName) +
  1216.               $(MAXIMUM_ALLOWED) ServiceKey
  1217.         IfStr(i) $(ServiceKey) != $(KeyNull)
  1218.             CloseRegKey $(ServiceKey)
  1219.         Else
  1220.             GoTo FatalRegistry
  1221.         EndIf
  1222.     EndIf
  1223.     GoTo end
  1224.  
  1225. ;***********************************************************************
  1226. ;
  1227. ;***********************************************************************
  1228. SuccessfulOption = +
  1229.     set CommonStatus = STATUS_SUCCESSFUL    ;'96 10/25
  1230.     GoTo end
  1231.  
  1232. ;***********************************************************************
  1233. ;
  1234. ;***********************************************************************
  1235. Abandon = +
  1236.     ForListDo $(OEM_ABANDON_OPTIONS)
  1237.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1238.             $(ProductSoftwareName), $($)
  1239.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1240.             Debug-Output $(InfName)": ShellCode error"
  1241.             GoTo ShellCodeError
  1242.         EndIf
  1243.         Set RegistryErrorIndex = $($R0)
  1244.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  1245.             GoTo FatalRegistry
  1246.         EndIf
  1247.     EndForListDo
  1248.     IfStr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  1249.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1250.             $(ProductSoftwareName), FALSE
  1251.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1252.             Debug-Output $(InfName)": ShellCode error"
  1253.             GoTo ShellCodeError
  1254.         EndIf
  1255.         Set RegistryErrorIndex = $($R0)
  1256.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  1257.             GoTo FatalRegistry
  1258.         EndIf
  1259.     EndIf
  1260.     GoTo end
  1261.  
  1262. ;***********************************************************************
  1263. ;
  1264. ;***********************************************************************
  1265. WarningMsg = +
  1266.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1267.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1268.         GoTo ShellCodeError
  1269.     EndIf
  1270.     IfStr(i) $($R1) == "OK"
  1271.         GoTo $(to)
  1272.     Else-IfStr(i) $($R1) == "CANCEL"
  1273.         GoTo $(from)
  1274.     EndIf
  1275.     GoTo end
  1276.  
  1277. ;***********************************************************************
  1278. ;
  1279. ;***********************************************************************
  1280. NonFatalInfo = +
  1281.     Set Severity = STATUS
  1282.     Set CommonStatus = STATUS_USERCANCEL
  1283.     IfStr(i) $(Error) == ""
  1284.         Set Severity = NONFATAL
  1285.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1286.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1287.             GoTo ShellCodeError
  1288.         EndIf
  1289.         Set Error = $($R0)
  1290.     EndIf
  1291.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1292.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1293.         GoTo ShellCodeError
  1294.     EndIf
  1295.     IfStr(i) $($R1) == "OK"
  1296.         GoTo $(from)
  1297.     EndIf
  1298.     GoTo end
  1299.  
  1300. ;***********************************************************************
  1301. ;
  1302. ;***********************************************************************
  1303. FatalRegistry = +
  1304.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1305.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1306.         GoTo ShellCodeError
  1307.     EndIf
  1308.     Set Error = $($R0)
  1309.     GoTo FatalError
  1310.  
  1311. ;***********************************************************************
  1312. ;
  1313. ;***********************************************************************
  1314. FatalDetect = +
  1315.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  1316.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1317.         Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  1318.         GoTo ShellCodeError
  1319.     EndIf
  1320.     Set Error = $($R0)
  1321.     GoTo FatalError
  1322.  
  1323. ;***********************************************************************
  1324. ;
  1325. ;***********************************************************************
  1326. FatalError = +
  1327.     IfStr(i) $(Error) == ""
  1328.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1329.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1330.             GoTo ShellCodeError
  1331.         EndIf
  1332.         Set Error = $($R0)
  1333.     EndIf
  1334.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1335.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1336.         GoTo ShellCodeError
  1337.     EndIf
  1338.     GoTo SetFailed
  1339.  
  1340. ;***********************************************************************
  1341. ;
  1342. ;***********************************************************************
  1343. ShellCodeError = +
  1344.     Set DlgType      = "MessageBox"
  1345.     Set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1346.     Set STF_MB_TEXT  = $(ShellCodeErrorText)
  1347.     Set STF_MB_TYPE  = 1
  1348.     Set STF_MB_ICON  = 3
  1349.     Set STF_MB_DEF   = 1
  1350.     UI Start "Error Message"
  1351.     GoTo SetFailed
  1352.  
  1353. ;***********************************************************************
  1354. ;
  1355. ;***********************************************************************
  1356. SetFailed = +
  1357.     Set CommonStatus = STATUS_FAILED
  1358.     IfStr(i) $(OEM_ABANDON_ON) == TRUE
  1359.         Set OEM_ABANDON_ON = FALSE
  1360.         GoTo Abandon
  1361.     EndIf
  1362.     GoTo end
  1363.  
  1364. ;'96 10/25
  1365. Cancel = +
  1366.     set CommonStatus = STATUS_USERCANCEL
  1367.     goto end
  1368.  
  1369. ;***********************************************************************
  1370. ;
  1371. ;***********************************************************************
  1372. end = +
  1373.     Set !DebugOutputControl = $(OldDebugControl)
  1374.     Return $(CommonStatus)
  1375.  
  1376. ;***********************************************************************
  1377. ;
  1378. ;***********************************************************************
  1379. [HtCreateRegKey]
  1380.     Debug-Output $(InfName)": Entering [HtCreateRegKey]"
  1381.     Set ECR_Result          = NO_ERROR
  1382.     Set ECR_BaseKeyHandle   = $($0)
  1383.     Set ECR_NewPath         = $($1)
  1384.     Set KeyNull             = ""
  1385.     Set MAXIMUM_ALLOWED     = 33554432
  1386.  
  1387.     Debug-Output $(InfName)": HtCreateRegKey - ECR_BaseKeyHandle = "$(ECR_BaseKeyHandle)
  1388.     Debug-Output $(InfName)":                  ECR_NewPath       = "$(ECR_NewPath)
  1389.     Debug-Output $(InfName)":                  MAXIMUM_ALLOWED   = "$(MAXIMUM_ALLOWED)
  1390.     Debug-Output $(InfName)":                  KeyNull           = "$(KeyNull)
  1391.  
  1392.     OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_NewPath) $(MAXIMUM_ALLOWED) +
  1393.                ECR_BaseKey
  1394.     Debug-Output $(InfName)": ECR_BaseKey = "$(ECR_BaseKey)
  1395.     Debug-Output $(InfName)":     OpenRegKey returned "$($R0)
  1396.     IfStr $(ECR_BaseKey) == $(KeyNull)
  1397.         Debug-Output $(InfName)": ECR_BaseKey == KeyNull"
  1398.     Else
  1399.         Debug-Output $(InfName)": ECR_BaseKey != KeyNull"
  1400.         Set ECR_KeyHandle = $(ECR_BaseKey)
  1401.         GoTo  ECR_Return
  1402.     EndIf
  1403.  
  1404.     Set ECR_TmpPath = ""
  1405.     Split-String $(ECR_NewPath) "\" ECR_PList
  1406.     Debug-Output $(InfName)": ECR_PList = "$(ECR_PList)
  1407.     ForListDo $(ECR_PList)
  1408.         IfStr(i) $($) != "\"
  1409.             IfInt $(#) == 1
  1410.                 Set ECR_TmpPath = $($)
  1411.             Else
  1412.                 Set ECR_TmpPath = $(ECR_TmpPath)"\"$($)
  1413.             EndIf
  1414.             Debug-Output $(InfName)": Determining if "$(ECR_TmpPath)" exists"
  1415.             OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_TmpPath) $(MAXIMUM_ALLOWED) ECR_BaseKey
  1416.             IfStr $(ECR_BaseKey) == $(KeyNull)
  1417.                 Debug-Output $(InfName)": Creating "$(ECR_TmpPath)
  1418.                 CreateRegKey $(ECR_BaseKeyHandle)  {$(ECR_TmpPath),0,GenericClass} "" $(MAXIMUM_ALLOWED) "" ECR_KeyHandle
  1419.                 IfStr(i) $(ECR_KeyHandle) == $(KeyNull)
  1420.                     Set ECR_Result = $($R0)
  1421.                     GoTo ECR_Return
  1422.                 EndIf
  1423.             EndIf
  1424.         EndIf
  1425.     EndForListDo
  1426. ECR_Return = +
  1427.     Return $(ECR_Result) $(ECR_KeyHandle)
  1428.  
  1429. ;***********************************************************************
  1430. ;
  1431. ;***********************************************************************
  1432. [DebugConfiguration]
  1433.     Debug-Output $(!p:InfName)": **CONFIGURATION STATE: "$($0)
  1434.     Debug-Output $(!p:InfName)": InterruptNumber is "$(!p:InterruptNumber)
  1435.     Debug-Output $(!p:InfName)": IoBaseAddress  is "$(!p:IoBaseAddress)
  1436.     Return
  1437.  
  1438. ;***********************************************************************
  1439. ;
  1440. ;***********************************************************************
  1441. [Install-Option]
  1442.     Set STF_VITAL = ""
  1443.     IfStr(i) $(AddCopy) == "YES"
  1444. ;       AddSectionFilesToCopyList Files-$(OptionSub) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1445. ;       AddSectionFilesToCopyList Files-DLL $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1446.     EndIf
  1447.     IfStr(i) $(DoCopy) == "YES"
  1448.        Set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1449. ;       CopyFilesInCopyList
  1450.     EndIf
  1451.     Exit
  1452.  
  1453. ;***********************************************************************
  1454. ; '96 11/8
  1455. ;***********************************************************************
  1456. [Install-Option2]
  1457.     Set STF_VITAL = ""
  1458.     IfStr(i) $(AddCopy) == "YES"
  1459.         AddSectionFilesToCopyList Files-$(OptionSub) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1460.        AddSectionFilesToCopyList Files-DLL $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1461.     EndIf
  1462.     IfStr(i) $(DoCopy) == "YES"
  1463.        Set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1464.        CopyFilesInCopyList
  1465.     EndIf
  1466.     Exit
  1467.  
  1468. ;***********************************************************************
  1469. ; '96 11/13
  1470. ;***********************************************************************
  1471. [Install-DLL]
  1472.     Set STF_VITAL = ""
  1473.     AddSectionFilesToCopyList Files-DLL $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1474.     Set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1475.     CopyFilesInCopyList
  1476.  
  1477.  
  1478. ;***********************************************************************
  1479. ;
  1480. ;***********************************************************************
  1481. [Install-Update]
  1482.    Set STF_VITAL        = ""
  1483.    Set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1484.    AddSectionFilesToCopyList Files-$(OptionSub) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1485.    AddSectionFilesToCopyList Files-DLL $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1486.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1487.    Set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1488.    CopyFilesInCopyList
  1489.    Exit
  1490.  
  1491. ;***********************************************************************
  1492. ;
  1493. ;***********************************************************************
  1494. [Source Media Descriptions]
  1495.     1  = ;"OEM Disk (RAS)" , TAGFILE = disk1
  1496. ;    1  = "Windows NT Setup Disk #1" , TAGFILE = ELRASNSN.SYS
  1497.  
  1498. ;***********************************************************************
  1499. ;
  1500. ;***********************************************************************
  1501. [ProductType]
  1502.     STF_PRODUCT         = Winnt
  1503.     STF_PLATFORM        = I386
  1504.  
  1505. ;***********************************************************************
  1506. ;
  1507. ;***********************************************************************
  1508. [Files-Inf]
  1509.     1, oemsetnt.inf, SIZE=63542, RENAME=$(!UG_Filename)
  1510.  
  1511. ;***********************************************************************
  1512. ;'96 11/8
  1513. ;***********************************************************************
  1514. [Files-DLL]
  1515.     1, ELRASCNF.DLL, SIZE=32256
  1516.  
  1517. ;***********************************************************************
  1518. ;
  1519. ;***********************************************************************
  1520. [Files-ELRASNS_PCMCIA]
  1521.     1, ELRASNSN.SYS, SIZE=447520
  1522.  
  1523. ;***********************************************************************
  1524. ;
  1525. ;***********************************************************************
  1526. [Files-ELRASNS_ISA]
  1527.     1, ELRASNSN.SYS, SIZE=447520
  1528.  
  1529. ;***********************************************************************
  1530. ;
  1531. ;***********************************************************************
  1532. [LanguagesSupported]
  1533.     ENG
  1534.  
  1535. ;***********************************************************************
  1536. ;
  1537. ;***********************************************************************
  1538. [OptionsTextENG]
  1539.     ELRASNS_ISA         = "Elmic Systems Surf2Surf Model II ISA (4.0)"
  1540.     ELRASNS_PCMCIA   = "Elmic Systems Surf2Surf Model II PCMCIA (4.0)"
  1541.  
  1542. ;***********************************************************************
  1543. ;
  1544. ;***********************************************************************
  1545. [FileConstantsENG]
  1546.     ProCaption          = "Windows NT Setup"
  1547.     ProCancel           = "Cancel"
  1548.     ProCancelMsg        = "Windows NT Networking is not correctly installed.  "+
  1549.                           "Are you sure you want to cancel copying files?"
  1550.     ProCancelCap        = "Network Setup Message"
  1551.     ProText1            = "Copying:"
  1552.     ProText2            = "To:"
  1553.  
  1554.     FunctionTitleELRASNS_PCMCIA                = "Surf2Surf Model II PCMCIA Card Setup"
  1555.     ProductSoftwareELRASNS_PCMCIADescription   = "Surf2Surf Model II PCMCIA RAS Driver"
  1556.     ProductHardwareELRASNS_PCMCIADescription   = "Surf2Surf Model II PCMCIA"
  1557.     ProductSoftwareELRASNS_PCMCIATitle         = "Surf2Surf Model II PCMCIA RAS Driver"
  1558.     ProductHardwareELRASNS_PCMCIATitle         = "Surf2Surf Model II PCMCIA Adapter"
  1559.  
  1560.     FunctionTitleELRASNS_ISA                = "Surf2Surf Model II ISA Card Setup"
  1561.     ProductSoftwareELRASNS_ISADescription   = "Surf2Surf Model II ISA RAS Driver"
  1562.     ProductHardwareELRASNS_ISADescription   = "Surf2Surf Model II ISA"
  1563.     ProductSoftwareELRASNS_ISATitle         = "Surf2Surf Model II ISA RAS Driver"
  1564.     ProductHardwareELRASNS_ISATitle         = "Surf2Surf Model II ISA Adapter"
  1565.  
  1566.     ShellCodeErrorTitle                 = "Error: "$(FunctionTitle)$(OptionSub))
  1567.     ShellCodeErrorText                  = "Shell Code Error."
  1568.  
  1569. ;***********************************************************************
  1570. ;
  1571. ;***********************************************************************
  1572. [DialogConstantsENG]
  1573.     Help                  = "ヘルプ(&H)"
  1574.     Exit                = "キャンセル"
  1575.     OK                  = "OK"
  1576.     HelpContext         = ""
  1577.     Continue            = "続行"
  1578.     Cancel              = "キャンセル"
  1579.  
  1580. ;***********************************************************************
  1581. ;
  1582. ;***********************************************************************
  1583. [FileDependentDlgENG]
  1584.     OK                        = "OK"
  1585.     Cancel                = "キャンセル"
  1586.     Help                  = "ヘルプ(&H)"
  1587.     Label1                 = "IRQ レベル(&I):"
  1588.     Label2                 = "I/O ポート アドレス(&P):"
  1589.     DlgType             = "RadioCombination"
  1590.     DlgTemplate         = "NE2000"
  1591. ;'96 8/29    Caption             = $(FunctionTitle)$(Option)
  1592.     Caption             = "Surf2Surf Model II"
  1593.     Combo1List          = $(IRQ_List)
  1594.     Combo1Out           = $(InterruptNumber)
  1595.     Combo2List          = $(IO_Hex_List)
  1596.     Combo2Out           = $(IO_Hex_Value)
  1597.     ComboListItemsIn    = {Combo1List, Combo2List}
  1598.     ComboListItemsOut   = {Combo1Out, Combo2Out}
  1599.     EditTextIn          = ""
  1600.     EditTextLim         = ""
  1601.     CBOptionsGreyed     = {}
  1602.     NotifyFields        = {NO, NO}
  1603. ;    HelpContext         = $(!IDH_DB_OEMNADN2_INS)
  1604.  
  1605. ;***********************************************************************
  1606. ;
  1607. ;***********************************************************************
  1608. [SPIDDependentDlgENG]
  1609.     Combo1Label          = "&Switch Type:"
  1610.     Edit1Label          = "Channel 1 Phone Number:"
  1611.     Edit2Label          = "Channel 1 SPID:"
  1612.     Edit3Label          = "Channel 2 Phone Number:"
  1613.     Edit4Label          = "Channel 2 SPID:"
  1614.     DlgType             = "Combination"
  1615.     DlgTemplate         = "NE2000"
  1616. ;'96 8/29    Caption             = $(FunctionTitle)$(Option)
  1617.     Caption             = "Surf2Surf Model II"
  1618.     Edit1TextLim         = 32
  1619.     Edit1TextIn          = ""
  1620.     Edit1Focus           = "ALL"
  1621.     Edit2TextLim         = 32
  1622.     Edit2TextIn          = ""
  1623.     Edit2Focus           = "ALL"
  1624.     Edit3TextLim         = 32
  1625.     Edit3TextIn          = ""
  1626.     Edit3Focus           = "ALL"
  1627.     Edit4TextLim         = 32
  1628.     Edit4TextIn          = ""
  1629.     Edit4Focus           = "ALL"
  1630.  
  1631.     Combo1List          = $(SwitchType_List)
  1632.     Combo1Out           = $(SwitchType)
  1633.     ComboListItemsIn    = {Combo1List}
  1634.     ComboListItemsOut   = {Combo1Out}
  1635.     CBOptionsGreyed     = {}
  1636.     NotifyFields        = {NO, NO}
  1637. ;    HelpContext         = $(!IDH_DB_OEMNADN2_INS)
  1638.  
  1639. ;'96 8/28
  1640. [TelNumberDlgENG]
  1641.     Caption        = "自局電話番号"
  1642. ;'96 8/29    Caption        = "Surf2Surf Model II"
  1643.     Continue       = "OK"
  1644.     Cancel         = "キャンセル"
  1645.     Help           = "ヘルプ(&H)"
  1646.     DlgType        = "Edit"
  1647. ;    DlgTemplate    = "DISKETTE"
  1648.     DlgTemplate = "NETWORK_NUMBER"
  1649. ;    DlgText        = "自局電話番号を入力してください。"
  1650.     Edit1Label     = "自局電話番号(&T):"
  1651.     EditTextIn     = $(Channel0_Phone)
  1652.     EditTextLim   = 60
  1653.     EditFocus      = "ALL"
  1654.  
  1655. ;***********************************************************************
  1656. ;
  1657. ;***********************************************************************
  1658. [InvokeRasDlgENG]
  1659.     InvokeRasSetupMsg   = "Elmic Systems Surf2Surf Model IIのセットアップが終了しました。"+
  1660.                           "リモートアクセスサービス(RAS)がインストールされます。"+
  1661.                           "Surf2Surf Model II(ELRASNS)のポートの追加及び設定を行ってください。"
  1662.  
  1663.     InvokeRasConfigMsg  = "Elmic Systems Surf2Surf Model IIのセットアップが終了しました。"+
  1664.                           "リモートアクセスサービス(RAS)が開始されます。"+
  1665.                           "Surf2Surf Model II(ELRASNS)のポートの追加及び設定を行ってください。"
  1666.  
  1667.     InvokeRasError      = "Elmic Systens Surf2Surf Modell IIのセットアップで、RASセットアップ"+
  1668.                           "INFファイル(OEMNSVRA.INF)の呼び出し中に、エラーが発生しました。"+
  1669.                           "System32ディレクトリに正しいINFファイルがあることを確認してください。"
  1670.  
  1671.