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