home *** CD-ROM | disk | FTP | other *** search
/ Windows NT Super Tune-Up Kit / PIE-WindowsNTSuperTuneUpKit-1997.iso / DRIVERS / NETWORK / DEC / DE300A / OEMSETUP.INF < prev   
INI File  |  1994-10-13  |  28KB  |  847 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     EISA
  5.     PCI
  6.     "Jazz-Internal Bus"
  7. [Options]
  8.     DEC300
  9. [FileConstants]
  10. UtilityInf      = "UTILITY.INF"
  11. subroutineinf   = "SUBROUTN.INF"
  12. SoftwareType    = "driver"
  13. Exit_Code       = 0
  14. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  15. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  16. DEC300_1BYTE    = 3187472
  17. Manufacturer    = "Microsoft"
  18. ProductMajorVersion     = "3"
  19. ProductMinorVersion     = "1"
  20. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  21. ProductSoftwareName     = "Defea"
  22. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\defea.sys"
  23. NetRuleSoftwareType     = "defeaSys ndisDriver defeaDriver"
  24. NetRuleSoftwareUse      = $(SoftwareType)
  25. NetRuleSoftwareBindForm = """DefeaSys"" yes no container"
  26. NetRuleSoftwareClass    = {"defeaDriver basic"}
  27. ProductHardwareName     = "Defea"
  28. NetRuleHardwareType     = "dec300 dec300Adapter"
  29. NetRuleHardwareBindForm = " yes yes container"
  30. NetRuleHardwareClass    = {"dec300Adapter basic"}
  31. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  32. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  33. [GeneralConstants]
  34. from      = ""
  35. to        = ""
  36. ExitCodeOk     = 0
  37. ExitCodeCancel = 1
  38. ExitCodeFatal  = 2
  39. KeyNull         = ""
  40. MAXIMUM_ALLOWED   = 33554432
  41. RegistryErrorIndex = NO_ERROR
  42. KeyProduct      = ""
  43. KeyParameters   = ""
  44. TRUE            = 1
  45. FALSE           = 0
  46. NoTitle            = 0
  47. ExitState   = "Active"
  48. OldVersionExisted = $(FALSE)
  49. DriverPath      = $(!STF_NTPATH)\drivers
  50. Successful_Install = 0
  51. [date]
  52.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  53. [processor]
  54.     PROC_TYPE = "" ? $(LIBHANDLE) GetProcessor
  55. [Identify]
  56.     read-syms Identification
  57.     set Status     = STATUS_SUCCESSFUL
  58.     set Identifier = $(OptionType)
  59.     set Media      = #("Source Media Descriptions", 1, 1)
  60.     Return $(Status) $(Identifier) $(Media)
  61. [ReturnOptions]
  62.     set Status        = STATUS_FAILED
  63.     set OptionList     = {}
  64.     set OptionTextList = {}
  65.     set LanguageList = ^(LanguagesSupported, 1)
  66.     Ifcontains(i) $($0) in $(LanguageList)
  67.         ifstr(i) $($1) == ""
  68.            goto returnoptions
  69.         endif
  70.         set PlatformList = ^(PlatformsSupported, 1)
  71.         Ifcontains(i) $($1) in $(PlatformList)
  72.            goto returnoptions
  73.         else
  74.            set Status = STATUS_NOTSUPPORTED
  75.            goto finish_ReturnOptions
  76.         endif
  77.     else
  78.         set Status = STATUS_NOLANGUAGE
  79.         goto finish_ReturnOptions
  80.     endif
  81. returnoptions = +
  82.     set OptionList     = ^(Options, 1)
  83.     set OptionTextList = ^(OptionsText$($0), 1)
  84.     set Status         = STATUS_SUCCESSFUL
  85. finish_ReturnOptions = +
  86.     Return $(Status) $(OptionList) $(OptionTextList)
  87. [InstallOption]
  88. ;    set !DebugOutputControl = 1 
  89.     set Option   = $($1)
  90.     set SrcDir   = $($2)
  91.     set AddCopy  = $($3)
  92.     set DoCopy   = $($4)
  93.     set DoConfig = $($5)
  94.     set LanguageList = ^(LanguagesSupported, 1)
  95.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  96.         Return STATUS_NOLANGUAGE
  97.     endif
  98.     Debug-Output "OEMNADD4.INF: STF_CWDIR is: "$(!STF_CWDIR)
  99.     Debug-Output "OEMNADD4.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  100.     set-subst LF = "\n"
  101.     read-syms GeneralConstants
  102.     read-syms FileConstants
  103.     Shell $(UtilityInf), GetBindingInfo, "DEC"
  104.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  105.         Debug-Output "ShellCode error: cannot get an error string."
  106.         goto ShellCodeError
  107.     endif
  108.     set NetRuleSoftwareBindable = $($R1)
  109.     read-syms DialogConstants$(!STF_LANGUAGE)
  110.     ifstr(i) $(!NTN_Origination) == "NCPA"
  111.         set Continue = $(OK)
  112.     endif
  113.     read-syms FileConstants$(!STF_LANGUAGE)
  114.     detect date
  115.     set-title  $(FunctionTitle)
  116.     set to   = Begin
  117.     set from = Begin
  118.     set CommonStatus = STATUS_SUCCESSFUL
  119.     EndWait
  120. Begin = +
  121. ;    set !DebugOutputControl = 1
  122.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  123.         set StartLabel = removeadapter
  124.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  125.         set StartLabel = UpgradeSoftware
  126.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  127.         set StartLabel = bindingadapter
  128.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  129.         set CommonStatus = STATUS_REBOOT
  130.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  131.             Debug-Output "Cannot configure the dec 300 driver software."
  132.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  133.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  134.                 Debug-Output "ShellCode error: cannot get an error string."
  135.                 goto ShellCodeError
  136.             endif
  137.             set Error = $($R0)
  138.             set from = end
  139.             set to = end
  140.             goto nonfatalinfo
  141.         else
  142.             set StartLabel = configureadapter
  143.         endif
  144.     else
  145.         set StartLabel = installadapter
  146.         set OEM_ABANDON_OPTIONS = {}
  147.         set OEM_ABANDON_SOFTWARE = FALSE
  148.         set OEM_ABANDON_ON = TRUE
  149.     endif
  150. ;************ Detect Processor Type *****************    
  151.     LoadLibrary "" $(!STF_CWDDIR)setupdll.dll LIBHANDLE
  152.     detect processor
  153.     FreeLibrary $(LIBHANDLE)
  154.     ifstr(i) $(PROC_TYPE) == Alpha_AXP
  155.         set SourceDir = $(SrcDir)
  156.         set UpdateDir = $(SrcDir)
  157.     else
  158.         set SourceDir = $(SrcDir)
  159.         set UpdateDir = $(SrcDir)
  160.     endif
  161.     Debug-Output "NTN_Origination"$(!NTN_Origination)
  162.     set from = $(fatal)
  163.     set to = $(fatal)
  164.     goto $(StartLabel)
  165. installadapter = +
  166.     goto nextstep
  167. configureadapter = +
  168.     
  169.     Ifstr $(KeyProduct) == $(KeyNull)
  170.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  171.         Ifstr $(KeyProduct) == $(KeyNull)
  172.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  173.             Debug-Output "Cannot find component product key"
  174.             goto fatalregistry
  175.         Endif
  176.     Endif
  177.     
  178.     Debug-Output "INF: Shelling to FindService"
  179.     Shell $(UtilityInf) FindService, $(KeyProduct)
  180.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  181.         Debug-Output "INF: FindService shell failure"
  182.         Goto ShellCodeError
  183.     Endif
  184.     Ifstr(i) $($R0) != NO_ERROR
  185.         Debug-Output "INF: FindService Shell error: "$($R0)
  186.         Goto fatalregistry
  187.     endif
  188.  
  189.     Set KeyParameters = $($R2)
  190.     CloseRegKey $($R1)
  191.  
  192.     Ifstr $(KeyParameters) == $(KeyNull)
  193.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  194.         Debug-Output "Cannot find component service"
  195.         goto fatalregistry
  196.     endif
  197.     set OldVersionExisted = $(TRUE)
  198.     set ValueName = ""
  199.     set ValueData = ""
  200.     set ValueStr  = ""
  201.     set ValueList = {}
  202.     
  203.     EnumRegValue $(KeyParameters) ValueList
  204. ;***************** Read Registry Info for Defaults *****************
  205.     ForListDo $(ValueList)
  206.         set ValueItem = $($)
  207.         set ValueName = *($(ValueItem),1)
  208.         set ValueData = *($(ValueItem),4)
  209.         ifstr(i) $(ValueName) == "BurstSize"
  210.             set BurstSizeIndex = $(ValueData)
  211.         else-ifstr(i) $(ValueName) == "FullDuplexEnable"
  212.             set FullDuplexEnableIndex = $(ValueData)
  213.         else-ifstr(i) $(ValueName) == "RcvBuffCnt"
  214.             set RcvBuffCntIndex = $(ValueData)
  215.         else-ifstr(i) $(ValueName) == "XmtBuffCnt"
  216.             set XmtBuffCntIndex = $(ValueData) 
  217.         else-ifstr(i) $(ValueName) == "RequestedTTRT"
  218.             set RequestedTTRTIndex = $(ValueData)
  219.         else-ifstr(i) $(ValueName) == "SlotNumber"
  220.             set SlotNumber = $(ValueData)
  221.         endif
  222.     EndForListDo
  223.     
  224.     Set Caption = $(FunctionTitle)
  225.     Set Label1  = "Slot #"$(SlotNumber)
  226.     ifstr(i) $(FullDuplexEnableIndex) == 1
  227.         set RadioIn = {1}
  228.     else
  229.         set RadioIn = {2}
  230.     endif
  231.  
  232.     ifstr(i) $(RequestedTTRTIndex) == ""
  233.         set EditTextIn = {8}
  234.     else
  235.         set EditTextIn = {$(RequestedTTRTIndex)}
  236.     endif
  237.  
  238.     set BurstSizeValue = *($(BurstSizeList), ~($(BurstSizeValues),$(BurstSizeIndex)))
  239.     ifstr(i) $(BurstSizeValue) == ""
  240.         set BurstSizeValue = 8
  241.     endif
  242.  
  243.     set ReceiveBuffValue = *($(ReceiveBuffList), ~($(ReceiveBuffValues),$(RcvBuffCntIndex)))
  244.     ifstr(i) $(ReceiveBuffValue) == ""
  245.         set ReceiveBuffValue = 4
  246.     endif
  247.  
  248.     set TransmitBuffValue = *($(TransmitBuffList), ~($(TransmitBuffValues),$(XmtBuffCntIndex)))
  249.     ifstr(i) $(TransmitBuffValue) == ""
  250.         set TransmitBuffValue = 32
  251.     endif
  252.  
  253.     set RequestedTTRTValue = RequestedTTRTIndex
  254.     ifstr(i) $(RequestedTTRTValue) == ""
  255.         set RequestedTTRTValue = 8
  256.     endif
  257.  
  258. ;***************** Display the Dialog ******************************
  259. displaydialog = +    
  260.  
  261.     set ExitButton = ""
  262.     ifstr(i) $(StartLabel) == installadapter
  263.         Debug-Output "Source Directory is:"$(SourceDir)$(DialogDllName)
  264.         LoadLibrary "Disk 1" $(SourceDir)$(DialogDllName) hLib
  265.     else
  266.         LoadLibrary "Disk 1" $(!STF_WINDOWSSYSPATH)\$(DialogDllName) hLib
  267.     endif
  268.     
  269.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  270. restart = +    
  271.     set NotifyFields = {YES,NO,NO}
  272.     ui start "InputDlg" $(hLib)
  273.     set ExitButton = $(DLGEVENT)
  274.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  275.         ifint *($(EditTextOut),1) < 4
  276.             shell $(subroutineinf) SetupMessage ENG NONFATAL "Value of Requested TTRT must be between 4 and 165 ms"
  277.             goto restart
  278.         else-ifint *($(EditTextOut),1) > 165
  279.             shell $(subroutineinf) SetupMessage ENG NONFATAL "Value of Requested TTRT must be between 4 and 165 ms"
  280.             goto restart
  281.         endif
  282.         set BurstSizeIndex = *($(BurstSizeValues), ~($(BurstSizeList),$(Combo1Out)))
  283.         set TransmitBuffIndex = *($(TransmitBuffValues), ~($(TransmitBuffList),$(Combo3Out)))
  284.         set ReceiveBuffIndex = *($(ReceiveBuffValues), ~($(ReceiveBuffList),$(Combo2Out)))
  285.         ifstr(i) *($(RadioOut),1) == 1
  286.             Set FullDuplexEnableIndex = 1
  287.         else
  288.             Set FullDuplexEnableIndex = 2
  289.         endif
  290.         set RequestedTTRTIndex = *($(EditTextOut),1)
  291.         FreeLibrary $(hLib)
  292.         ui pop 1
  293.         ifstr(i) $(StartLabel) == installadapter
  294.             Set Successful_Install = 1
  295.             goto returnpoint
  296.         endif
  297.     else-ifstr(i) $(DLGEVENT) == "NOTIFY"
  298. ;                ifstr(i) $(Combo1Out) != 16
  299. ;                        shell $(subroutineinf) SetupMessage ENG NONFATAL "If supported by the adapter, a burst size of 16 longwords is recommended."
  300. ;                endif
  301.         goto restart
  302.     else-ifstr(i) $(DLGEVENT) == "BACK"
  303.         FreeLibrary $(hLib)
  304.         ui pop 1
  305.         ifstr(i) $(StartLabel) == installadapter
  306.             goto returnpoint
  307.         else
  308.             CloseRegKey $(KeyParameters)
  309.             set CommonStatus = STATUS_USERCANCEL
  310.             goto end
  311.         endif
  312.     else
  313.         FreeLibrary $(hLib)
  314.         ui pop 1
  315.         goto end
  316.     endif
  317.     set NewValueList = {{RcvBuffCnt,$(NoTitle),$(!REG_VT_DWORD),$(ReceiveBuffIndex)},+
  318.                         {BurstSize,$(NoTitle),$(!REG_VT_DWORD),$(BurstSizeIndex)},+
  319.                         {XmtBuffCnt,$(NoTitle),$(!REG_VT_DWORD),$(TransmitBuffIndex)},+
  320.                         {FullDuplexEnable,$(NoTitle),$(!REG_VT_DWORD),$(FullDuplexEnableIndex)},+
  321.                         {RequestedTTRT,$(NoTitle),$(!REG_VT_DWORD),$(RequestedTTRTIndex)}}
  322.           
  323.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  324.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  325.         goto ShellCodeError
  326.     endif
  327.     CloseRegKey $(KeyParameters)
  328.     goto successful
  329. nextstep = +
  330.     StartWait
  331. installproduct = +
  332.     Shell $(UtilityInf), EISAFindBus, $(DEC300_1BYTE)
  333.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  334.         goto ShellCodeError
  335.     endif
  336.     ifstr $($R0) != "NO_ERROR"
  337.         set Error = $($R0)
  338.         goto fatal
  339.     endif
  340.     ifstr(i) $($R1) == {}
  341.         set Error = $(CANNOT_FIND_ANY_CARD)
  342.         set CommonStatus = STATUS_USERCANCEL
  343.         set from = end
  344.         goto nonfatal
  345.     endif
  346.     set AdapterList = $($R1)
  347. ;**************** Install Hardware Component For Each***********************
  348. ;**************** Card and Store Params. In a List *************************
  349.     Set AllAdaptersInstalled = $(TRUE)
  350.     ForListDo $(AdapterList)
  351.         set BusNum = *($($),1)
  352.         set SlotNum = *($($),2)
  353.         Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), +
  354.             $(SlotNum), $(ProductHardwareDescription), $(ProductHardwareName)
  355.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  356.             goto ShellCodeError
  357.         endif
  358.         ifstr $($R0) != "NO_ERROR"
  359.             set Error = $($R0)
  360.             goto fatal
  361.         endif
  362.         ifstr(i) $($R1) != "YES"
  363.                 Set AllAdaptersInstalled = $(FALSE)
  364.                 Set ReceiveBuffValue = 4
  365.                 Set TransmitBuffValue = 32
  366.                 Set BurstSizeValue = 8
  367.                 Set EditTextIn = {"8"}
  368.                 Set RadioIn = {2}
  369.                 Set Caption = $(FunctionTitle)
  370.                 Set Label1  = "Slot #"$(SlotNum)
  371.                 Set ExitButton = ""
  372.                 goto displaydialog
  373.         else
  374.                 Set ExitButton = ""
  375.                 Set OldVersionExisted = $(TRUE)
  376.         endif
  377. returnpoint = +
  378.         ifstr(i) $(ExitButton) == "CONTINUE"
  379.             Set List1 = >($(List1),$(BusNum))
  380.             Set List2 = >($(List2),$(SlotNum))
  381.             Set List3 = >($(List3),$(ReceiveBuffIndex))
  382.             Set List4 = >($(List4),$(BurstSizeIndex))
  383.             Set List5 = >($(List5),$(TransmitBuffIndex))
  384.             Set List6 = >($(List6),$(FullDuplexEnableIndex))
  385.             Set List7 = >($(List7),$(RequestedTTRTIndex))
  386.         endif
  387.     EndForListDo
  388.     ifstr(i) $(AllAdaptersInstalled) == $(TRUE)
  389.         shell $(subroutineinf) SetupMessage ENG NONFATAL "All DEC FDDIcontroller/EISA adapters already installed"
  390.     endif
  391.  
  392. ;*************** Install Software Component If Needed*******************    
  393.     ifstr(i) $(Successful_Install) == 1
  394.         Debug-Output "Successful Install"
  395.     ifint $(OldVersionExisted) == $(FALSE)
  396.         Ifstr(i) $(DoCopy) == "YES"
  397.            Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  398.            Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  399.                Goto ShellCodeError
  400.            Else-Ifstr(i) $($R0) == STATUS_FAILED
  401.                Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  402.                ifint $($ShellCode) != $(!SHELL_CODE_OK)
  403.                   goto ShellCodeError
  404.                endif
  405.                set Error = $($R0)
  406.                Goto fatal
  407.            Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  408.                Goto successful
  409.            Endif
  410.            Set SrcDir = $($R1)
  411.         Endif
  412.         install "Install-Option"
  413.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  414.            Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  415.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  416.                goto ShellCodeError
  417.            endif
  418.            set Error = $($R0)
  419.            goto fatal
  420.         endif
  421.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  422.             $(ProductSoftwareName), +
  423.             $(ProductSoftwareName), +
  424.             $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  425.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  426.             $(NetEventDLL)
  427.         Set OEM_ABANDON_SOFTWARE = TRUE
  428.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  429.             goto ShellCodeError
  430.         endif
  431.         set RegistryErrorIndex = $($R0)
  432.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  433.             EndWait
  434.             CloseRegKey $($R1)
  435.             CloseRegKey $($R2)
  436.             CloseRegKey $($R3)
  437.             CloseRegKey $($R4)
  438.             CloseRegKey $($R5)
  439.             goto fatalregistry
  440.         endif
  441.         Set SoftProductKey      = $($R1)
  442.         Set SoftNetRuleKey      = $($R2)
  443.         Set SoftServiceKey      = $($R3)
  444.         Set SoftParameterKey    = $($R4)
  445.         Set SoftLinkageKey      = $($R5)
  446.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  447.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  448.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  449.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  450.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  451.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  452.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  453.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  454.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  455.             goto ShellCodeError
  456.         endif
  457.         set RegistryErrorIndex = $($R0)
  458.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  459.             EndWait
  460.             CloseRegKey $(SoftProductKey)
  461.             CloseRegKey $(SoftNetRuleKey)
  462.             CloseRegKey $(SoftServiceKey)
  463.             CloseRegKey $(SoftParameterKey)
  464.             CloseRegKey $(SoftLinkageKey)
  465.             goto fatalregistry
  466.         endif
  467.         set BindableTxt  = {"defeaDriver dec300Adapter non exclusive 100"}
  468.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  469.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  470.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  471.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  472.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(BindableTxt)}, +
  473.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  474.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  475.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  476.             goto ShellCodeError
  477.         endif
  478.         set RegistryErrorIndex = $($R0)
  479.         CloseRegKey $(SoftProductKey)
  480.         CloseRegKey $(SoftNetRuleKey)
  481.         CloseRegKey $(SoftServiceKey)
  482.         CloseRegKey $(SoftParameterKey)
  483.         CloseRegKey $(SoftLinkageKey)
  484.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  485.             EndWait
  486.             goto fatalregistry
  487.         endif
  488.     endif
  489.     else
  490.         set CommonStatus = STATUS_USERCANCEL
  491.         goto successful
  492.     endif
  493.  
  494. ;*********** Add Hardware Component For Each Card **********************
  495.  
  496.     ForListDo $(List1)
  497.         ifstr(i) $($) != ""
  498.                 Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  499.                 ifint $($R4) != -1
  500.                     Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  501.                 endif
  502.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  503.                     goto ShellCodeError
  504.                 endif
  505.                 set RegistryErrorIndex = $($R0)
  506.                 Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  507.                     EndWait
  508.                     CloseRegKey $($R1)
  509.                     CloseRegKey $($R2)
  510.                     CloseRegKey $($R3)
  511.                     goto fatalregistry
  512.                 endif
  513.                 Set HardNetCardKey      = $($R1)
  514.                 Set HardNetRuleKey      = $($R2)
  515.                 Set HardParameterKey    = $($R3)
  516.                 set AdapterNumber = $($R4)
  517.                 set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  518.                                    {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
  519.                                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+
  520.                                    {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  521.                                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  522.                                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  523.                 Shell  $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  524.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  525.                     goto ShellCodeError
  526.                 endif
  527.                 set NewValueList = {{CardType,$(NoTitle),$(!REG_VT_DWORD),5},+
  528.                                    {BusType,$(NoTitle),$(!REG_VT_DWORD),2},+
  529.                                    {MediaType,$(NoTitle),$(!REG_VT_DWORD),4},+
  530.                                    {EisaCompressedId,$(NoTitle),$(!REG_VT_DWORD),$(DEC300_1BYTE)},+
  531.                                    {BusNumber,$(NoTitle),$(!REG_VT_DWORD),*($(List1),$(#))},+
  532.                                    {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),*($(List2),$(#))},+
  533.                                    {RcvBuffCnt,$(NoTitle),$(!REG_VT_DWORD),*($(List3),$(#))},+
  534.                                    {BurstSize,$(NoTitle),$(!REG_VT_DWORD),*($(List4),$(#))},+
  535.                                    {XmtBuffCnt,$(NoTitle),$(!REG_VT_DWORD),*($(List5),$(#))},+
  536.                                    {FullDuplexEnable,$(NoTitle),$(!REG_VT_DWORD),*($(List6),$(#))},+
  537.                                    {RequestedTTRT,$(NoTitle),$(!REG_VT_DWORD),*($(List7),$(#))}}
  538.           
  539.           
  540.           
  541.           Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  542.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  543.                     goto ShellCodeError
  544.                 endif
  545.                 set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  546.                 set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  547.                 set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  548.                                     {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  549.                                     {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  550.                                     {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  551.                 Shell  $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  552.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  553.                     goto ShellCodeError
  554.                 endif
  555.                 CloseRegKey $(HardNetCardKey)
  556.                 CloseRegKey $(HardNetRuleKey)
  557.                 CloseRegKey $(HardParameterKey)
  558.             endif
  559.         EndForListDo
  560.     goto writeparameters
  561. writeparameters = +
  562.     EndWait
  563.     goto successful
  564. bindingadapter =+
  565.     set Error = "Binding: Sorry, not yet implemented."
  566.     goto fatal
  567. removeadapter = +
  568.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  569.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  570.             $(ProductSoftwareName)
  571.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  572.             Debug-Output "ShellCode error"
  573.             goto ShellCodeError
  574.         endif
  575.         set RegistryErrorIndex = $($R0)
  576.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  577.             goto fatalregistry
  578.         endif
  579.     else
  580.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  581.             $(ProductSoftwareName), $(!NTN_RegBase)
  582.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  583.             Debug-Output "ShellCode error"
  584.             goto ShellCodeError
  585.         endif
  586.         set RegistryErrorIndex = $($R0)
  587.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  588.             goto fatalregistry
  589.         endif
  590.     endif
  591.     goto end
  592. UpgradeSoftware = +
  593.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  594.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  595.         Ifstr $(KeyProduct) != $(KeyNull)
  596.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  597.             set Version = *($(VersionInfo), 4)
  598.             Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  599.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  600.                 Debug-Output "ShellCode error"
  601.                 goto ShellCodeError
  602.             endif
  603.             set !UG_Filename = $($R0)
  604.             ifstr(i) $(!UG_Filename) != ""
  605.                 install "Install-Update"
  606.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  607.                     goto fatal
  608.                 endif
  609.             endif
  610.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  611.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  612.             ifint $(Version) != $(ProductVersion)
  613.             endif
  614.             CloseRegKey $(KeyProduct)
  615.         else
  616.             goto fatalregistry
  617.         endif
  618.     else
  619.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  620.               $(MAXIMUM_ALLOWED) NetworkCardKey
  621.         Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  622.             GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  623.             set ServiceName = *($(ServiceNameInfo), 4)
  624.             OpenRegKey $(NetworkCardKey) "" "NetRules" +
  625.                 $(MAXIMUM_ALLOWED) NetRuleKey
  626.             Ifstr(i) $(NetRuleKey) != $(KeyNull)
  627.             else
  628.                 goto fatalregistry
  629.             endif
  630.             CloseRegKey $(NetRules)
  631.             CloseRegKey $(NetworkCardKey)
  632.         else
  633.             goto fatalregistry
  634.         endif
  635.         OpenRegKey $(!REG_H_LOCAL) "" +
  636.               $(!NTN_ServiceBase)"\"$(ServiceName) +
  637.               $(MAXIMUM_ALLOWED) ServiceKey
  638.         Ifstr(i) $(ServiceKey) != $(KeyNull)
  639.             CloseRegKey $(ServiceKey)
  640.         else
  641.             goto fatalregistry
  642.         endif
  643.     endif
  644.     goto end
  645. successful = +
  646.     goto end
  647. abandon = +
  648.     ForListDo $(OEM_ABANDON_OPTIONS)
  649.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  650.             $(ProductSoftwareName), $($)
  651.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  652.             Debug-Output "ShellCode error"
  653.             goto ShellCodeError
  654.         endif
  655.         set RegistryErrorIndex = $($R0)
  656.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  657.             goto fatalregistry
  658.         endif
  659.     EndForListDo
  660.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  661.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  662.             $(ProductSoftwareName), FALSE
  663.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  664.             Debug-Output "ShellCode error"
  665.             goto ShellCodeError
  666.         endif
  667.         set RegistryErrorIndex = $($R0)
  668.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  669.             goto fatalregistry
  670.         endif
  671.     endif
  672.     goto end
  673. warning = +
  674.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  675.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  676.         goto ShellCodeError
  677.     endif
  678.     ifstr(i) $($R1) == "OK"
  679.         goto $(to)
  680.     else-ifstr(i) $($R1) == "CANCEL"
  681.         goto $(from)
  682.     else
  683.         goto "end"
  684.     endif
  685. nonfatalinfo = +
  686.     Set CommonStatus = STATUS_USERCANCEL
  687.     Set Severity = STATUS
  688.     goto nonfatalmsg
  689. nonfatal = +
  690.     Set Severity = NONFATAL
  691.     goto nonfatalmsg
  692. nonfatalmsg = +
  693.     ifstr(i) $(Error) == ""
  694.         Set Severity = NONFATAL
  695.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  696.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  697.             goto ShellCodeError
  698.         endif
  699.         set Error = $($R0)
  700.     endif
  701.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  702.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  703.         goto ShellCodeError
  704.     endif
  705.     ifstr(i) $($R1) == "OK"
  706.         goto $(from)
  707.     else
  708.         goto "end"
  709.     endif
  710. fatalregistry = +
  711.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  712.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  713.         goto ShellCodeError
  714.     endif
  715.     set Error = $($R0)
  716.     goto fatal
  717. fatal = +
  718.     ifstr(i) $(Error) == ""
  719.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  720.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  721.             goto ShellCodeError
  722.         endif
  723.         set Error = $($R0)
  724.     endif
  725.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  726.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  727.         goto ShellCodeError
  728.     endif
  729.     goto setfailed
  730. ShellCodeError = +
  731.     set DlgType      = "MessageBox"
  732.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  733.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  734.     set STF_MB_TYPE  = 1
  735.     set STF_MB_ICON  = 3
  736.     set STF_MB_DEF   = 1
  737.     ui start "Error Message"
  738.     goto setfailed
  739. setfailed = +
  740.     set CommonStatus = STATUS_FAILED
  741.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  742.         set OEM_ABANDON_ON = FALSE
  743.         goto abandon
  744.     endif
  745.     goto end
  746. end = +
  747.     goto term
  748. term = +
  749.     Return $(CommonStatus)
  750. [Install-Option]
  751.     set STF_VITAL = ""
  752.     ifstr(i) $(AddCopy) == "YES"
  753.         AddSectionFilesToCopyList Files-$(Option) $(SourceDir) $(!STF_WINDOWSSYSPATH)\drivers
  754.     endif
  755.     ifstr(i) $(DoCopy) == "YES"
  756.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  757.        CopyFilesInCopyList
  758.     endif
  759.     ifstr(i) $(DoConfig) == "YES"
  760.     endif
  761.     Exit
  762. [Install-Update]
  763.    set STF_VITAL        = ""
  764.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  765.    AddSectionFilesToCopyList Files-$(Option) $(UpdateDir) $(!STF_WINDOWSSYSPATH)\drivers
  766.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  767.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  768.    CopyFilesInCopyList
  769.    exit
  770. [Source Media Descriptions]
  771.     1  = "Windows NT Setup Disk #1"
  772.     2  = "Windows NT Setup CD-ROM Disk"
  773. [ProductType]
  774. STF_PRODUCT  = Winnt
  775. ;STF_PLATFORM = Alpha
  776. [Files-Inf]
  777. 1, OEMSETNT.INF, SIZE=27000, RENAME=$(!UG_Filename)
  778. [Files-DEC300]
  779. 1, DEFEA.SYS, SIZE=55000
  780. 1, DEFEA.DLL, SIZE=4000,  DESTINATION=$(!STF_WINDOWSSYSPATH)
  781. [LanguagesSupported]
  782.     ENG
  783. [OptionsTextENG]
  784.     DEC300     = "DEC FDDIcontroller/EISA"
  785. [FileConstantsENG]
  786. ProCaption   = "Windows NT Setup"
  787. ProCancel    = "Cancel"
  788. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  789.                "Are you sure you want to cancel copying files?"
  790. ProCancelCap = "Network Setup Message"
  791. ProText1     = "Copying:"
  792. ProText2     = "To:"
  793. FunctionTitle   = "DEC FDDIcontroller/EISA Card Setup"
  794. ProductSoftwareDescription      = "DEC FDDIcontroller/EISA Driver"
  795. ProductHardwareDescription      = "DEC FDDIcontroller/EISA"
  796. CANNOT_FIND_ANY_CARD            = "Network card is not present in the system"
  797. ProductSoftwareTitle    = "DEC FDDIcontroller/EISA Driver"
  798. ProductHardwareTitle    = "DEC FDDIcontroller/EISA Adapter"
  799. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  800. ShellCodeErrorText      = "Shell Code Error."
  801. BurstSizeList = ^(BurstSizeChoices,1)
  802. BurstSizeValues = ^(BurstSizeChoices,2)
  803. ReceiveBuffList = ^(ReceiveBuffChoices,1)
  804. ReceiveBuffValues = ^(ReceiveBuffChoices,2)
  805. TransmitBuffList = ^(TransmitBuffChoices,1)
  806. TransmitBuffValues = ^(TransmitBuffChoices,2)
  807. DialogDllName = "defea.dll"
  808. [DialogConstantsENG]
  809. Help        = "&Help"
  810. Exit        = "Cancel"
  811. OK          = "OK"
  812. HelpContext = ""
  813. Continue    = "Continue"
  814. Cancel      = "Cancel"
  815. [FileDependentDlgENG]
  816. DlgType = "RadioCombination"
  817. DlgTemplate = "DEFEA"
  818. Combo1 = "Burst Size:"
  819. Combo2 = "Receive Buffers:"
  820. Combo3 = "Transmit Buffers:"
  821. Group = "Full Duplex Enable"
  822. Edit1 = "Requested TTRT(ms):"
  823. Combo1List = $(BurstSizeList)
  824. Combo1Out = $(BurstSizeValue)
  825. Combo2List = $(ReceiveBuffList)
  826. Combo2Out = $(ReceiveBuffValue)
  827. Combo3List = $(TransmitBuffList)
  828. Combo3Out = $(TransmitBuffValue)
  829. ComboListItemsIn = {Combo2List,Combo3List}
  830. ComboListItemsOut = {Combo2Out,Combo3Out}
  831. EditTextLim = {3}
  832. [BurstSizeChoices]
  833. Burst_1 = "4",0
  834. Burst_2 = "8",1
  835. Burst_3 = "16",2
  836. [ReceiveBuffChoices]
  837. Receive_1 = "2",2
  838. Receive_2 = "4",4
  839. Receive_3 = "8",8
  840. [TransmitBuffChoices]
  841. Transmit_1 = "4",4
  842. Transmit_2 = "8",8
  843. Transmit_3 = "16",16
  844. Transmit_4 = "32",32
  845. Transmit_5 = "64",64
  846. Transmit_6 = "128",128
  847.