home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2000 August / VPR0008B.BIN / DRIVER / MELCO / WL11_200 / WL11_200.EXE / WINNT / OEMSETUP.INF < prev    next >
INI File  |  2000-01-13  |  45KB  |  1,117 lines

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;
  3. ; OEMSETUP.INF for WLIL11.SYS
  4. ;
  5. ; Copyright (C) 1999 Lucent Technologies
  6. ;
  7. ; All rights reserved.
  8. ;
  9. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  10.  
  11. [Identification]
  12.     OptionType              = NetAdapter
  13.  
  14. [Options]
  15.     WaveLAN_PCMCIA
  16.  
  17. [OptionsText-ENG]
  18.     WaveLAN_PCMCIA          = "MELCO WLI-PCM-L11 Wireless LAN Adapter"
  19.  
  20. [ProductConstants]
  21.     Manufacturer            = "MELCO INC."
  22.     OrgManufacturer         = "MELCO"
  23.     FunctionTitle           = "MELCO WLI-PCM-L11 Adapter Setup"
  24.     SWProductDescription    = "MELCO WLI-PCM-L11 Miniport Driver"
  25.     HWProductDescription    = "MELCO WLI-PCM-L11 Wireless LAN Adapter"
  26.  
  27. [ProductConstants-WaveLAN_PCMCIA]
  28.     ConfigFileName          = "WLIL11.DLL"
  29.     HelpFileName            = "WVLAN41.HLP"
  30.     DriverFileName          = "WLIL11.SYS"
  31.  
  32.     PcmciaProductName       = "WLI-PCM-L11"
  33.     OrgPcmciaProductName    = "WLI-PCM-L11"
  34.     HWProductName           = "WLIL11"
  35.     HWProductTitle          = "MELCO "$(PcmciaProductName)" Wireless LAN Adapter"
  36.  
  37.     DLL_Caption             = $(PcmciaProductName)"の設定"
  38.     DLL_Network             = "&ESS ID:"
  39.     VendorDescription       = $(HWProductTitle)
  40.  
  41.     SWProductVersionMajor   = "1"
  42.     SWProductVersionMinor   = "7"
  43.     SWProductName           = $(HWProductName)
  44.     SWProductTitle          = $(HWProductTitle)" Driver"
  45.     SWProductPath           = "\SystemRoot\System32\drivers\"$(DriverFileName)
  46.     SWProductVersion        = $(SWProductVersionMajor)"."$(SWProductVersionMinor)
  47.     SWProductKeyName        = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(SWProductName)"\CurrentVersion"
  48.     PcmciaKeyName           = $(!NTN_ServiceBase)"\PCMCIA\DataBase"
  49.  
  50.     DPPCMCIA                = 1
  51.  
  52. [NetRuleConstants]
  53.     SoftwareType            = "driver"
  54.     NetRuleSoftwareType     = $(HWProductName)"Sys ndisDriver "$(HWProductName)"Driver"
  55.     NetRuleSoftwareUse      = $(SoftwareType)
  56.     NetRuleSoftwareBindForm = """"$(HWProductName)"Sys"" yes no container"
  57.     NetRuleSoftwareClass    = {$(HWProductName)"Driver basic"}
  58.     NetRuleSoftwareBindable = {$(HWProductName)"Driver "$(HWProductName)"Adapter non exclusive 100"}
  59.     NetRuleHardwareType     = $(HWProductName)" "$(HWProductName)"Adapter"
  60.     NetRuleHardwareBindForm = " yes yes container"
  61.     NetRuleHardwareClass    = {$(HWProductName)"Adapter basic"}
  62.     NetworkCardsKeyName     = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"
  63.  
  64. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  65. ;
  66. ; Define parameters which will be conditionally added as
  67. ; values in the device parameters section.
  68. ;
  69. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  70. [DriverParameters]
  71.     BusType                         = 1
  72.     BusNumber                       = 0
  73.     MediaType                       = 1
  74.     PortType                        = 3
  75.     IoBaseAddress                   = 1024
  76.     InterruptNumber                 = 10
  77.     OwnChannel                      = 14
  78.     WLIPCI                          = 0
  79.     DPDebugFlags                    = 0
  80.  
  81. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  82. ;
  83. ; Get id string parameters
  84. ; Sets Identifier to OptionType string from above.
  85. ; Sets Media to installation disk identifier
  86. ;
  87. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  88. [Identify]
  89. ;    Set !DebugOutputControl = 1
  90.     Debug-Output "WVLANINF: Identify"
  91.     Read-Syms Identification
  92.     Set Status              = STATUS_SUCCESSFUL
  93.     Set Identifier          = $(OptionType)
  94.     Set Media               = #("Source Media Descriptions", 1, 1)
  95.     Return $(Status) $(Identifier) $(Media)
  96.  
  97. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  98. ;
  99. ; Determine if the language and platform specified is
  100. ; supported by this install file.
  101. ;
  102. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  103. [ReturnOptions]
  104. ;    Set !DebugOutputControl = 1
  105.     Debug-Output "WVLANINF: ReturnOptions"
  106.     Set Status              = STATUS_FAILED
  107.     Set OptionList          = {}
  108.     Set OptionTextList      = {}
  109.     Set LanguageList        = ^(LanguagesSupported, 1)
  110.     IfContains(i) $($0) in $(LanguageList)
  111.         IfStr(i) $($1) == ""
  112.             Goto ReturnOptions_Success
  113.         EndIf
  114.         Set PlatformList    = ^(PlatformsSupported, 1)
  115.         IfContains(i) $($1) in $(PlatformList)
  116.             Goto ReturnOptions_Success
  117.         Else
  118.             Set Status = STATUS_NOTSUPPORTED
  119.             Goto ReturnOptions_Failure
  120.         EndIf
  121.     Else
  122.         Set Status = STATUS_NOLANGUAGE
  123.         Goto ReturnOptions_Failure
  124.     EndIf
  125. ReturnOptions_Success = +
  126.     Set OptionList          = ^(Options, 1)
  127.     Set OptionTextList      = ^(OptionsText-$($0), 1)
  128.     Set Status              = STATUS_SUCCESSFUL
  129. ReturnOptions_Failure = +
  130.     Return $(Status) $(OptionList) $(OptionTextList)
  131.  
  132. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  133. ;
  134. ; MAIN ENTRY POINT
  135. ;
  136. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  137. [InstallOption]
  138. ;;;
  139. ;;; FIXME - Turn off debug messages before shipping
  140. ;;;
  141.     Set SaveDebugOutputControl = $(!DebugOutputControl)
  142. ;    Set !DebugOutputControl = 1
  143.     Debug-Output "WVLANINF: InstallOption"
  144. ;;;
  145. ;;; Get parameters from calling routine
  146. ;;;
  147.     Set Option              = $($1)
  148.     Set SrcDir              = $($2)
  149.     Set AddCopy             = $($3)
  150.     Set DoCopy              = $($4)
  151.     Set DoConfig            = $($5)
  152.     Set LanguageList        = ^(LanguagesSupported, 1)
  153. ;;;
  154. ;;; Check that language is supported, and abort if it is not.
  155. ;;;
  156.     IfContains(i) $($0) NOT-IN $(LanguageList)
  157.         Return STATUS_NOLANGUAGE
  158.     EndIf
  159. ;;;
  160. ;;; Get defined strings.
  161. ;;;
  162.     Read-Syms GeneralConstants
  163.     Read-Syms FileConstants
  164.     Read-Syms FileConstants-$(!STF_LANGUAGE)
  165.     Read-Syms ProductConstants
  166.     Read-Syms ProductConstants-$(Option)
  167.     Read-Syms NetRuleConstants
  168.     Read-Syms DriverParameters
  169.     Read-Syms DialogConstants-$(!STF_LANGUAGE)
  170. ;;;
  171. ;;; Get date
  172. ;;;
  173.     Detect Date
  174.     Set-Subst LF = "\n"
  175. ;;;
  176. ;;; Set title for this procedure
  177. ;;;
  178.     Set-Title $(FunctionTitle)
  179.     Set GoToLabel     = Begin
  180.     Set ComeFromLabel = Begin
  181.     Set CommonStatus  = STATUS_SUCCESSFUL
  182. ;;;
  183. ;;; Determine mode selected by user in NCPA
  184. ;;;
  185. Begin = +
  186.     EndWait
  187.     IfStr(i)      $(!NTN_InstallMode) == "Deinstall"
  188.         Set StartLabel = RemoveAdapter
  189.     Else-IfStr(i) $(!NTN_InstallMode) == "Update"
  190.         Set StartLabel = UpgradeSoftware
  191.     Else-IfStr(i) $(!NTN_InstallMode) == "Bind"
  192.         Set StartLabel = BindingAdapter
  193.     Else-IfStr(i) $(!NTN_InstallMode) == "Configure"
  194.         Set StartLabel = ConfigureAdapter
  195.     Else
  196.         Set StartLabel = InstallAdapter
  197.     EndIf
  198.  
  199.     Debug-Output $(SWProductName)": ============================================="
  200.     Debug-Output $(SWProductName)": Option          = "$(Option)
  201.     Debug-Output $(SWProductName)": SrcDir          = "$(SrcDir)
  202.     Debug-Output $(SWProductName)": AddCopy         = "$(AddCopy)
  203.     Debug-Output $(SWProductName)": DoCopy          = "$(DoCopy)
  204.     Debug-Output $(SWProductName)": DoConfig        = "$(DoConfig)
  205.     Debug-Output $(SWProductName)": STF_LANGUAGE    = "$(!STF_LANGUAGE)
  206.     Debug-Output $(SWProductName)": STF_CWDIR       = "$(!STF_CWDIR)
  207.     Debug-Output $(SWProductName)": NTN_InstallMode = "$(!NTN_InstallMode)
  208.     Debug-Output $(SWProductName)": NTN_RegBase     = "$(!NTN_RegBase)
  209.     Debug-Output $(SWProductName)": ============================================="
  210.  
  211.     Set ComeFromLabel = fatal
  212.     Set GoToLabel = fatal
  213.     Goto $(StartLabel)
  214.  
  215. InstallAdapter = +
  216.     Debug-Output $(SWProductName)": InstallAdapter: "$(SWProductKeyName)
  217. ;;;
  218. ;;; See if the software has already been installed.
  219. ;;;
  220.     StartWait
  221.     OpenRegKey $(!REG_H_LOCAL) "" $(SWProductKeyName) $(MAXIMUM_ALLOWED) +
  222.             hKeySWProduct
  223.     IfStr $(hKeySWProduct) != $(hKeyNull)
  224.         Debug-Output $(SWProductName)": Already Installed: "$(SWProductKeyName)
  225.         IfStr(i) $(SWProductKeyName) == $(!NTN_RegBase)
  226. ;;;
  227. ;;;         The software is already installed, don't do it again.
  228. ;;;
  229.             Shell $(UtilityInf), VerExistedDlg, +
  230.                                     $(SWProductTitle), +
  231.                                     $(SWProductVersion)
  232.             IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  233.                 Debug-Output $(SWProductName)": Cannot run VerExistedDlg"
  234.                 Goto ShellCodeError
  235.             EndIf
  236.             Debug-Output $(SWProductName)": Software already installed"
  237.             Goto end
  238.         Else
  239. ;;;
  240. ;;;         The software is already installed, now the user is adding 
  241. ;;;         a new hardware instance.  Let's make sure it's okay.
  242. ;;;
  243.             Shell $(UtilityInf), CardExistedDlg
  244.             IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  245.                 Debug-Output $(SWProductName)": Cannot run CardExistedDlg"
  246.                 Goto ShellCodeError
  247.             EndIf
  248.             IfStr(i) $($R1) != "OK"
  249.                 Debug-Output $(SWProductName)": User cancelled install"
  250.                 Goto end
  251.             EndIf
  252.         EndIf
  253.     Else
  254. ;;;
  255. ;;;     The software is not installed, so do it now.
  256. ;;;     Start by copying the files to the system disk.
  257. ;;;
  258.         Debug-Output $(SWProductName)": First Time Install: "$(SWProductKeyName)
  259. ;       If this is not running via the NCPA, we need to change the 
  260. ;       SrcDir since DoAskSource won't prompt for the disk.  If the 
  261. ;       NCPA is not used, the files should be copied before launching 
  262. ;       the INF install, and you should do no file copies from the INF.
  263. ;        IfStr(i) $(!NTN_InstallPhase) == "primary"
  264. ;            Set SrcDir = "A:\"
  265. ;        EndIf
  266. ;;;
  267. ;;;     If SrcDir is not set, ask the user to locate it for us.
  268. ;;;
  269.         Set STF_INSTALL_OUTCOME = STF_SUCCESS
  270.         IfStr(i) $(SrcDir) == ""
  271.             Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), "A:\", "NO"
  272.             IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  273.                 Set STF_INSTALL_OUTCOME = STATUS_SHELL_FAILED
  274.             Else-IfStr(i) $($R0) == STATUS_FAILED
  275.                 Set STF_INSTALL_OUTCOME = STATUS_FAILED
  276.             Else-IfStr(i) $($R0) == STATUS_USERCANCEL
  277.                 Set STF_INSTALL_OUTCOME = STATUS_USERCANCEL
  278.             Else
  279.                 Set SrcDir = $($R1)
  280.             EndIf
  281.         EndIf
  282.         IfStr(i) $(STF_INSTALL_OUTCOME) == STF_SUCCESS
  283.             Install "Install-Software"
  284.         Endif
  285.         IfStr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  286.             Debug-Output $(SWProductName)": Install-Software ERROR="$(STF_INSTALL_OUTCOME)
  287.             Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  288.             IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  289.                 Goto ShellCodeError
  290.             EndIf
  291.             Set Error = $($R0)
  292.             Goto fatal
  293.         EndIf
  294. ;;;
  295. ;;;     Now add the software component to the registry.
  296. ;;;
  297.         Debug-Output $(SWProductName)": AddSoftwareComponent"
  298.         Debug-Output $(SWProductName)": Manufacturer = "$(Manufacturer)
  299.         Debug-Output $(SWProductName)": SWProductName = "$(SWProductName)
  300.         Debug-Output $(SWProductName)": SWProductTitle = "$(SWProductTitle)
  301.         Debug-Output $(SWProductName)": STF_CONTEXTINFNAME = "$(STF_CONTEXTINFNAME)
  302.         Debug-Output $(SWProductName)": SWProductPath = "$(SWProductPath)
  303.  
  304.         Set OEM_ABANDON_SOFTWARE = TRUE
  305.         Shell $(UtilityInf), AddSoftwareComponent, +
  306.                                 $(Manufacturer), +
  307.                                 $(SWProductName), +
  308.                                 $(SWProductName), +
  309.                                 $(SWProductTitle), +
  310.                                 $(STF_CONTEXTINFNAME), +
  311.                                 $(SWProductPath), +
  312.                                 "kernel", "NDIS", {}, "", +
  313.                                 $(NetEventDLL)
  314.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  315.             Debug-Output $(SWProductName)": Cannot run AddSoftwareComponent"
  316.             Goto ShellCodeError
  317.         EndIf
  318.         Set RegistryErrorIndex  = $($R0)
  319.         Set hKeySWProduct       = $($R1)
  320.         Set hKeySWNetRules      = $($R2)
  321.         Set hKeySWService       = $($R3)
  322.         Set hKeySWParameter     = $($R4)
  323.         Set hKeySWLinkage       = $($R5)
  324.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  325.             Debug-Output $(SWProductName)": AddSoftwareComponent ERROR="$(RegistryErrorIndex)
  326.             Goto fatalRegistry
  327.         EndIf
  328. ;;;
  329. ;;;     Write the values to the software product key.
  330. ;;;
  331.         Debug-Output $(SWProductName)": AddValueList hKeySWProduct"
  332.         Set NewValueList = {+
  333.                 {Description,$(NoTitle),$(!REG_VT_SZ),$(SWProductDescription)}, +
  334.                 {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}, +
  335.                 {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(SWProductVersionMajor)}, +
  336.                 {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(SWProductVersionMinor)}, +
  337.                 {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(SWProductName)}, +
  338.                 {SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)}, +
  339.                 {Title,$(NoTitle),$(!REG_VT_SZ),$(SWProductTitle)} +
  340.                 }
  341.         Shell  $(UtilityInf), AddValueList, $(hKeySWProduct), $(NewValueList)
  342.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  343.             Debug-Output $(SWProductName)": Cannot run AddValueList: hKeySWProduct"
  344.             Goto ShellCodeError
  345.         EndIf
  346.         Set RegistryErrorIndex = $($R0)
  347.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  348.             Debug-Output $(SWProductName)": AddValueList hKeySWProduct ERROR="$(RegistryErrorIndex)
  349.             Goto fatalRegistry
  350.         EndIf
  351. ;;;
  352. ;;;     Write the values to the software NetRules key.
  353. ;;;
  354.         Debug-Output $(SWProductName)": AddValueList hKeySWNetRules"
  355.         Set NewValueList = {+
  356.                 {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  357.                 {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  358.                 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  359.                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}, +
  360.                 {type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)}, +
  361.                 {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)} +
  362.                 }
  363.         Shell  $(UtilityInf), AddValueList, $(hKeySWNetRules), $(NewValueList)
  364.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  365.             Debug-Output $(SWProductName)": Cannot run AddValueList: hKeySWNetRules"
  366.             Goto ShellCodeError
  367.         EndIf
  368.         Set RegistryErrorIndex = $($R0)
  369.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  370.             Debug-Output $(SWProductName)": AddValueList hKeySWNetRules ERROR="$(RegistryErrorIndex)
  371.             Goto fatalRegistry
  372.         EndIf
  373. ;;;
  374. ;;;     If this is just a software install, we're done.
  375. ;;;
  376.         Debug-Output $(SWProductName)": Software install complete"
  377.     EndIf
  378. ;;;
  379. ;;; Okay, if we're here, it must be time to install a new hardware device.
  380. ;;;
  381.     Debug-Output $(SWProductName)": AddHardwareComponent"
  382.     Set OEM_ABANDON_HARDWARE = TRUE
  383.     Shell $(UtilityInf), AddHardwareComponent, $(HWProductName), +
  384.                             $(STF_CONTEXTINFNAME), $(SWProductKeyName)
  385.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  386.         Debug-Output $(SWProductName)": Cannot run AddHardwareComponent"
  387.         Goto ShellCodeError
  388.     EndIf
  389.     Set RegistryErrorIndex      = $($R0)
  390.     Set hKeyNetCard             = $($R1)
  391.     Set hKeyNetCardRules        = $($R2)
  392.     Set hKeyDeviceParameters    = $($R3)
  393.     Set NetCardNumber           = $($R4)
  394.     Set ServiceName             = $($R5)
  395.     IfInt $(NetCardNumber) != -1
  396.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), +
  397.                                     $(NetworkCardsKeyName)$(NetCardNumber))
  398.     EndIf
  399.     IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  400.         Debug-Output $(SWProductName)": AddHardwareComponent ERROR="$($R0)
  401.         Goto fatalRegistry
  402.     EndIf
  403. ;;;
  404. ;;; Now add the values to the NetworkCards\N subkey.
  405. ;;;
  406.     Debug-Output $(SWProductName)": AddValueList hKeyNetCard"
  407.     Set NewValueList = {+
  408.             {Description,$(NoTitle),$(!REG_VT_SZ),$(HWProductDescription)}, +
  409.             {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}, +
  410.             {Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)}, +
  411.             {ProductName,$(NoTitle),$(!REG_VT_SZ),$(HWProductName)}, +
  412.             {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ServiceName)}, +
  413.             {Title,$(NoTitle),$(!REG_VT_SZ),"["$(NetCardNumber)"] "$(HWProductTitle)} +
  414.             }
  415.     Shell  $(UtilityInf), AddValueList, $(hKeyNetCard), $(NewValueList)
  416.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  417.         Debug-Output $(SWProductName)": Cannot run AddValueList: hKeyNetCard"
  418.         Goto ShellCodeError
  419.     EndIf
  420. ;;;
  421. ;;; Now add the values to the NetworkCards\N\NetRules subkey.
  422. ;;;
  423.     Set TempBindForm = """"$(ServiceName)""""$(NetRuleHardwareBindForm)
  424.     Set NewValueList = {+
  425.             {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  426.             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  427.             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}, +
  428.             {type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)}+
  429.             }
  430.     Shell  $(UtilityInf), AddValueList, $(hKeyNetCardRules), $(NewValueList)
  431.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  432.         Debug-Output $(SWProductName)": Cannot run AddValueList: hKeyNetCardRules"
  433.         Goto ShellCodeError
  434.     EndIf
  435.     Set RegistryErrorIndex = $($R0)
  436.     IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  437.         Debug-Output $(SWProductName)": AddValueList: hKeyNetCardRules ERROR="$(RegistryErrorIndex)
  438.         Goto fatalRegistry
  439.     EndIf
  440. ;;;
  441. ;;; Now add the fixed values to the adapter parameters subkey.
  442. ;;;
  443.     Set NewValueList = {+
  444.             {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)}, +
  445.             {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusType)}, +
  446.             {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(MediaType)} +
  447.             }
  448.     Shell  $(UtilityInf), AddValueList, $(hKeyDeviceParameters), $(NewValueList)
  449.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  450.         Debug-Output $(SWProductName)": Cannot run AddValueList: hKeyDeviceParameters"
  451.         Goto ShellCodeError
  452.     EndIf
  453.     Set RegistryErrorIndex = $($R0)
  454.     IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  455.         Debug-Output $(SWProductName)": AddValueList: hKeyDeviceParameters ERROR="$(RegistryErrorIndex)
  456.         Goto fatalRegistry
  457.     EndIf
  458.  
  459.     IfStr(i) $(Option) == "WaveLAN_PCMCIA"
  460. ;;;
  461. ;;;     If PCMCIA adapter, add keys and values to allow NT to create 
  462. ;;;     attribute window when the system boots.
  463. ;;;
  464.         OpenRegKey $(!REG_H_LOCAL) "" $(PcmciaKeyName) $(MAXIMUM_ALLOWED) +
  465.                 hKeyPcmciaDatabase
  466.         IfStr $(hKeyPcmciaDatabase) == $(hKeyNull)
  467.             Debug-Output $(SWProductName)": OpenRegKey failed to open: "$(PcmciaKeyName)
  468.             Goto fatalRegistry
  469.         EndIf
  470. ;;;
  471. ;;;     Try to create the manufacturer keys in PCMCIA database, 
  472. ;;;     but don't fail if it's already there.
  473. ;;;
  474. ;        CreateRegKey $(hKeyPcmciaDatabase) {$(Manufacturer), 0, GenericClass} +
  475. ;                        "" $(MAXIMUM_ALLOWED) "" hKeyPcmciaManufacturer
  476. ;        IfStr $(hKeyPcmciaManufacturer) == $(hKeyNull)
  477. ;            OpenRegKey $(hKeyPcmciaDatabase) "" $(Manufacturer) $(MAXIMUM_ALLOWED) +
  478. ;                    hKeyPcmciaManufacturer
  479. ;            IfStr $(hKeyPcmciaManufacturer) == $(hKeyNull)
  480. ;                Debug-Output $(SWProductName)": OpenRegKey failed to open: " +
  481. ;                                $(PcmciaKeyName)"\"$(Manufacturer)
  482. ;                Goto fatalRegistry
  483. ;            EndIf
  484. ;        EndIf
  485.         CreateRegKey $(hKeyPcmciaDatabase) {$(OrgManufacturer), 0, GenericClass} +
  486.                         "" $(MAXIMUM_ALLOWED) "" hKeyPcmciaManufacturer
  487.         IfStr $(hKeyPcmciaManufacturer) == $(hKeyNull)
  488.             OpenRegKey $(hKeyPcmciaDatabase) "" $(OrgManufacturer) $(MAXIMUM_ALLOWED) +
  489.                     hKeyPcmciaManufacturer
  490.             IfStr $(hKeyPcmciaManufacturer) == $(hKeyNull)
  491.                 Debug-Output $(SWProductName)": OpenRegKey failed to open: " +
  492.                                 $(PcmciaKeyName)"\"$(OrgManufacturer)
  493.                 Goto fatalRegistry
  494.             EndIf
  495.         EndIf
  496. ;;;
  497. ;;;     Try to create WaveLAN PCMCIA product key under manufacturer key, 
  498. ;;;     but don't fail if it's already there.
  499. ;;;
  500. ;        CreateRegKey $(hKeyPcmciaManufacturer) { $(PcmciaProductName), 0, GenericClass } "" +
  501. ;            $(MAXIMUM_ALLOWED) "" hKeyPcmciaProduct
  502. ;        IfStr $(hKeyPcmciaProduct) == $(hKeyNull)
  503. ;            OpenRegKey $(hKeyPcmciaManufacturer) "" $(PcmciaProductName) $(MAXIMUM_ALLOWED) +
  504. ;                    hKeyPcmciaProduct
  505. ;            IfStr $(hKeyPcmciaProduct) == $(hKeyNull)
  506. ;                Debug-Output $(SWProductName)": OpenRegKey failed to open: "
  507. ;                                $(PcmciaKeyName)"\"$(Manufacturer)"\"$(PcmciaProductName)
  508. ;                Goto fatalRegistry
  509. ;            EndIf
  510. ;        Endif
  511.         CreateRegKey $(hKeyPcmciaManufacturer) { $(OrgPcmciaProductName), 0, GenericClass } "" +
  512.             $(MAXIMUM_ALLOWED) "" hKeyPcmciaProduct
  513.         IfStr $(hKeyPcmciaProduct) == $(hKeyNull)
  514.             OpenRegKey $(hKeyPcmciaManufacturer) "" $(OrgPcmciaProductName) $(MAXIMUM_ALLOWED) +
  515.                     hKeyPcmciaProduct
  516.             IfStr $(hKeyPcmciaProduct) == $(hKeyNull)
  517.                 Debug-Output $(SWProductName)": OpenRegKey failed to open: "
  518.                                 $(PcmciaKeyName)"\"$(OrgManufacturer)"\"$(OrgPcmciaProductName)
  519.                 Goto fatalRegistry
  520.             EndIf
  521.         Endif
  522. ;;;
  523. ;;;     Now write the values to the registry.
  524. ;;;
  525.         Set NewValueList = {+
  526.                 {DeviceType,$(NoTitle),$(!REG_VT_SZ),"NET"}, +
  527.                 {Driver,$(NoTitle),$(!REG_VT_SZ), $(SWProductName)}, +
  528.                 {InfFileName,$(NoTitle),$(!REG_VT_SZ),$(!UG_Filename)}, +
  529.                 {Option,$(NoTitle),$(!REG_VT_SZ),$(Option)}+
  530.                 }
  531.         Shell  $(UtilityInf), AddValueList, $(hKeyPcmciaProduct), $(NewValueList)
  532.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  533.             Debug-Output $(SWProductName)": Cannot run AddValueList: hKeyPcmciaProduct (Lucent)"
  534.             Goto ShellCodeError
  535.         EndIf
  536.     EndIf
  537.  
  538.     EndWait
  539.     Goto ConfigureHardware
  540.  
  541. ConfigureAdapter = +
  542.     IfStr(i) $(SWProductKeyName) == $(!NTN_RegBase)
  543. ;;;
  544. ;;;     Cannot configure software component
  545. ;;;
  546.         Debug-Output $(SWProductName)": Can't configure software component: "$(SWProductKeyName)
  547.         Shell $(UtilityInf), RegistryErrorString, CANNOT_CONFIGURE_SOFTWARE
  548.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  549.             Debug-Output $(SWProductName)":ShellCode: RegistryErrorString: "$($ShellCode)
  550.             Goto ShellCodeError
  551.         EndIf
  552.         Set Error = $($R0)
  553.         Set ComeFromLabel = end
  554.         Set GoToLabel     = end
  555.         Goto nonFatalInfo
  556.     EndIf
  557. ;;;
  558. ;;; Configure hardware component
  559. ;;;
  560.     Debug-Output $(SWProductName)": ConfigureAdapter"
  561. ;;;
  562. ;;; Open the hardware device key and parameters key
  563. ;;;
  564.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) +
  565.             hKeyNetCard
  566.     IfStr $(hKeyNetCard) == $(hKeyNull)
  567.         Debug-Output $(SWProductName)": OpenRegKey failed to open: "$(!NTN_RegBase)
  568.         Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  569.         Goto fatalRegistry
  570.     EndIf
  571.     Shell $(UtilityInf) FindService, $(hKeyNetCard)
  572.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  573.         Debug-Output $(SWProductName)": Cannot run FindService"
  574.         Goto ShellCodeError
  575.     EndIf
  576.     IfStr(i) $($R0) != NO_ERROR
  577.         Debug-Output $(SWProductName)": FindService ERROR="$($R0)
  578.         Goto fatalRegistry
  579.     EndIf
  580.     Set hKeyDevice           = $($R1)
  581.     Set hKeyDeviceParameters = $($R2)
  582.     GetRegValue $(hKeyNetCard),"ServiceName", ServiceNameInfo
  583.     Set ServiceName = *($(ServiceNameInfo), 4)
  584.  
  585. ConfigureHardware = +
  586.     Debug-Output $(SWProductName)": ConfigureHardware"
  587. ;;;
  588. ;;; Make sure the device key has been found
  589. ;;;
  590.     IfStr $(ServiceName) == ""
  591.         Debug-Output $(SWProductName)": ServiceName not found"
  592.         Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  593.         Goto fatalRegistry
  594.     EndIf
  595.     IfStr $(hKeyDeviceParameters) == $(hKeyNull)
  596.         Debug-Output $(SWProductName)": Service\Parameters does not exist"
  597.         Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  598.         Goto fatalRegistry
  599.     EndIf
  600. ;;;
  601. ;;; Read the existing parameters from the registry
  602. ;;;
  603.     Debug-Output $(SWProductName)": Reading parameters from registry"
  604.     Set ValueName = ""
  605.     Set ValueData = ""
  606.     Set ValueStr  = ""
  607.     Set ValueList = {}
  608.     EnumRegValue $(hKeyDeviceParameters) ValueList
  609.     ForListDo $(ValueList)
  610.         Set ValueItem = $($)
  611.         Set ValueName = *($(ValueItem),1)
  612.         Set ValueData = *($(ValueItem),4)
  613.  
  614.         IfStr(i) $(ValueName) == "DebugFlags"
  615.             Set DPDebugFlags = $(ValueData)
  616.  
  617.         Else-IfStr(i) $(ValueName) == "PCMCIA"
  618.             Set DPPCMCIA = $(ValueData)
  619.         
  620.         Else-IfStr(i) $(ValueName) == "PortType"
  621.             Set PortType = $(ValueData)
  622.  
  623.         Else-IfStr(i) $(ValueName) == "IoBaseAddress"
  624.             Set IoBaseAddress = $(ValueData)
  625.  
  626.         Else-IfStr(i) $(ValueName) == "InterruptNumber"
  627.             Set InterruptNumber = $(ValueData)
  628.  
  629.         Else-IfStr(i) $(ValueName) == "OwnChannel"
  630.             Set OwnChannel = $(ValueData)
  631.  
  632.         Else-IfStr(i) $(ValueName) == "WLIPCI"
  633.             Set WLIPCI = $(ValueData)
  634.         
  635.         Endif
  636.     EndForListDo
  637.  
  638. writeParameters = +
  639.     Debug-Output $(SWProductName)": writeParameters"
  640.     IfStr(i) $(Option) == "WaveLAN_ISA"
  641.         Set NewValueList = {+
  642.                 {DebugFlags,$(NoTitle),$(!REG_VT_DWORD),$(DPDebugFlags)}, +
  643.                 {PortType,$(NoTitle),$(!REG_VT_DWORD),$(PortType)} +
  644.                 }
  645.     Else-IfStr(i) $(Option) == "WaveLAN_PCMCIA"
  646.         Set NewValueList = {+
  647.                 {DebugFlags,$(NoTitle),$(!REG_VT_DWORD),$(DPDebugFlags)}, +
  648.                 {PCMCIA,$(NoTitle),$(!REG_VT_DWORD),$(DPPCMCIA)}, +
  649.                 {PortType,$(NoTitle),$(!REG_VT_DWORD),$(PortType)} +
  650.                 {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IoBaseAddress)} +
  651.                 {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(InterruptNumber)} +
  652.                 {DLL_Caption,$(NoTitle),$(!REG_VT_SZ),$(DLL_Caption)} +
  653.                 {DLL_Network,$(NoTitle),$(!REG_VT_SZ),$(DLL_Network)} +
  654.                 {VendorDescription,$(NoTitle),$(!REG_VT_SZ),$(VendorDescription)} +
  655.                 {OwnChannel,$(NoTitle),$(!REG_VT_DWORD),$(OwnChannel)} +
  656.                 {WLIPCI,$(NoTitle),$(!REG_VT_DWORD),$(WLIPCI)} +
  657.                 {WinNT,$(NoTitle),$(!REG_VT_DWORD),1} +
  658.                 }
  659.     EndIf
  660.     Shell  $(UtilityInf), AddValueList, $(hKeyDeviceParameters), $(NewValueList)
  661.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  662.         Debug-Output $(SWProductName)": Cannot run AddValueList: hKeyDeviceParameters"
  663.         Goto ShellCodeError
  664.     EndIf
  665.     Set RegistryErrorIndex = $($R0)
  666.     IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  667.         Debug-Output $(SWProductName)": AddValueList: hKeyDeviceParameters ERROR="$(RegistryErrorIndex)
  668.         Goto fatalRegistry
  669.     EndIf
  670.  
  671. configureDialog = +
  672.     Debug-Output $(SWProductName)": WavelanConfigure("$(Option)", "$(ServiceName)")"
  673.  
  674.     LoadLibrary "WLI-PCM-L11 Driver Disk" $(ConfigFileName) hLibrary
  675.  
  676.     IfStr(i) $(!NTN_InstallMode) == "Install"
  677.     LibraryProcedure ConfigResult $(hLibrary) WavelanConfigure +
  678.                         $(Option), $(ServiceName), "Install"
  679.     Else
  680.     LibraryProcedure ConfigResult $(hLibrary) WavelanConfigure +
  681.                         $(Option), $(ServiceName), "Configure"
  682.     EndIf
  683.  
  684. ;    LibraryProcedure ConfigResult $(hLibrary) WavelanConfigure +
  685. ;                        $(Option), $(ServiceName)
  686.     FreeLibrary $(hLibrary)
  687.  
  688.     Debug-Output $(SWProductName)": WavelanConfigure Result="$(ConfigResult)
  689.  
  690.     Set CommonStatus = $(ConfigResult)
  691.     IfStr(i) $(CommonStatus) == "STATUS_USERCANCEL"
  692.         Goto end
  693.     Else-IfStr(i) $(ConfigResult) != "STATUS_SUCCESSFUL"
  694.         GoTo fatal
  695.     EndIf
  696.     Goto end
  697.  
  698. BindingAdapter = +
  699.     Set Error =  $(SWProductName)": Setup does not support binding."
  700.     Debug-Output $(Error)
  701.     Goto fatal
  702.  
  703. RemoveAdapter = +
  704.     Debug-Output $(SWProductName)": RemoveAdapter"
  705.     IfStr(i) $(SWProductKeyName) == $(!NTN_RegBase)
  706. ;;;
  707. ;;;     Remove the software component only after all devices are removed.
  708. ;;;
  709.         Debug-Output $(SWProductName)": Calling RemoveSoftwareComponent"
  710.         Shell $(UtilityInf), RemoveSoftwareComponent, +
  711.                                     $(Manufacturer), +
  712.                                     $(SWProductName)
  713.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  714.             Debug-Output $(SWProductName)": Cannot run RemoveSoftwareComponent"
  715.             Goto ShellCodeError
  716.         EndIf
  717.         Set RegistryErrorIndex = $($R0)
  718.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  719.             Debug-Output $(SWProductName)": RemoveSoftwareComponent ERROR="$($R0)
  720.             Goto fatalRegistry
  721.         EndIf
  722.     Else
  723. ;;;
  724. ;;;     Remove the specified device
  725. ;;;
  726.         Debug-Output $(SWProductName)": Calling RemoveHardwareComponent"
  727.         Shell $(UtilityInf), RemoveHardwareComponent, +
  728.                                     $(Manufacturer), +
  729.                                     $(HWProductName), +
  730.                                     $(!NTN_RegBase)
  731.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  732.             Debug-Output $(SWProductName)": Cannot run RemoveHardwareComponent"
  733.             Goto ShellCodeError
  734.         EndIf
  735.         Set RegistryErrorIndex = $($R0)
  736.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  737.             Debug-Output $(SWProductName)": RemoveHardwareComponent ERROR="$($R0)
  738.             Goto fatalRegistry
  739.         EndIf
  740.     EndIf
  741.     Goto end
  742.  
  743. UpgradeSoftware = +
  744.     Debug-Output $(SWProductName)": UpgradeSoftware"
  745.     IfStr(i) $(SWProductKeyName) == $(!NTN_RegBase)
  746. ;;;
  747. ;;;     For software upgrade, copy new files to the system directory.
  748. ;;;
  749.         Debug-Output $(SWProductName)": Upgrade Software Component"
  750.         OpenRegKey $(!REG_H_LOCAL) "" $(SWProductKeyName) $(MAXIMUM_ALLOWED) +
  751.                 hKeySWProduct
  752.         IfStr $(hKeySWProduct) != $(hKeyNull)
  753.             GetRegValue $(hKeySWProduct),"MajorVersion", VersionInfo
  754.             Set MajorVersion = *($(VersionInfo), 4)
  755.             GetRegValue $(hKeySWProduct),"MinorVersion", VersionInfo
  756.             Set MinorVersion = *($(VersionInfo), 4)
  757.             Set NeedUpgrade = FALSE
  758.             IfInt $(MajorVersion) < $(SWProductVersionMajor)
  759.                 Set NeedUpgrade = TRUE
  760.             Else-IfInt $(MajorVersion) == $(SWProductVersionMajor)
  761.                 IfInt $(MinorVersion) < $(SWProductVersionMinor)
  762.                     Set NeedUpgrade = TRUE
  763.                 Endif
  764.             Endif
  765.             IfStr(i) $(NeedUpgrade) == TRUE
  766.                 Shell $(UtilityInf), GetInfFileNameFromRegistry, $(hKeySWProduct)
  767.                 IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  768.                     Debug-Output $(SWProductName)": Cannot run GetInfFileNameFromRegistry"
  769.                     Goto ShellCodeError
  770.                 EndIf
  771.                 Set !UG_Filename = $($R0)
  772.                 IfStr(i) $(!UG_Filename) != ""
  773.                     Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir), "YES"
  774.                     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  775.                         Set STF_INSTALL_OUTCOME = STATUS_SHELL_FAILED
  776.                     Else-IfStr(i) $($R0) == STATUS_FAILED
  777.                         Set STF_INSTALL_OUTCOME = STATUS_FAILED
  778.                     Else-IfStr(i) $($R0) == STATUS_USERCANCEL
  779.                         Set STF_INSTALL_OUTCOME = STATUS_USERCANCEL
  780.                     Else
  781.                         Set SrcDir = $($R1)
  782.                         Install "Install-Update"
  783.                     Endif
  784.                     IfStr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  785.                         Debug-Output $(SWProductName)": Install ERROR="$(STF_INSTALL_OUTCOME)
  786.                         Goto fatal
  787.                     EndIf
  788.                 Else
  789.                     Debug-Output $(SWProductName)": InfFileName is NULL"
  790.                 EndIf
  791.                 SetRegValue $(hKeySWProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(SWProductVersionMajor)}
  792.                 SetRegValue $(hKeySWProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(SWProductVersionMinor)}
  793.             EndIf
  794.         Else
  795.             Debug-Output $(SWProductName)": Cannot upgrade -- software was never installed"
  796.             Goto fatalRegistry
  797.         EndIf
  798.     Else
  799. ;;;
  800. ;;;     For harware upgrade, just make sure the registry is still in tact.
  801. ;;;
  802.         Debug-Output $(SWProductName)": Upgrade Hardware Component"
  803.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) +
  804.                     hKeyNetCard
  805.         IfStr(i) $(hKeyNetCard) != $(hKeyNull)
  806.             GetRegValue $(hKeyNetCard),"ServiceName", ServiceNameInfo
  807.             Set ServiceName = *($(ServiceNameInfo), 4)
  808.             OpenRegKey $(hKeyNetCard) "" "NetRules" $(MAXIMUM_ALLOWED) +
  809.                         hKeyNetCardRules
  810.             IfStr(i) $(hKeyNetCardRules) == $(hKeyNull)
  811.                 Debug-Output $(SWProductName)": NetKeyRule ERROR="$(hKeyNetCardRules)
  812.                 Goto fatalRegistry
  813.             EndIf
  814.         Else
  815.             Debug-Output $(SWProductName)": OpenRegKey hKeyNetCard ERROR"
  816.             Goto fatalRegistry
  817.         EndIf
  818.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName) +
  819.                 $(MAXIMUM_ALLOWED) hKeyService
  820.         IfStr(i) $(hKeyService) == $(hKeyNull)
  821.             Debug-Output $(SWProductName)": OpenRegKey hKeyService ERROR"
  822.             Goto fatalRegistry
  823.         EndIf
  824.     EndIf
  825.     Goto end
  826.  
  827. abandon = +
  828.     ForListDo $(OEM_ABANDON_OPTIONS)
  829.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  830.             $(SWProductName), $($)
  831.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  832.             Debug-Output $(SWProductName)": Cannot run RemoveHardwareComponent"
  833.             Goto ShellCodeError
  834.         EndIf
  835.         Set RegistryErrorIndex = $($R0)
  836.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  837.             Debug-Output $(SWProductName)": RemoveHardwareComponent ERROR="$(RegistryErrorIndex)
  838.             Goto fatalRegistry
  839.         EndIf
  840.     EndForListDo
  841.     IfStr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  842.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  843.             $(SWProductName), FALSE
  844.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  845.             Debug-Output $(SWProductName)": Cannot run RemoveSoftwareComponent"
  846.             Goto ShellCodeError
  847.         EndIf
  848.         Set RegistryErrorIndex = $($R0)
  849.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  850.             Debug-Output $(SWProductName)": RemoveSoftwareComponent ERROR="$(RegistryErrorIndex)
  851.             Goto fatalRegistry
  852.         EndIf
  853.     EndIf
  854.     Goto end
  855.  
  856. warning = +
  857.     EndWait
  858.     Shell $(SubRoutineInf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  859.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  860.         Debug-Output $(SWProductName)": Cannot run SetupMessage"
  861.         Goto ShellCodeError
  862.     EndIf
  863.     IfStr(i) $($R1) == "OK"
  864.         Debug-Output $(SWProductName)": WARNING goto "$(GoToLabel)
  865.         Goto $(GoToLabel)
  866.     Else-IfStr(i) $($R1) == "CANCEL"
  867.         Debug-Output $(SWProductName)": WARNING goto "$(ComeFromLabel)
  868.         Goto $(ComeFromLabel)
  869.     Else
  870.         Debug-Output $(SWProductName)": WARNING goto end"
  871.         Goto end
  872.     EndIf
  873.  
  874. nonFatalInfo = +
  875.     Set CommonStatus = STATUS_USERCANCEL
  876.     Set Severity = STATUS
  877.     Goto nonFatalMsg
  878.  
  879. nonFatal = +
  880.     Set Severity = nonFatal
  881.     Goto nonFatalMsg
  882.  
  883. nonFatalMsg = +
  884.     EndWait
  885.     IfStr(i) $(Error) == ""
  886.         Set Severity = nonFatal
  887.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  888.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  889.             Debug-Output $(SWProductName)": Cannot run RegistryErrorString"
  890.             Goto ShellCodeError
  891.         EndIf
  892.         Set Error = $($R0)
  893.     EndIf
  894.     Shell $(SubRoutineInf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  895.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  896.         Debug-Output $(SWProductName)": Cannot run SetupMessage"
  897.         Goto ShellCodeError
  898.     EndIf
  899.     IfStr(i) $($R1) == "OK"
  900.         Debug-Output $(SWProductName)": NONFATAL goto "$(ComeFromLabel)
  901.         Goto $(ComeFromLabel)
  902.     Else
  903.         Debug-Output $(SWProductName)": NONFATAL goto end"
  904.         Goto end
  905.     EndIf
  906.  
  907. fatalRegistry = +
  908.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  909.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  910.         Debug-Output $(SWProductName)": Cannot run RegistryErrorString"
  911.         Goto ShellCodeError
  912.     EndIf
  913.     Set Error = $($R0)
  914.     Goto fatal
  915.  
  916. fatal = +
  917.     IfStr(i) $(Error) == ""
  918.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  919.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  920.             Debug-Output $(SWProductName)": Cannot run RegistryErrorString"
  921.             Goto ShellCodeError
  922.         EndIf
  923.         Set Error = $($R0)
  924.     EndIf
  925.     Shell $(SubRoutineInf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  926.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  927.         Debug-Output $(SWProductName)": Cannot run SetupMessage"
  928.         Goto ShellCodeError
  929.     EndIf
  930.     Goto SetFailed
  931.  
  932. ShellCodeError = +
  933.     Set DlgType      = "MessageBox"
  934.     Set STF_MB_TITLE = "Error: "$(FunctionTitle)
  935.     Set STF_MB_TEXT  = "Shell Code Error"
  936.     Set STF_MB_TYPE  = 1
  937.     Set STF_MB_ICON  = 3
  938.     Set STF_MB_DEF   = 1
  939.     UI Start "Error Message"
  940.     Goto SetFailed
  941.  
  942. SetFailed = +
  943.     Set CommonStatus = STATUS_FAILED
  944.     IfStr(i) $(OEM_ABANDON_HARDWARE) == TRUE
  945.         Set OEM_ABANDON_HARDWARE = FALSE
  946.         Goto abandon
  947.     EndIf
  948.     Goto end
  949.  
  950. end = +
  951. ;;;
  952. ;;; All done, close all open handles and return to setup program
  953. ;;;
  954.     IfStr $(hKeySWProduct) != $(hKeyNull)
  955.         CloseRegKey $(hKeySWProduct)
  956.     EndIf
  957.     IfStr $(hKeyDevice) != $(hKeyNull)
  958.         CloseRegKey $(hKeyDevice)
  959.     EndIf
  960.     IfStr $(hKeyDeviceParameters) != $(hKeyNull)
  961.         CloseRegKey $(hKeyDeviceParameters)
  962.     EndIf
  963.     IfStr $(hKeyNetCard) != $(hKeyNull)
  964.         CloseRegKey $(hKeyNetCard)
  965.     EndIf
  966.     IfStr $(hKeyNetCardRules) != $(hKeyNull)
  967.         CloseRegKey $(hKeyNetCardRules)
  968.     EndIf
  969.     IfStr $(hKeySWProduct) != $(hKeyNull)
  970.         CloseRegKey $(hKeySWProduct)
  971.     EndIf
  972.     IfStr $(hKeySWNetRules) != $(hKeyNull)
  973.         CloseRegKey $(hKeySWNetRules)
  974.     EndIf
  975.     IfStr $(hKeySWService) != $(hKeyNull)
  976.         CloseRegKey $(hKeySWService)
  977.     EndIf
  978.     IfStr $(hKeySWParameter) != $(hKeyNull)
  979.         CloseRegKey $(hKeySWParameter)
  980.     EndIf
  981.     IfStr $(hKeySWLinkage) != $(hKeyNull)
  982.         CloseRegKey $(hKeySWLinkage)
  983.     EndIf
  984.     IfStr $(hKeyPcmciaDatabase) != $(hKeyNull)
  985.         CloseRegKey $(hKeyPcmciaDatabase)
  986.     EndIf
  987.     IfStr $(hKeyPcmciaManufacturer) != $(hKeyNull)
  988.         CloseRegKey $(hKeyPcmciaManufacturer)
  989.     EndIf
  990.     IfStr $(hKeyPcmciaProduct) != $(hKeyNull)
  991.         CloseRegKey $(hKeyPcmciaProduct)
  992.     EndIf
  993.     IfStr $(hKeyService) != $(hKeyNull)
  994.         CloseRegKey $(hKeyService)
  995.     EndIf
  996.     Set !DebugOutputControl = $(SaveDebugOutputControl)
  997.     EndWait
  998.     Return $(CommonStatus)
  999.  
  1000. [Install-Software]
  1001. ;   If this is an initial network install, DoCopy will be set to NO.
  1002. ;   So we must ignore this directive and copy our DLL to the system
  1003. ;   disk so we can run our configuration DLL.
  1004.     Debug-Output $(SWProductName)": Install-Software"
  1005.     Set STF_VITAL       = ""
  1006.     Set STF_OVERWRITE   = "VERIFYSOURCEOLDER"
  1007.     AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1008.     AddSectionFilesToCopyList Files-Driver $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1009.     Set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1010.     CopyFilesInCopyList
  1011.     Exit
  1012.  
  1013. [Install-Update]
  1014.     Debug-Output $(SWProductName)": Install-Update"
  1015.     Set STF_VITAL       = ""
  1016.     Set STF_OVERWRITE   = "VERIFYSOURCEOLDER"
  1017.     AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1018.     AddSectionFilesToCopyList Files-Driver $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1019.     AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1020.     Set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1021.     CopyFilesInCopyList
  1022.     Exit
  1023.  
  1024. [Date]
  1025.     Now                     = {} ? $(!LIBHANDLE) GetSystemDate
  1026.  
  1027. [Source Media Descriptions]
  1028.     1 = "WLI-PCM-L11 Driver Disk"
  1029.  
  1030. [Files-Inf]
  1031.     1, OEMSETUP.INF, SIZE=99999, RENAME=$(!UG_Filename)
  1032.  
  1033. [Files-Dll]
  1034.     1, $(ConfigFileName), SIZE=199999 OVERWRITE=ALWAYS
  1035. ;    1, $(HelpFileName), SIZE=99999 OVERWRITE=ALWAYS
  1036.     1, CSH.DLL, SIZE=99999
  1037.  
  1038. [Files-Driver]
  1039.     1, $(DriverFileName), SIZE=99999 OVERWRITE=ALWAYS
  1040.  
  1041. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1042. ;
  1043. ; Define the environment supported by this installer
  1044. ;
  1045. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1046. [ProductType]
  1047.     STF_PRODUCT             = winNT
  1048.     STF_PLATFORM            = i386
  1049.  
  1050. [LanguagesSupported]
  1051.     ENG
  1052.  
  1053. [PlatformsSupported]
  1054.     ISA
  1055.     EISA
  1056.     PCI
  1057.     PCMCIA
  1058.     "Jazz-Internal Bus"
  1059.  
  1060. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1061. ;
  1062. ; Define commonly used constants, values, and strings
  1063. ;
  1064. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1065. [GeneralConstants]
  1066.     MAXIMUM_ALLOWED         = 33554432
  1067.     NoTitle                 = 0
  1068.     ExitCodeOk              = 0
  1069.     ExitCodeCancel          = 1
  1070.     ExitCodeFatal           = 2
  1071.     RegistryErrorIndex      = NO_ERROR
  1072.     DriverPath              = $(!STF_NTPATH)\drivers
  1073.     hKeyNull                = ""
  1074.     hKeySWProduct           = $(hKeyNull)
  1075.     hKeyDevice              = $(hKeyNull)
  1076.     hKeyDeviceParameters    = $(hKeyNull)
  1077.     hKeyNetCard             = $(hKeyNull)
  1078.     hKeyNetCardRules        = $(hKeyNull)
  1079.     hKeySWProduct           = $(hKeyNull)
  1080.     hKeySWNetRules          = $(hKeyNull)
  1081.     hKeySWService           = $(hKeyNull)
  1082.     hKeySWParameter         = $(hKeyNull)
  1083.     hKeySWLinkage           = $(hKeyNull)
  1084.     hKeyPcmciaDatabase      = $(hKeyNull)
  1085.     hKeyPcmciaManufacturer  = $(hKeyNull)
  1086.     hKeyPcmciaProduct       = $(hKeyNull)
  1087.     hKeyService             = $(hKeyNull)
  1088.     ServiceName             = ""
  1089.     NetCardNumber           = -1
  1090.     OEM_ABANDON_OPTIONS     = {}
  1091.     OEM_ABANDON_SOFTWARE    = FALSE
  1092.     OEM_ABANDON_HARDWARE    = FALSE
  1093.  
  1094. [FileConstants]
  1095.     UtilityInf              = "UTILITY.INF"
  1096.     SubRoutineInf           = "SUBROUTN.INF"
  1097.     ParamInf                = "NCPARAM.INF"
  1098.     NetEventDLL             = "%SystemRoot%\System32\netevent.dll"
  1099.     IoLogMsgDLL             = "%SystemRoot%\System32\IoLogMsg.dll"
  1100.  
  1101. [FileConstants-ENG]
  1102.     ProCaption              = "Windows NT Setup"
  1103.     ProCancel               = "Cancel"
  1104.     ProCancelMsg            = "Windows NT Networking is not correctly installed.  " +
  1105.                               "Are you sure you want to cancel copying files?"
  1106.     ProCancelCap            = "Network Setup Message"
  1107.     ProText1                = "Copying:"
  1108.     ProText2                = "To:"
  1109.  
  1110. [DialogConstants-ENG]
  1111.     Help                    = "&Help"
  1112.     Exit                    = "Cancel"
  1113.     OK                      = "OK"
  1114.     HelpContext             = ""
  1115.     Continue                = "Continue"
  1116.     Cancel                  = "Cancel"
  1117.