home *** CD-ROM | disk | FTP | other *** search
/ Chip 1999 August / Chip_1999-08_cd.bin / ovladace / drivers / busmaster2133.exe / WINNT / VIAIDE.INF < prev   
INI File  |  1999-01-18  |  25KB  |  719 lines

  1. ;-----------------------------------------------------------------------
  2. ; OPTION TYPE
  3. ; -----------
  4. ; This identifies the Option type we are dealing with.  The different
  5. ; possible types are:
  6. ;
  7. ; COMPUTER, VIDEO, POINTER, KEYBOARD, LAYOUT, SCSI, TAPE, PRINTER, ...
  8. ;-----------------------------------------------------------------------
  9.  
  10. [Identification]
  11.     OptionType = SCSI
  12.  
  13. ;-----------------------------------------------------------------------
  14. ; LANGUAGES SUPPORTED
  15. ; -------------------
  16. ;
  17. ; The languages supported by the INF, For every language supported
  18. ; we need to have a separate text section for every displayable text
  19. ; section.
  20. ;
  21. ;-----------------------------------------------------------------------
  22.  
  23. [LanguagesSupported]
  24.     ENG
  25.  
  26.  
  27. ;-----------------------------------------------------------------------
  28. ; OPTION LIST
  29. ; -----------
  30. ; This section lists the Option key names.  These keys are locale
  31. ; independent and used to represent the option in a locale independent
  32. ; manner.
  33. ;
  34. ;-----------------------------------------------------------------------
  35.  
  36. [Options]
  37.     "VIADSK"    = viadsk
  38.  
  39. ;-----------------------------------------------------------------------
  40. ; OPTION TEXT SECTION
  41. ; -------------------
  42. ; These are text strings used to identify the option to the user.  There
  43. ; are separate sections for each language supported.  The format of the
  44. ; section name is "OptionsText" concatenated with the Language represented
  45. ; by the section.
  46. ;
  47. ;-----------------------------------------------------------------------
  48.  
  49. [OptionsTextENG]
  50.     "VIADSK"    = "VIA bus master IDE drivers"
  51.  
  52.  
  53. ;-----------------------------------------------------------------------------------------
  54. ; SCSI MINIPORT DRIVERS:
  55. ;
  56. ; Order of the information:
  57. ;
  58. ; Class driver = Type, Group, ErrorControl, Tag, EventMessageFile, TypesSupported
  59. ;
  60. ;-----------------------------------------------------------------------------------------
  61.  
  62. [MiniportDrivers]
  63.     viadsk  = !SERVICE_KERNEL_DRIVER, "SCSI Miniport", !SERVICE_ERROR_NORMAL,  17, %SystemRoot%\System32\IoLogMsg.dll , 7
  64.  
  65. ;---------------------------------------------------------------------------
  66. ; 1. Identify
  67. ;
  68. ; DESCRIPTION:   To verify that this INF deals with the same type of options
  69. ;                as we are choosing currently.
  70. ;
  71. ; INPUT:         None
  72. ;
  73. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL
  74. ;                $($R1): Option Type (COMPUTER ...)
  75. ;                $($R2): Diskette description
  76. ;---------------------------------------------------------------------------
  77.  
  78. [Identify]
  79.     ;
  80.     ;
  81.     read-syms Identification
  82.  
  83.     set Status     = STATUS_SUCCESSFUL
  84.     set Identifier = $(OptionType)
  85.     set Media      = #("Source Media Descriptions", 1, 1)
  86.  
  87.     Return $(Status) $(Identifier) $(Media)
  88.  
  89.  
  90.  
  91. ;------------------------------------------------------------------------
  92. ; 2. ReturnOptions:
  93. ;
  94. ; DESCRIPTION:   To return the option list supported by this INF and the
  95. ;                localised text list representing the options.
  96. ;
  97. ;
  98. ; INPUT:         $($0):  Language used. ( ENG | FRN | ... )
  99. ;
  100. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  101. ;                                STATUS_NOLANGUAGE
  102. ;                                STATUS_FAILED
  103. ;
  104. ;                $($R1): Option List
  105. ;                $($R2): Option Text List
  106. ;------------------------------------------------------------------------
  107.  
  108. [ReturnOptions]
  109.     ;
  110.     ;
  111.     set Status        = STATUS_FAILED
  112.     set OptionList     = {}
  113.     set OptionTextList = {}
  114.  
  115.     ;
  116.     ; Check if the language requested is supported
  117.     ;
  118.     set LanguageList = ^(LanguagesSupported, 1)
  119.     Ifcontains(i) $($0) in $(LanguageList)
  120.         goto returnoptions
  121.     else
  122.         set Status = STATUS_NOLANGUAGE
  123.         goto finish_ReturnOptions
  124.     endif
  125.  
  126.     ;
  127.     ; form a list of all the options and another of the text representing
  128.     ;
  129.  
  130. returnoptions = +
  131.     set OptionList     = ^(Options, 0)
  132.     set OptionTextList = ^(OptionsText$($0), 1)
  133.     set Status         = STATUS_SUCCESSFUL
  134.  
  135. finish_ReturnOptions = +
  136.     Return $(Status) $(OptionList) $(OptionTextList)
  137.  
  138.  
  139. ;
  140. ; 3. InstallOption:
  141. ;
  142. ; FUNCTION:  To copy files representing Options
  143. ;            To configure the installed option
  144. ;            To update the registry for the installed option
  145. ;
  146. ; INPUT:     $($0):  Language to use
  147. ;            $($1):  OptionID to install
  148. ;            $($2):  SourceDirectory
  149. ;            $($3):  AddCopy  (YES | NO)
  150. ;            $($4):  DoCopy   (YES | NO)
  151. ;            $($5):  DoConfig (YES | NO)
  152. ;
  153. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  154. ;                            STATUS_NOLANGUAGE |
  155. ;                            STATUS_USERCANCEL |
  156. ;                            STATUS_FAILED
  157. ;
  158.  
  159. [InstallOption]
  160.  
  161.     ;
  162.     ; Set parameters for VIA IDE
  163.     ;
  164.     set SndChIRQ        = 15
  165.     set Disk0_DMA_Time  = 120
  166.     set Disk0_PIO_Time  = 120
  167.     set Disk0_DMA_Mode  = 1
  168.     set Disk0_Blk_Size  = 16 
  169.     set Disk1_DMA_Time  = 0
  170.     set Disk1_PIO_Time  = 0
  171.     set Disk1_DMA_Mode  = 1
  172.     set Disk1_Blk_Size  = 0
  173.     set Disk2_DMA_Time  = 0
  174.     set Disk2_PIO_Time  = 0
  175.     set Disk2_DMA_Mode  = 1
  176.     set Disk2_Blk_Size  = 0
  177.     set Disk3_DMA_Time  = 0
  178.     set Disk3_PIO_Time  = 0
  179.     set Disk3_DMA_Mode  = 1
  180.     set Disk3_Blk_Size  = 0
  181.  
  182.     ;
  183.     ; Delete VIAIDE service key to modify parameters
  184.     ;
  185.     shell "utility.inf" RemoveService viaide "NO"
  186.  
  187.     ;
  188.     ; Set default values for
  189.     ;
  190.     set Status = STATUS_FAILED
  191.     set DrivesToFree = {}
  192.  
  193.     ;
  194.     ; extract parameters
  195.     ;
  196.     set Option   = $($1)
  197.     set SrcDir   = $($2)
  198.     set AddCopy  = $($3)
  199.     set DoCopy   = $($4)
  200.     set DoConfig = $($5)
  201.  
  202.     ;
  203.     ; Check if the language requested is supported
  204.     ;
  205.     set LanguageList = ^(LanguagesSupported, 1)
  206.     Ifcontains(i) $($0) in $(LanguageList)
  207.     else
  208.         set Status = STATUS_NOLANGUAGE
  209.         goto finish_InstallOption
  210.     endif
  211.     read-syms Strings$($0)
  212.  
  213.     ;
  214.     ; check to see if Option is supported.
  215.     ;
  216.  
  217.     set OptionList = ^(Options, 0)
  218.     ifcontains $(Option) in $(OptionList)
  219.     else
  220.         Debug-Output "SCSI.INF: SCSI option is not supported."
  221.         goto finish_InstallOption
  222.     endif
  223.     set OptionList = ""
  224.  
  225.     ;
  226.     ; Option has been defined already
  227.     ;
  228.  
  229.     set MiniportDriver   =   #(Options,         $(Option),         1)
  230.     set Type             = $(#(MiniportDrivers, $(MiniportDriver), 1))
  231.     set Group            =   #(MiniportDrivers, $(MiniportDriver), 2)
  232.     set ErrorControl     = $(#(MiniportDrivers, $(MiniportDriver), 3))
  233.     set Tag              =   #(MiniportDrivers, $(MiniportDriver), 4)
  234.     set EventMessageFile =   #(MiniportDrivers, $(MiniportDriver), 5)
  235.     set TypesSupported   =   #(MiniportDrivers, $(MiniportDriver), 6)
  236.  
  237.     set Start            =   $(!SERVICE_BOOT_START)
  238.  
  239. installtheoption = +
  240.  
  241.     ;
  242.     ; Code to add files to copy list
  243.     ;
  244.  
  245. ;hc01_s
  246.     set AddCopy = NO
  247. ;hc01_e
  248.  
  249.     ifstr(i) $(AddCopy) == "YES"
  250.         set DoActualCopy = NO
  251.         set FileToCheck = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  252.         LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
  253.         ifstr(i) $(STATUS) == NO
  254.             set DoActualCopy = YES
  255.         endif
  256.  
  257.         ifstr(i) $(DoActualCopy) == NO
  258.             shell "subroutn.inf" DriversExist $($0) $(String1)
  259.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  260.                 Debug-Output "SCSI.INF: shelling DriversExist failed"
  261.                 goto finish_InstallOption
  262.             endif
  263.  
  264.             ifstr(i) $($R0) == STATUS_CURRENT
  265.             else-ifstr(i) $($R0) == STATUS_NEW
  266.                 set DoActualCopy = YES
  267.             else-ifstr(i) $($R0) == STATUS_USERCANCEL
  268.                 Debug-Output "SCSI.INF: User cancelled SCSI installation"
  269.                 goto finish_InstallOption
  270.             else
  271.                 Debug-Output "SCSI.INF: Error reported in DriversExist routine in SUBROUTN.INF"
  272.                 goto finish_InstallOption
  273.             endif
  274.         endif
  275.  
  276.         ifstr(i) $(DoActualCopy) == YES
  277.  
  278.             shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2)
  279.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  280.                 Debug-Output "SCSI.INF: shelling DoAskSourceEx failed"
  281.                 goto finish_InstallOption
  282.             endif
  283.  
  284.             ifstr(i) $($R0) == STATUS_SUCCESSFUL
  285.                 set SrcDir = $($R1)
  286.                 ifstr(i) $($R2) != ""
  287.                     set DrivesToFree = >($(DrivesToFree), $($R2))
  288.                 endif
  289.             else
  290.                 Debug-Output "SCSI.INF: User cancelled asking source."
  291.                 goto finish_InstallOption
  292.             endif
  293.  
  294.             install Install-AddCopyOption
  295.             ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
  296.                 Debug-Output "Adding SCSI files to copy list failed"
  297.                 goto finish_InstallOption
  298.             endif
  299.         else
  300.             set DoCopy = NO
  301.         endif
  302.  
  303.     endif
  304. ;hc01_s
  305.     set DoCopy = NO
  306. ;hc01_e
  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. ;hc01_s
  320.     set DoConfig = YES
  321. ;hc01_e
  322.  
  323.     ifstr(i) $(DoConfig) == "YES"
  324.         ;
  325.         ; first run a privilege check on modifying the setup node
  326.         ;
  327.  
  328.         shell "registry.inf" CheckSetupModify
  329.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  330.             goto finish_InstallOption
  331.         endif
  332.  
  333.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  334.             goto finish_InstallOption
  335.         endif
  336.  
  337.         ;
  338.         ; then make a new SCSI entry, the entry is created automatically
  339.         ; enabled
  340.         ;
  341.  
  342.         set ServiceNode   = $(MiniportDriver)
  343.         set ServiceBinary = System32\drivers\#(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  344.  
  345.         set ServicesValues   = { +
  346.                 {Type,           0, $(!REG_VT_DWORD),     $(Type)                  }, +
  347.                 {Start,          0, $(!REG_VT_DWORD),     $(Start)                 }, +
  348.                 {Group,          0, $(!REG_VT_SZ),        $(Group)                 }, +
  349.                 {ErrorControl,   0, $(!REG_VT_DWORD),     $(ErrorControl)          }, +
  350.                 {Tag,            0, $(!REG_VT_DWORD),     $(Tag)                   }, +
  351.                 {BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary)         }  +
  352.                 }
  353.  
  354.         set DeviceValues     = {}
  355.         set EventLogValues   = { +
  356.                 {EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, +
  357.                 {TypesSupported,   0, $(!REG_VT_DWORD),     $(TypesSupported)   }  +
  358.                 }
  359.  
  360.         ;
  361.         ; These parameters will be at
  362.         ;  \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\viadsk\SNDCHIRQ
  363.         ;
  364.         set ParametersValues = { +
  365.                 {SNDCHIRQ,     0, $(!REG_VT_DWORD),    $(SndChIRQ)  }, +
  366.                 }
  367.         shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
  368.                                                 $(ServicesValues)   +
  369.                                                 $(ParametersValues) +
  370.                                                 $(DeviceValues)     +
  371.                                                 $(EventLogValues)   +
  372.                                                 SNDCHIRQ
  373.         ;
  374.         ; These parameters will be at
  375.         ;  \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\viadsk\Parameters0
  376.         ;
  377. ;HC_02S
  378.         set ParametersValues = { +
  379. ;                {DMA_TIME,     0, $(!REG_VT_DWORD),    $(Disk0_DMA_Time) }, +
  380. ;                {PIO_TIME,     0, $(!REG_VT_DWORD),    $(Disk0_PIO_Time) }, +
  381.                 {SET_DMAM,     0, $(!REG_VT_DWORD),    $(Disk0_DMA_Mode) }, +
  382. ;                {BLCKSIZE,     0, $(!REG_VT_DWORD),    $(Disk0_Blk_Size) }, +
  383.                }
  384. ;HC_02E
  385.         shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
  386.                                                 $(ServicesValues)   +
  387.                                                 $(ParametersValues) +
  388.                                                 $(DeviceValues)     +
  389.                                                 $(EventLogValues)   +
  390.                                                 Parameters0
  391.         ;
  392.         ; These parameters will be at
  393.         ;  \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\viadsk\Parameters1
  394.         ;
  395. ;HC_02S
  396.         set ParametersValues = { +
  397. ;                {DMA_TIME,     0, $(!REG_VT_DWORD),    $(Disk1_DMA_Time) }, +
  398. ;                {PIO_TIME,     0, $(!REG_VT_DWORD),    $(Disk1_PIO_Time) }, +
  399.                 {SET_DMAM,     0, $(!REG_VT_DWORD),    $(Disk1_DMA_Mode) }, +
  400. ;                {BLCKSIZE,     0, $(!REG_VT_DWORD),    $(Disk1_Blk_Size) }, +
  401.                 }
  402. ;HC_02E
  403.         shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
  404.                                                 $(ServicesValues)   +
  405.                                                 $(ParametersValues) +
  406.                                                 $(DeviceValues)     +
  407.                                                 $(EventLogValues)   +
  408.                                                 Parameters1
  409.         ;
  410.         ; These parameters will be at
  411.         ;  \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\viadsk\Parameters2
  412.         ;
  413. ;HC_02S
  414.         set ParametersValues = { +
  415. ;                {DMA_TIME,     0, $(!REG_VT_DWORD),    $(Disk2_DMA_Time) }, +
  416. ;                {PIO_TIME,     0, $(!REG_VT_DWORD),    $(Disk2_PIO_Time) }, +
  417.                 {SET_DMAM,     0, $(!REG_VT_DWORD),    $(Disk2_DMA_Mode) }, +
  418. ;                {BLCKSIZE,     0, $(!REG_VT_DWORD),    $(Disk2_Blk_Size) }, +
  419.                 }
  420. ;HC_02E
  421.         shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
  422.                                                 $(ServicesValues)   +
  423.                                                 $(ParametersValues) +
  424.                                                 $(DeviceValues)     +
  425.                                                 $(EventLogValues)   +
  426.                                                 Parameters2
  427.         ;
  428.         ; These parameters will be at
  429.         ;  \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\viadsk\Parameters3
  430.         ;
  431. ;HC_02S
  432.         set ParametersValues = { +
  433. ;                {DMA_TIME,     0, $(!REG_VT_DWORD),    $(Disk3_DMA_Time) }, +
  434. ;                {PIO_TIME,     0, $(!REG_VT_DWORD),    $(Disk3_PIO_Time) }, +
  435.                 {SET_DMAM,     0, $(!REG_VT_DWORD),    $(Disk3_DMA_Mode) }, +
  436. ;                {BLCKSIZE,     0, $(!REG_VT_DWORD),    $(Disk3_Blk_Size) }, +
  437.                 }
  438. ;HC_02E
  439.         shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
  440.                                                 $(ServicesValues)   +
  441.                                                 $(ParametersValues) +
  442.                                                 $(DeviceValues)     +
  443.                                                 $(EventLogValues)   +
  444.                                                 Parameters3
  445.  
  446.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  447.             Debug-Output "Couldn't execute MakeServicesEntry in registry.inf"
  448.             goto finish_InstallOption
  449.         endif
  450.  
  451.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  452.             Debug-Output "MakeServicesEntry failed for SCSI"
  453.             goto finish_InstallOption
  454.         endif
  455. ;Frank_S
  456.         shell "registry.inf" ModifyServicesEntry atapi $(!SERVICE_DISABLED)
  457.         shell "registry.inf" ModifyServicesEntry atdisk $(!SERVICE_DISABLED)
  458. ;HC03_S
  459.     shell "registry.inf" GetServicesEntryStart "imgatapi"
  460.     ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
  461.         shell "registry.inf" ModifyServicesEntry imgatapi $(!SERVICE_DISABLED)
  462.     endif
  463. ;HC03_E
  464.     set KeyName = "Software\Microsoft\Windows NT\CurrentVersion"
  465.         OpenRegKey $(!REG_H_LOCAL) "" $(KeyName) $(!REG_KEY_READ) KeyHandle
  466.         ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  467.           Debug-Output "REGISTRY.INF: Couldn't open windows nt software key for read access"
  468.           goto finish_InstallOption
  469.         endif
  470.  
  471.         GetRegValue $(KeyHandle) "CurrentVersion" VerInf
  472.     set NtVer  = *($(VerInf),4)
  473.  
  474. ;        ifstr(i) $(NtVer) == "4.0"
  475. ;          shell "registry.inf" ModifyServicesEntry scsidisk $(!SERVICE_BOOT_START)
  476. ;          shell "registry.inf" ModifyServicesEntry scsicdrm $(!SERVICE_SYSTEM_START)
  477. ;        endif
  478.  
  479.         ifstr(i) $(NtVer) == "3.50"
  480.           shell "registry.inf" ModifyServicesEntry scsidisk $(!SERVICE_BOOT_START)
  481.           shell "registry.inf" ModifyServicesEntry scsicdrm $(!SERVICE_SYSTEM_START)
  482.         endif
  483.         ifstr(i) $(NtVer) == "3.51"
  484.           shell "registry.inf" ModifyServicesEntry scsidisk $(!SERVICE_BOOT_START)
  485.           shell "registry.inf" ModifyServicesEntry scsicdrm $(!SERVICE_SYSTEM_START)
  486.         endif
  487.         CloseRegKey $(KeyHandle)
  488.         ;shell "registry.inf" ModifyServicesEntry scsidisk $(!SERVICE_BOOT_START)
  489.         ;shell "registry.inf" ModifyServicesEntry scsicdrm $(!SERVICE_SYSTEM_START)
  490.         ;shell "registry.inf" ModifyServicesEntry atapi $(!SERVICE_DISABLED)
  491.         ;shell "registry.inf" ModifyServicesEntry atdisk $(!SERVICE_DISABLED)
  492. ;Frank_E
  493.     endif
  494.  
  495.     set Status = STATUS_SUCCESSFUL
  496. finish_InstallOption = +
  497.     ForListDo $(DrivesToFree)
  498.         LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
  499.     EndForListDo
  500.  
  501.     Return $(Status)
  502.  
  503.  
  504. [Install-AddCopyOption]
  505.  
  506.     ;
  507.     ; Add the files to the copy list
  508.     ;
  509.     AddSectionKeyFileToCopyList   Files-ScsiMiniportDrivers         +
  510.                                   $(MiniportDriver)                 +
  511.                                   $(SrcDir)                      +
  512.                                   $(!STF_WINDOWSSYSPATH)\drivers
  513.  
  514.     exit
  515.  
  516.  
  517. [Install-DoCopyOption]
  518.  
  519.     ;
  520.     ; Copy files in the copy list
  521.     ;
  522.     CopyFilesInCopyList
  523.     exit
  524.  
  525. ;-------------------------------------------------------------------------
  526. ; 4. DeInstallOption:
  527. ;
  528. ; FUNCTION:  To remove files representing Option
  529. ;            To remove the registry entry corresponding to the Option
  530. ;
  531. ; INPUT:     $($0):  Language to use
  532. ;            $($1):  OptionID to install
  533. ;
  534. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  535. ;                            STATUS_NOLANGUAGE |
  536. ;                            STATUS_USERCANCEL |
  537. ;                            STATUS_FAILED
  538. ;-------------------------------------------------------------------------
  539. [DeInstallOption]
  540.     ;
  541.     ; Set default values for
  542.     ;
  543.     set Status   = STATUS_FAILED
  544.     ;
  545.     ; extract parameters
  546.     ;
  547.     set Option   = $($1)
  548.  
  549.     ;
  550.     ; Check if the language requested is supported
  551.     ;
  552.     set LanguageList = ^(LanguagesSupported, 1)
  553.     Ifcontains(i) $($0) in $(LanguageList)
  554.     else
  555.         set Status = STATUS_NOLANGUAGE
  556.         goto finish_DeInstallOption
  557.     endif
  558.     read-syms Strings$($0)
  559.  
  560.     ;
  561.     ; check to see if Option is supported.
  562.     ;
  563.  
  564.     set OptionList = ^(Options, 0)
  565.     ifcontains $(Option) in $(OptionList)
  566.     else
  567.         goto finish_DeInstallOption
  568.     endif
  569.     set OptionList = ""
  570.  
  571.     ;
  572.     ; fetch details about option
  573.     ;
  574.  
  575.     set MiniportDriver = #(Options, $(Option), 1)
  576.     set MiniportFile   = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  577.     set FilePath       = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
  578.  
  579.     ;
  580.     ; check to see if file is installed
  581.     ; if not give success
  582.     ;
  583.  
  584.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
  585.     ifstr(i) $(STATUS) == "NO"
  586.         set Status = STATUS_SUCCESSFUL
  587.         goto finish_DeInstallOption
  588.     endif
  589.  
  590.     shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  591.     ifstr(i) $($R0) != "STATUS_SUCCESSFUL"
  592.         ; this could happen if there is no start value or there is no
  593.         ; key, in which case the option is not installed
  594.         set Status = STATUS_SUCCESSFUL
  595.         goto finish_DeInstallOption
  596.     endif
  597.  
  598.     ifstr(i) $($R1) == $(!SERVICE_BOOT_START)
  599.         shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "WARNING" $(String3)
  600.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  601.             goto do_removal
  602.         endif
  603.         ifstr(i) $($R1) == "CANCEL"
  604.             goto finish_DeInstallOption
  605.         endif
  606.     endif
  607.  
  608. do_removal =+
  609.     ;
  610.     ; disable the registry entry
  611.     ;
  612.  
  613.     shell "registry.inf" RemoveServicesEntry $(MiniportDriver)
  614.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  615.         Debug-Output "SCSI.INF: Failed to shell RemoveServicesEntry"
  616.         goto finish_DeInstallOption
  617.     endif
  618.  
  619.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  620.         Debug-Output "SCSI.INF: Failed to disable services entry"
  621.         goto finish_DeInstallOption
  622.     endif
  623.  
  624.     ;
  625.     ; we won't remove the file because we can only do so during the next boot.
  626.     ; if the user chooses to reinstall the same driver during this boot
  627.     ; he will still end up deleting the driver on next boot. if the file
  628.     ; should be deleted a warning should be put up saying that the user should
  629.     ; not try to reinstall the driver during this boot
  630.     ;
  631.     ;    AddFileToDeleteList $(FilePath)
  632.  
  633.     set Status = STATUS_SUCCESSFUL
  634.  
  635. finish_DeInstallOption =+
  636.     return $(Status)
  637.  
  638.  
  639. ;-------------------------------------------------------------------------
  640. ; 5. GetInstalledOptions:
  641. ;
  642. ; FUNCTION:  To find out the list of options which are installed
  643. ;
  644. ; INPUT:     $($0): Language to Use
  645. ;
  646. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  647. ;                            STATUS_FAILED
  648. ;
  649. ;            $($R1): List of options installed
  650. ;            $($R2): Option installed Text List
  651. ;-------------------------------------------------------------------------
  652. [GetInstalledOptions]
  653.     set Status = STATUS_FAILED
  654.     set InstalledOptions = {}
  655.     set InstalledOptionsText = {}
  656.  
  657.     ;
  658.     ; Check if the language requested is supported
  659.     ;
  660.     set LanguageList = ^(LanguagesSupported, 1)
  661.     Ifcontains(i) $($0) in $(LanguageList)
  662.     else
  663.         set Status = STATUS_NOLANGUAGE
  664.         goto finish_GetInstalledOptions
  665.     endif
  666.  
  667.     set OptionList = ^(Options, 0)
  668.     ForListDo $(OptionList)
  669.         set MiniportDriver = #(Options, $($), 1)
  670.         set MiniportFile   = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  671.         set FilePath       = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
  672.         LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
  673.         ifstr(i) $(STATUS) == "YES"
  674.             shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  675.             ifint $($ShellCode) == $(!SHELL_CODE_OK)
  676.                 ifstr(i) $($R0) == STATUS_SUCCESSFUL
  677.                     ifstr(i) $($R1) != $(!SERVICE_DISABLED)
  678.  
  679.                         set OptionText = #(OptionsText$($0), $($), 1)
  680.                         set InstalledOptions     = >($(InstalledOptions), $($))
  681.                         set InstalledOptionsText = >($(InstalledOptionsText), $(OptionText))
  682.  
  683.                     endif
  684.                 endif
  685.             endif
  686.         endif
  687.     EndForListDo
  688.     set Status = STATUS_SUCCESSFUL
  689. finish_GetInstalledOptions =+
  690.     Return $(Status) $(InstalledOptions) $(InstalledOptionsText)
  691.  
  692.  
  693. ;**************************************************************************
  694. ; PROGRESS GUAGE VARIABLES
  695. ;**************************************************************************
  696.  
  697. [ProgressCopyENG]
  698.     ProCaption   = "Windows NT Setup"
  699.     ProCancel    = "Cancel"
  700.     ProCancelMsg = "Windows NT is not correcly installed.  Are you sure you want "+
  701.                    "to cancel copying files?"
  702.     ProCancelCap = "Setup Message"
  703.     ProText1     = "Copying:"
  704.     ProText2     = "To:"
  705.  
  706. [StringsENG]
  707.     String1 = "PCI IDE DISK Adapter"
  708.     String2 = "Please enter the full path to the VIA VT82C580 PCI IDE DISK "+
  709.               "Adapter file.  Then choose Continue."
  710.     String3 = "The VT82C580 PCI IDE DISK Adapter has been marked as a boot device.  Removing "+
  711.               "it may cause the system not to boot."$(!LF)$(!LF)"Are you sure "+
  712.               "you want to remove the Adapter."
  713.  
  714. [Source Media Descriptions]
  715.     1  = "VT82C580"  , TAGFILE = vtdisk
  716.  
  717. [Files-ScsiMiniportDrivers]
  718. viadsk = 1 , viadsk.sys , SIZE=999
  719.