home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 January / CHIPCD1_98.iso / drivers / skaner / hp / sj6100c / disk3 / oemsetup.inf < prev   
INI File  |  1997-06-17  |  20KB  |  603 lines

  1. ;#########################################################################
  2. ;  
  3. ;  Copyright 1995 Symbios Logic Inc.  All rights reserved.
  4. ;
  5. ;  This file is confidential and a trade secret of Symbios Logic.  The
  6. ;  receipt of or possession of this file does not convey any rights to
  7. ;  reproduce or disclose its contents or to manufacture, use, or sell
  8. ;  anything it may describe, in whole, or in part, without the specific
  9. ;  written consent of Symbios Logic Inc.
  10. ;
  11. ;########################################################################
  12.  
  13. ;#########################################################################
  14. ;
  15. ; #BeginDescription
  16. ;        This is the OEMSETUP.INF file for the HP400A miniport
  17. ; #EndDescription
  18. ;
  19. ;  Version History
  20. ;  ---------------
  21. ;
  22. ;      Date     Who     Description
  23. ;    ________   ___     _________________________________________________
  24. ; #BeginRevision
  25. ;    08/02/95   NHP     Changed 17 to 0xffffffff [MiniportDrivers] section
  26. ;                       so that the 400A would load after anyother scsi
  27. ;                       miniports that might be controlling boot devices.
  28. ; #EndRevision
  29. ;    06/30/95   NHP     Initial version.
  30. ;
  31. ;########################################################################
  32.  
  33.  
  34. ;-----------------------------------------------------------------------
  35. ; OPTION TYPE
  36. ; -----------
  37. ; This identifies the Option type we are dealing with.  The different
  38. ; possible types are:
  39. ;
  40. ; COMPUTER, VIDEO, POINTER, KEYBOARD, LAYOUT, SCSI, TAPE, PRINTER, ...
  41. ;-----------------------------------------------------------------------
  42.  
  43. [Identification]
  44.     OptionType = SCSI
  45.  
  46. ;-----------------------------------------------------------------------
  47. ; LANGUAGES SUPPORTED
  48. ; -------------------
  49. ;
  50. ; The languages supported by the INF, For every language supported
  51. ; we need to have a separate text section for every displayable text
  52. ; section.
  53. ;
  54. ;-----------------------------------------------------------------------
  55.  
  56. [LanguagesSupported]
  57.     ENG
  58.  
  59.  
  60. ;-----------------------------------------------------------------------
  61. ; OPTION LIST
  62. ; -----------
  63. ; This section lists the Option key names.  These keys are locale
  64. ; independent and used to represent the option in a locale independent
  65. ; manner.
  66. ;
  67. ;-----------------------------------------------------------------------
  68.  
  69. [Options]
  70.     "HP400A"    = HP400A
  71.  
  72. ;-----------------------------------------------------------------------
  73. ; OPTION TEXT SECTION
  74. ; -------------------
  75. ; These are text strings used to identify the option to the user.  There
  76. ; are separate sections for each language supported.  The format of the
  77. ; section name is "OptionsText" concatenated with the Language represented
  78. ; by the section.
  79. ;
  80. ;-----------------------------------------------------------------------
  81.  
  82. [OptionsTextENG]
  83.     "HP400A"    = "Symbios Logic 400a (HP Version) SCSI Host Adapter"
  84.  
  85.  
  86. ;-----------------------------------------------------------------------------------------
  87. ; SCSI MINIPORT DRIVERS:
  88. ;
  89. ; Order of the information:
  90. ;
  91. ; Class driver = Type, Group, ErrorControl, Tag, EventMessageFile, TypesSupported
  92. ;
  93. ;-----------------------------------------------------------------------------------------
  94.  
  95. [MiniportDrivers]
  96.     HP400A  = !SERVICE_KERNEL_DRIVER, "SCSI Miniport", !SERVICE_ERROR_NORMAL,  0xffffffff, %SystemRoot%\System32\IoLogMsg.dll , 7
  97.  
  98. ;---------------------------------------------------------------------------
  99. ; 1. Identify
  100. ;
  101. ; DESCRIPTION:   To verify that this INF deals with the same type of options
  102. ;                as we are choosing currently.
  103. ;
  104. ; INPUT:         None
  105. ;
  106. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL
  107. ;                $($R1): Option Type (COMPUTER ...)
  108. ;                $($R2): Diskette description
  109. ;---------------------------------------------------------------------------
  110.  
  111. [Identify]
  112.     ;
  113.     ;
  114.     read-syms Identification
  115.  
  116.     set Status     = STATUS_SUCCESSFUL
  117.     set Identifier = $(OptionType)
  118.     set Media      = #("Source Media Descriptions", 1, 1)
  119.  
  120.     Return $(Status) $(Identifier) $(Media)
  121.  
  122.  
  123.  
  124. ;------------------------------------------------------------------------
  125. ; 2. ReturnOptions:
  126. ;
  127. ; DESCRIPTION:   To return the option list supported by this INF and the
  128. ;                localised text list representing the options.
  129. ;
  130. ;
  131. ; INPUT:         $($0):  Language used. ( ENG | FRN | ... )
  132. ;
  133. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  134. ;                                STATUS_NOLANGUAGE
  135. ;                                STATUS_FAILED
  136. ;
  137. ;                $($R1): Option List
  138. ;                $($R2): Option Text List
  139. ;------------------------------------------------------------------------
  140.  
  141. [ReturnOptions]
  142.     ;
  143.     ;
  144.     set Status        = STATUS_FAILED
  145.     set OptionList     = {}
  146.     set OptionTextList = {}
  147.  
  148.     ;
  149.     ; Check if the language requested is supported
  150.     ;
  151.     set LanguageList = ^(LanguagesSupported, 1)
  152.     Ifcontains(i) $($0) in $(LanguageList)
  153.         goto returnoptions
  154.     else
  155.         set Status = STATUS_NOLANGUAGE
  156.         goto finish_ReturnOptions
  157.     endif
  158.  
  159.     ;
  160.     ; form a list of all the options and another of the text representing
  161.     ;
  162.  
  163. returnoptions = +
  164.     set OptionList     = ^(Options, 0)
  165.     set OptionTextList = ^(OptionsText$($0), 1)
  166.     set Status         = STATUS_SUCCESSFUL
  167.  
  168. finish_ReturnOptions = +
  169.     Return $(Status) $(OptionList) $(OptionTextList)
  170.  
  171.  
  172. ;
  173. ; 3. InstallOption:
  174. ;
  175. ; FUNCTION:  To copy files representing Options
  176. ;            To configure the installed option
  177. ;            To update the registry for the installed option
  178. ;
  179. ; INPUT:     $($0):  Language to use
  180. ;            $($1):  OptionID to install
  181. ;            $($2):  SourceDirectory
  182. ;            $($3):  AddCopy  (YES | NO)
  183. ;            $($4):  DoCopy   (YES | NO)
  184. ;            $($5):  DoConfig (YES | NO)
  185. ;
  186. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  187. ;                            STATUS_NOLANGUAGE |
  188. ;                            STATUS_USERCANCEL |
  189. ;                            STATUS_FAILED
  190. ;
  191.  
  192. [InstallOption]
  193.  
  194.     ;
  195.     ; Set default values for
  196.     ;
  197.     set Status = STATUS_FAILED
  198.     set DrivesToFree = {}
  199.  
  200.     ;
  201.     ; extract parameters
  202.     ;
  203.     set Option   = $($1)
  204.     set SrcDir   = $($2)
  205.     set AddCopy  = $($3)
  206.     set DoCopy   = $($4)
  207.     set DoConfig = $($5)
  208.  
  209.     ;
  210.     ; Check if the language requested is supported
  211.     ;
  212.     set LanguageList = ^(LanguagesSupported, 1)
  213.     Ifcontains(i) $($0) in $(LanguageList)
  214.     else
  215.         set Status = STATUS_NOLANGUAGE
  216.         goto finish_InstallOption
  217.     endif
  218.     read-syms Strings$($0)
  219.  
  220.     ;
  221.     ; check to see if Option is supported.
  222.     ;
  223.  
  224.     set OptionList = ^(Options, 0)
  225.     ifcontains $(Option) in $(OptionList)
  226.     else
  227.         Debug-Output "SCSI.INF: SCSI option is not supported."
  228.         goto finish_InstallOption
  229.     endif
  230.     set OptionList = ""
  231.  
  232.     ;
  233.     ; Option has been defined already
  234.     ;
  235.  
  236.     set MiniportDriver   =   #(Options,         $(Option),         1)
  237.     set Type             = $(#(MiniportDrivers, $(MiniportDriver), 1))
  238.     set Group            =   #(MiniportDrivers, $(MiniportDriver), 2)
  239.     set ErrorControl     = $(#(MiniportDrivers, $(MiniportDriver), 3))
  240.     set Tag              =   #(MiniportDrivers, $(MiniportDriver), 4)
  241.     set EventMessageFile =   #(MiniportDrivers, $(MiniportDriver), 5)
  242.     set TypesSupported   =   #(MiniportDrivers, $(MiniportDriver), 6)
  243.  
  244.     set Start            =   $(!SERVICE_BOOT_START)
  245.  
  246. installtheoption = +
  247.  
  248.     ;
  249.     ; Code to add files to copy list
  250.     ;
  251.  
  252.     ifstr(i) $(AddCopy) == "YES"
  253.         set DoActualCopy = NO
  254.         set FileToCheck = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  255.         LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
  256.         ifstr(i) $(STATUS) == NO
  257.             set DoActualCopy = YES
  258.         endif
  259.  
  260.         ifstr(i) $(DoActualCopy) == NO
  261.             shell "subroutn.inf" DriversExist $($0) $(String1)
  262.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  263.                 Debug-Output "SCSI.INF: shelling DriversExist failed"
  264.                 goto finish_InstallOption
  265.             endif
  266.  
  267.             ifstr(i) $($R0) == STATUS_CURRENT
  268.             else-ifstr(i) $($R0) == STATUS_NEW
  269.                 set DoActualCopy = YES
  270.             else-ifstr(i) $($R0) == STATUS_USERCANCEL
  271.                 Debug-Output "SCSI.INF: User cancelled SCSI installation"
  272.                 goto finish_InstallOption
  273.             else
  274.                 Debug-Output "SCSI.INF: Error reported in DriversExist routine in SUBROUTN.INF"
  275.                 goto finish_InstallOption
  276.             endif
  277.         endif
  278.  
  279.         ifstr(i) $(DoActualCopy) == YES
  280.  
  281.             shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2)
  282.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  283.                 Debug-Output "SCSI.INF: shelling DoAskSourceEx failed"
  284.                 goto finish_InstallOption
  285.             endif
  286.  
  287.             ifstr(i) $($R0) == STATUS_SUCCESSFUL
  288.                 set SrcDir = $($R1)
  289.                 ifstr(i) $($R2) != ""
  290.                     set DrivesToFree = >($(DrivesToFree), $($R2))
  291.                 endif
  292.             else
  293.                 Debug-Output "SCSI.INF: User cancelled asking source."
  294.                 goto finish_InstallOption
  295.             endif
  296.  
  297.             install Install-AddCopyOption
  298.             ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
  299.                 Debug-Output "Adding SCSI files to copy list failed"
  300.                 goto finish_InstallOption
  301.             endif
  302.         else
  303.             set DoCopy = NO
  304.         endif
  305.  
  306.     endif
  307.  
  308.     ifstr(i) $(DoCopy) == "YES"
  309.         read-syms ProgressCopy$($0)
  310.         install Install-DoCopyOption
  311.         ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
  312.             Debug-Output "Copying files failed"
  313.             goto finish_InstallOption
  314.         else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
  315.             set Status = STATUS_USERCANCEL
  316.             goto finish_InstallOption
  317.         endif
  318.     endif
  319.  
  320.     ifstr(i) $(DoConfig) == "YES"
  321.         ;
  322.         ; first run a privilege check on modifying the setup node
  323.         ;
  324.  
  325.         shell "registry.inf" CheckSetupModify
  326.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  327.             goto finish_InstallOption
  328.         endif
  329.  
  330.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  331.             goto finish_InstallOption
  332.         endif
  333.  
  334.         ;
  335.         ; then make a new SCSI entry, the entry is created automatically
  336.         ; enabled
  337.         ;
  338.  
  339.         set ServiceNode   = $(MiniportDriver)
  340.         set ServiceBinary = System32\drivers\#(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  341.  
  342.         set ServicesValues   = { +
  343.                 {Type,           0, $(!REG_VT_DWORD),     $(Type)                  }, +
  344.                 {Start,          0, $(!REG_VT_DWORD),     $(Start)                 }, +
  345.                 {Group,          0, $(!REG_VT_SZ),        $(Group)                 }, +
  346.                 {ErrorControl,   0, $(!REG_VT_DWORD),     $(ErrorControl)          }, +
  347.                 {Tag,            0, $(!REG_VT_DWORD),     $(Tag)                   }, +
  348.                 {BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary)         }  +
  349.                 }
  350.         set ParametersValues = ""
  351.         set DeviceValues     = {}
  352.         set EventLogValues   = { +
  353.                 {EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, +
  354.                 {TypesSupported,   0, $(!REG_VT_DWORD),     $(TypesSupported)   }  +
  355.                 }
  356.  
  357.         shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
  358.                                                 $(ServicesValues)   +
  359.                                                 $(ParametersValues) +
  360.                                                 $(DeviceValues)     +
  361.                                                 $(EventLogValues)   +
  362.                                                 Parameters
  363.  
  364.  
  365.  
  366.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  367.             Debug-Output "Couldn't execute MakeServicesEntry in registry.inf"
  368.             goto finish_InstallOption
  369.         endif
  370.  
  371.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  372.             Debug-Output "MakeServicesEntry failed for SCSI"
  373.             goto finish_InstallOption
  374.         endif
  375.  
  376.     endif
  377.  
  378.     set Status = STATUS_SUCCESSFUL
  379. finish_InstallOption = +
  380.     ForListDo $(DrivesToFree)
  381.         LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
  382.     EndForListDo
  383.  
  384.     Return $(Status)
  385.  
  386.  
  387. [Install-AddCopyOption]
  388.  
  389.     ;
  390.     ; Add the files to the copy list
  391.     ;
  392.     AddSectionKeyFileToCopyList   Files-ScsiMiniportDrivers         +
  393.                                   $(MiniportDriver)                 +
  394.                                   $(SrcDir)                      +
  395.                                   $(!STF_WINDOWSSYSPATH)\drivers
  396.  
  397.     exit
  398.  
  399.  
  400. [Install-DoCopyOption]
  401.  
  402.     ;
  403.     ; Copy files in the copy list
  404.     ;
  405.     CopyFilesInCopyList
  406.     exit
  407.  
  408. ;-------------------------------------------------------------------------
  409. ; 4. DeInstallOption:
  410. ;
  411. ; FUNCTION:  To remove files representing Option
  412. ;            To remove the registry entry corresponding to the Option
  413. ;
  414. ; INPUT:     $($0):  Language to use
  415. ;            $($1):  OptionID to install
  416. ;
  417. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  418. ;                            STATUS_NOLANGUAGE |
  419. ;                            STATUS_USERCANCEL |
  420. ;                            STATUS_FAILED
  421. ;-------------------------------------------------------------------------
  422. [DeInstallOption]
  423.     ;
  424.     ; Set default values for
  425.     ;
  426.     set Status   = STATUS_FAILED
  427.     ;
  428.     ; extract parameters
  429.     ;
  430.     set Option   = $($1)
  431.  
  432.     ;
  433.     ; Check if the language requested is supported
  434.     ;
  435.     set LanguageList = ^(LanguagesSupported, 1)
  436.     Ifcontains(i) $($0) in $(LanguageList)
  437.     else
  438.         set Status = STATUS_NOLANGUAGE
  439.         goto finish_DeInstallOption
  440.     endif
  441.     read-syms Strings$($0)
  442.  
  443.     ;
  444.     ; check to see if Option is supported.
  445.     ;
  446.  
  447.     set OptionList = ^(Options, 0)
  448.     ifcontains $(Option) in $(OptionList)
  449.     else
  450.         goto finish_DeInstallOption
  451.     endif
  452.     set OptionList = ""
  453.  
  454.     ;
  455.     ; fetch details about option
  456.     ;
  457.  
  458.     set MiniportDriver = #(Options, $(Option), 1)
  459.     set MiniportFile   = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  460.     set FilePath       = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
  461.  
  462.     ;
  463.     ; check to see if file is installed
  464.     ; if not give success
  465.     ;
  466.  
  467.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
  468.     ifstr(i) $(STATUS) == "NO"
  469.         set Status = STATUS_SUCCESSFUL
  470.         goto finish_DeInstallOption
  471.     endif
  472.  
  473.     shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  474.     ifstr(i) $($R0) != "STATUS_SUCCESSFUL"
  475.         ; this could happen if there is no start value or there is no
  476.         ; key, in which case the option is not installed
  477.         set Status = STATUS_SUCCESSFUL
  478.         goto finish_DeInstallOption
  479.     endif
  480.  
  481.     ifstr(i) $($R1) == $(!SERVICE_BOOT_START)
  482.         shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "WARNING" $(String3)
  483.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  484.             goto do_removal
  485.         endif
  486.         ifstr(i) $($R1) == "CANCEL"
  487.             goto finish_DeInstallOption
  488.         endif
  489.     endif
  490.  
  491. do_removal =+
  492.     ;
  493.     ; disable the registry entry
  494.     ;
  495.  
  496.     shell "registry.inf" RemoveServicesEntry $(MiniportDriver)
  497.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  498.         Debug-Output "SCSI.INF: Failed to shell RemoveServicesEntry"
  499.         goto finish_DeInstallOption
  500.     endif
  501.  
  502.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  503.         Debug-Output "SCSI.INF: Failed to disable services entry"
  504.         goto finish_DeInstallOption
  505.     endif
  506.  
  507.     ;
  508.     ; we won't remove the file because we can only do so during the next boot.
  509.     ; if the user chooses to reinstall the same driver during this boot
  510.     ; he will still end up deleting the driver on next boot. if the file
  511.     ; should be deleted a warning should be put up saying that the user should
  512.     ; not try to reinstall the driver during this boot
  513.     ;
  514.     ;    AddFileToDeleteList $(FilePath)
  515.  
  516.     set Status = STATUS_SUCCESSFUL
  517.  
  518. finish_DeInstallOption =+
  519.     return $(Status)
  520.  
  521.  
  522. ;-------------------------------------------------------------------------
  523. ; 5. GetInstalledOptions:
  524. ;
  525. ; FUNCTION:  To find out the list of options which are installed
  526. ;
  527. ; INPUT:     $($0): Language to Use
  528. ;
  529. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  530. ;                            STATUS_FAILED
  531. ;
  532. ;            $($R1): List of options installed
  533. ;            $($R2): Option installed Text List
  534. ;-------------------------------------------------------------------------
  535. [GetInstalledOptions]
  536.     set Status = STATUS_FAILED
  537.     set InstalledOptions = {}
  538.     set InstalledOptionsText = {}
  539.  
  540.     ;
  541.     ; Check if the language requested is supported
  542.     ;
  543.     set LanguageList = ^(LanguagesSupported, 1)
  544.     Ifcontains(i) $($0) in $(LanguageList)
  545.     else
  546.         set Status = STATUS_NOLANGUAGE
  547.         goto finish_GetInstalledOptions
  548.     endif
  549.  
  550.     set OptionList = ^(Options, 0)
  551.     ForListDo $(OptionList)
  552.         set MiniportDriver = #(Options, $($), 1)
  553.         set MiniportFile   = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  554.         set FilePath       = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
  555.         LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
  556.         ifstr(i) $(STATUS) == "YES"
  557.             shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  558.             ifint $($ShellCode) == $(!SHELL_CODE_OK)
  559.                 ifstr(i) $($R0) == STATUS_SUCCESSFUL
  560.                     ifstr(i) $($R1) != $(!SERVICE_DISABLED)
  561.  
  562.                         set OptionText = #(OptionsText$($0), $($), 1)
  563.                         set InstalledOptions     = >($(InstalledOptions), $($))
  564.                         set InstalledOptionsText = >($(InstalledOptionsText), $(OptionText))
  565.  
  566.                     endif
  567.                 endif
  568.             endif
  569.         endif
  570.     EndForListDo
  571.     set Status = STATUS_SUCCESSFUL
  572. finish_GetInstalledOptions =+
  573.     Return $(Status) $(InstalledOptions) $(InstalledOptionsText)
  574.  
  575.  
  576. ;**************************************************************************
  577. ; PROGRESS GUAGE VARIABLES
  578. ;**************************************************************************
  579.  
  580. [ProgressCopyENG]
  581.     ProCaption   = "Windows NT Setup"
  582.     ProCancel    = "Cancel"
  583.     ProCancelMsg = "Windows NT is not correcly installed.  Are you sure you want "+
  584.                    "to cancel copying files?"
  585.     ProCancelCap = "Setup Message"
  586.     ProText1     = "Copying:"
  587.     ProText2     = "To:"
  588.  
  589. [StringsENG]
  590.     String1 = "Symbios Logic 400a (HP Version) SCSI Host Adapter"
  591.     String2 = "Please enter the full path to the OEM SCSI "+
  592.               "Adapter files.  Then choose Continue."
  593.     String3 = "The SCSI Adapter has been marked as a boot device.  Removing "+
  594.               "it may cause the system not to boot."$(!LF)$(!LF)"Are you sure "+
  595.               "you want to remove the Adapter."
  596.  
  597. [Source Media Descriptions]
  598.     1  = "HP Scanning Software Disk 1"  , TAGFILE = hp400a.tag
  599.  
  600. [Files-ScsiMiniportDrivers]
  601. HP400A = 1,HP400A.sys , SIZE=999
  602.  
  603.