home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1998 September / VPR9809B.ISO / BIOS / asus / bmident4 / bmident4.exe / PIIXDRV.Z / OEMSETUP.INF < prev    next >
INI File  |  1996-09-23  |  18KB  |  471 lines

  1. ;;/*++
  2. ;;
  3. ;;Copyright:    (c) 1996, Intel Corporation
  4. ;;
  5. ;;File Name:    oemsetup.inf
  6. ;;
  7. ;;Abstract:     Device Information File (INF) for the PIIX Bus Master IDE 
  8. ;;              device driver for Windows NT* 3.5x and 4.x.
  9. ;;
  10. ;;Environment:  Windows NT* 3.5x, 4.x
  11. ;;
  12. ;;Notes:        
  13. ;;
  14. ;;Items in file:
  15. ;;
  16. ;;Revision History:
  17. ;;    07 Jun, 1996  Created the file.
  18. ;;    30 Aug, 1996  Added checks to make the file compatible 3.5x and 4.x.
  19. ;;--*/
  20. [Identification]
  21.     OptionType = SCSI
  22. [MiniportDrivers]
  23.     piixide    = !SERVICE_KERNEL_DRIVER, "SCSI Miniport", !SERVICE_ERROR_NORMAL, 25, %SystemRoot%\System32\IoLogMsg.dll , 7
  24. [Identify]
  25.     read-syms Identification
  26.     set Status     = STATUS_SUCCESSFUL
  27.     set Identifier = $(OptionType)
  28.     set Media      = #("Source Media Descriptions", 1, 1)
  29.     Return $(Status) $(Identifier) $(Media)
  30. [ReturnOptions]
  31.     set Status        = STATUS_FAILED
  32.     set OptionList     = {}
  33.     set OptionTextList = {}
  34.     set LanguageList = ^(LanguagesSupported, 1)
  35.     Ifcontains(i) $($0) in $(LanguageList)
  36.         goto returnoptions
  37.     else
  38.         set Status = STATUS_NOLANGUAGE
  39.         goto finish_ReturnOptions
  40.     endif
  41. returnoptions = +
  42.     set OptionList     = ^(Options, 0)
  43.     set OptionTextList = ^(OptionsText$($0), 1)
  44.     set Status         = STATUS_SUCCESSFUL
  45. finish_ReturnOptions = +
  46.     Return $(Status) $(OptionList) $(OptionTextList)
  47. [InstallOption]
  48.     set Status = STATUS_FAILED
  49.     set DrivesToFree = {}
  50.     set Option   = $($1)
  51.     set SrcDir   = $($2)
  52.     set AddCopy  = $($3)
  53.     set DoCopy   = $($4)
  54.     set DoConfig = $($5)
  55.     set LanguageList = ^(LanguagesSupported, 1)
  56.     Ifcontains(i) $($0) in $(LanguageList)
  57.     else
  58.         set Status = STATUS_NOLANGUAGE
  59.         goto finish_InstallOption
  60.     endif
  61.     read-syms Strings$($0)
  62.     set OptionList = ^(Options, 0)
  63.     ifcontains $(Option) in $(OptionList)
  64.     else
  65.         Debug-Output "OEMSETUP.INF: SCSI option is not supported."
  66.         goto finish_InstallOption
  67.     endif
  68.     set OptionList = ""
  69.     set MiniportDriver   =   #(Options,         $(Option),         1)
  70.     set Type             = $(#(MiniportDrivers, $(MiniportDriver), 1))
  71.     set Group            =   #(MiniportDrivers, $(MiniportDriver), 2)
  72.     set ErrorControl     = $(#(MiniportDrivers, $(MiniportDriver), 3))
  73.     set Tag              =   #(MiniportDrivers, $(MiniportDriver), 4)
  74.     set EventMessageFile =   #(MiniportDrivers, $(MiniportDriver), 5)
  75.     set TypesSupported   =   #(MiniportDrivers, $(MiniportDriver), 6)
  76.     set Start            =   $(!SERVICE_BOOT_START)
  77. installtheoption = +
  78.     ifstr(i) $(AddCopy) == "YES"
  79.         set DoActualCopy = NO
  80.         set FileToCheck = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  81.         LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
  82.         ifstr(i) $(STATUS) == NO
  83.             set DoActualCopy = YES
  84.         endif
  85.         ifstr(i) $(DoActualCopy) == NO
  86.             shell "subroutn.inf" DriversExist $($0) $(String1)
  87.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  88.                 Debug-Output "OEMSETUP.INF: shelling DriversExist failed"
  89.                 goto finish_InstallOption
  90.             endif
  91.             ifstr(i) $($R0) == STATUS_CURRENT
  92.             else-ifstr(i) $($R0) == STATUS_NEW
  93.                 set DoActualCopy = YES
  94.             else-ifstr(i) $($R0) == STATUS_USERCANCEL
  95.                 Debug-Output "OEMSETUP.INF: User cancelled SCSI installation"
  96.                 goto finish_InstallOption
  97.             else
  98.                 Debug-Output "OEMSETUP.INF: Error reported in DriversExist routine in SUBROUTN.INF"
  99.                 goto finish_InstallOption
  100.             endif
  101.         endif
  102.         ifstr(i) $(DoActualCopy) == YES
  103.             shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2)
  104.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  105.                 Debug-Output "OEMSETUP.INF: shelling DoAskSourceEx failed"
  106.                 goto finish_InstallOption
  107.             endif
  108.             ifstr(i) $($R0) == STATUS_SUCCESSFUL
  109.                 set SrcDir = $($R1)
  110.                 ifstr(i) $($R2) != ""
  111.                     set DrivesToFree = >($(DrivesToFree), $($R2))
  112.                 endif
  113.             else
  114.                 Debug-Output "OEMSETUP.INF: User cancelled asking source."
  115.                 goto finish_InstallOption
  116.             endif
  117.             install Install-AddCopyOption
  118.             ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
  119.                 Debug-Output "Adding SCSI files to copy list failed"
  120.                 goto finish_InstallOption
  121.             endif
  122.         else
  123.             set DoCopy = NO
  124.         endif
  125.     endif
  126.     ifstr(i) $(DoCopy) == "YES"
  127.         read-syms ProgressCopy$($0)
  128.         install Install-DoCopyOption
  129.         ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
  130.             Debug-Output "Copying files failed"
  131.             goto finish_InstallOption
  132.         else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
  133.             set Status = STATUS_USERCANCEL
  134.             goto finish_InstallOption
  135.         endif
  136.     endif
  137.     ifstr(i) $(DoConfig) == "YES"
  138.         shell "registry.inf" CheckSetupModify
  139.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  140.             goto finish_InstallOption
  141.         endif
  142.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  143.             goto finish_InstallOption
  144.         endif
  145.         set ServiceNode   = $(MiniportDriver)
  146.         set ServiceBinary = System32\drivers\#(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  147.         set ServicesValues   = { +
  148.                 {Type,           0, $(!REG_VT_DWORD),     $(Type)                  }, +
  149.                 {Start,          0, $(!REG_VT_DWORD),     $(Start)                 }, +
  150.                 {Group,          0, $(!REG_VT_SZ),        $(Group)                 }, +
  151.                 {ErrorControl,   0, $(!REG_VT_DWORD),     $(ErrorControl)          }, +
  152.                 {Tag,            0, $(!REG_VT_DWORD),     $(Tag)                   }, +
  153.                 {BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary)         }  +
  154.                 }
  155. ;*****************
  156. ;* PIIXIDE BEGIN *
  157. ;*****************
  158.         set ParametersValues = { +
  159.                 {UseLbaMode,          0, $(!REG_VT_DWORD), 4294967295} +
  160.                 {UseMultiBlock,       0, $(!REG_VT_DWORD), 4294967295} +
  161.                 {PrimaryMasterMode,   0, $(!REG_VT_DWORD), 4294967295} +
  162.                 {PrimarySlaveMode,    0, $(!REG_VT_DWORD), 4294967295} +
  163.                 {SecondaryMasterMode, 0, $(!REG_VT_DWORD), 4294967295} +
  164.                 {SecondarySlaveMode,  0, $(!REG_VT_DWORD), 4294967295} +
  165.                 }
  166. ;*****************
  167. ;* PIIXIDE END   *
  168. ;*****************
  169.  
  170.         set DeviceValues     = {}
  171.         set EventLogValues   = { +
  172.                 {EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, +
  173.                 {TypesSupported,   0, $(!REG_VT_DWORD),     $(TypesSupported)   }  +
  174.                 }
  175.         shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
  176.                                                 $(ServicesValues)   +
  177.                                                 $(ParametersValues) +
  178.  
  179.                                                 $(DeviceValues)     +
  180.                                                 $(EventLogValues)   +
  181.                                                 Parameters
  182.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  183.             Debug-Output "Couldn't execute MakeServicesEntry in registry.inf"
  184.             goto finish_InstallOption
  185.         endif
  186.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  187.             Debug-Output "MakeServicesEntry failed for SCSI"
  188.             goto finish_InstallOption
  189.         endif
  190.         ; now check for version of NT
  191.         ;
  192.         set NT_REL = "NT_40"
  193.         ; now look in HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion and check for 4.0/3.5X
  194.         set NTReleaseKey = "SOFTWARE\Microsoft\Windows NT\CurrentVersion"
  195.         OpenRegKey $(!REG_H_LOCAL) "" $(NTReleaseKey) $(!REG_KEY_QUERY_VALUE) CurVerHandle
  196.         
  197.         ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  198.            shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) STATUS "couldn't open registry key handle"
  199.         endif
  200.         GetRegValue $(CurVerHandle) CurrentVersion VersionValue 
  201.         ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  202.            shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) STATUS "couldn't get key value"
  203.         endif
  204.         
  205.         set NTOutput = *($(VersionValue),4)
  206.         
  207.  
  208.         ifstr(i) $(NTOutput) == "4.0"
  209.            shell "registry.inf" ModifyServicesEntry disk $(!SERVICE_BOOT_START)
  210. ;           shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) STATUS $(NTOutput) 
  211.         else-ifstr(i) $(NTOutput) == "3.51"
  212.            shell "registry.inf" ModifyServicesEntry scsidisk $(!SERVICE_BOOT_START)
  213. ;           shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) STATUS $(NTOutput) 
  214.         else-ifstr(i) $(NTOutput) == "3.50"
  215.            shell "registry.inf" ModifyServicesEntry scsidisk $(!SERVICE_BOOT_START)
  216. ;           shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) STATUS $(NTOutput) 
  217.         else
  218.            shell "registry.inf" ModifyServicesEntry disk $(!SERVICE_BOOT_START)
  219. ;           shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) STATUS $(NTOutput) 
  220.         endif
  221.  
  222.  
  223.  
  224. ;*****************
  225. ;* PIIXIDE BEGIN *
  226. ;*****************
  227.         shell "registry.inf" GetServicesEntryStart "ATDISK"
  228.         ifstr(i) $($R0) != "STATUS_SUCCESSFUL"
  229.             set Status = STATUS_SUCCESSFUL
  230.             goto finish_InstallOption
  231.         endif
  232.  
  233.         shell "registry.inf" RemoveServicesEntry "ATDISK"
  234.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  235.             Debug-Output "OEMSETUP.INF: Failed to shell RemoveServicesEntry"
  236.             goto finish_InstallOption
  237.         endif
  238.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  239.             Debug-Output "OEMSETUP.INF: Failed to disable services entry"
  240.             goto finish_InstallOption
  241.         endif
  242.  
  243.         shell "registry.inf" GetServicesEntryStart "ATAPI"
  244.         ifstr(i) $($R0) != "STATUS_SUCCESSFUL"
  245.             set Status = STATUS_SUCCESSFUL
  246.             goto finish_InstallOption
  247.         endif
  248.  
  249.         shell "registry.inf" RemoveServicesEntry "ATAPI"
  250.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  251.             Debug-Output "OEMSETUP.INF: Failed to shell RemoveServicesEntry"
  252.             goto finish_InstallOption
  253.         endif
  254.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  255.             Debug-Output "OEMSETUP.INF: Failed to disable services entry"
  256.             goto finish_InstallOption
  257.         endif
  258. ;*****************
  259. ;* PIIXIDE END   *
  260. ;*****************
  261.     endif
  262.     set Status = STATUS_SUCCESSFUL
  263. finish_InstallOption = +
  264.     ForListDo $(DrivesToFree)
  265.         LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
  266.     EndForListDo
  267.     Return $(Status)
  268. [Install-AddCopyOption]
  269.     AddSectionKeyFileToCopyList   Files-ScsiMiniportDrivers         +
  270.                                   $(MiniportDriver)                 +
  271.                                   $(SrcDir)                      +
  272.                                   $(!STF_WINDOWSSYSPATH)\drivers
  273.     exit
  274. [Install-DoCopyOption]
  275.     CopyFilesInCopyList
  276.     exit
  277. [DeInstallOption]
  278.     set Status   = STATUS_FAILED
  279.     set Option   = $($1)
  280.     set LanguageList = ^(LanguagesSupported, 1)
  281.     Ifcontains(i) $($0) in $(LanguageList)
  282.     else
  283.         set Status = STATUS_NOLANGUAGE
  284.         goto finish_DeInstallOption
  285.     endif
  286.     read-syms Strings$($0)
  287.     set OptionList = ^(Options, 0)
  288.     ifcontains $(Option) in $(OptionList)
  289.     else
  290.         goto finish_DeInstallOption
  291.     endif
  292.     set OptionList = ""
  293.     set MiniportDriver = #(Options, $(Option), 1)
  294.     set MiniportFile   = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  295.     set FilePath       = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
  296.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
  297.     ifstr(i) $(STATUS) == "NO"
  298.         set Status = STATUS_SUCCESSFUL
  299.         goto finish_DeInstallOption
  300.     endif
  301.     shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  302.     ifstr(i) $($R0) != "STATUS_SUCCESSFUL"
  303.         set Status = STATUS_SUCCESSFUL
  304.         goto finish_DeInstallOption
  305.     endif
  306. do_removal =+
  307.     shell "registry.inf" RemoveServicesEntry $(MiniportDriver)
  308.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  309.         Debug-Output "OEMSETUP.INF: Failed to shell RemoveServicesEntry"
  310.         goto finish_DeInstallOption
  311.     endif
  312.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  313.         Debug-Output "OEMSETUP.INF: Failed to disable services entry"
  314.         goto finish_DeInstallOption
  315.     endif
  316.     set Status = STATUS_SUCCESSFUL
  317. ;*****************
  318. ;* PIIXIDE BEGIN *
  319. ;*****************
  320.     ;
  321.     ; Determine the current driver configuration: depending on the configuration
  322.     ; re-enable the appropiate default driver.
  323.     ;
  324.     shell "" GetParameterValue $(MiniportDriver) "AtapiOnPrimary"
  325.     set AtapiOnPrimary = $($R1)
  326.  
  327.     shell "" GetParameterValue $(MiniportDriver) "AtapiOnSecondary"
  328.     set AtapiOnSecondary = $($R1)
  329.  
  330.     ;
  331.     ; turn on Atdisk and/or Atapi again
  332.     ; values of AtapiOnPrimary and AtapiOnSecondary:
  333.     ;   0       - only disk, no atapi
  334.     ;   1       - atapi exists
  335.     ;   others  - no any disk and atapi
  336.     ;
  337.  
  338.     ifint $(AtapiOnPrimary) == "0"
  339.         shell "registry.inf" ModifyServicesEntry "Atdisk" $(!SERVICE_BOOT_START)
  340.         ifint $(AtapiOnSecondary) == "1"
  341.             shell "registry.inf" ModifyServicesEntry "Atapi" $(!SERVICE_BOOT_START)
  342.         endif
  343.         goto finish_DeInstallOption
  344.     endif
  345.  
  346.     ifint $(AtapiOnPrimary) == "1"
  347.         shell "registry.inf" ModifyServicesEntry "Atapi" $(!SERVICE_BOOT_START)
  348.         ifint $(AtapiOnSecondary) == "0"
  349.             shell "registry.inf" ModifyServicesEntry "Atdisk" $(!SERVICE_BOOT_START)
  350.         endif
  351.         goto finish_DeInstallOption
  352.     endif
  353.  
  354.     ifint $(AtapiOnSecondary) == "0"
  355.         shell "registry.inf" ModifyServicesEntry "Atdisk" $(!SERVICE_BOOT_START)
  356.         goto finish_DeInstallOption
  357.     endif
  358.  
  359.     ifint $(AtapiOnSecondary) == "1"
  360.         shell "registry.inf" ModifyServicesEntry "Atapi" $(!SERVICE_BOOT_START)
  361.         goto finish_DeInstallOption
  362.     endif
  363. ;*****************
  364. ;* PIIXIDE END   *
  365. ;*****************
  366.  
  367. finish_DeInstallOption =+
  368.     return $(Status)
  369.  
  370. ;*****************
  371. ;* PIIXIDE END   *
  372. ;*****************
  373. [GetParameterValue]
  374.     set Status = STATUS_FAILED
  375.     set ParameterValue = ""
  376.  
  377.     ;read-syms RegistryConstants
  378.  
  379.     Debug-Output "Get driver parameter value: "$($0)", "$($1)
  380.  
  381.     set KeyName = "system\"$(!STF_CONTROLSET)"\services\"$($0)\"Parameters"
  382.     OpenRegKey $(!REG_H_LOCAL) "" $(KeyName) $(!REG_KEY_READ) KeyHandle
  383.  
  384.     ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  385.         Debug-Output "Couldn't open key for read access"
  386.         goto finish_GetParameterValue
  387.     endif
  388.  
  389.     GetRegValue $(KeyHandle) $($1) ParameterValueList
  390.     ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  391.         Debug-Output "Couldn't read parameter value"
  392.         CloseRegKey $(KeyHandle)
  393.         goto finish_GetParameterValue
  394.     endif
  395.  
  396.     CloseRegKey $(KeyHandle)
  397.  
  398.     set ParameterValue = *($(ParameterValueList), 4)
  399.     set Status = STATUS_SUCCESSFUL
  400.  
  401. finish_GetParameterValue = +
  402.     Return $(Status) $(ParameterValue)
  403. ;*****************
  404. ;* PIIXIDE END   *
  405. ;*****************
  406.  
  407. [GetInstalledOptions]
  408.     set Status = STATUS_FAILED
  409.     set InstalledOptions = {}
  410.     set InstalledOptionsText = {}
  411.     set LanguageList = ^(LanguagesSupported, 1)
  412.     Ifcontains(i) $($0) in $(LanguageList)
  413.     else
  414.         set Status = STATUS_NOLANGUAGE
  415.         goto finish_GetInstalledOptions
  416.     endif
  417.     set OptionList = ^(Options, 0)
  418.     ForListDo $(OptionList)
  419.         set MiniportDriver = #(Options, $($), 1)
  420.         set MiniportFile   = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  421.         set FilePath       = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
  422.         LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
  423.         ifstr(i) $(STATUS) == "YES"
  424.             shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  425.             ifint $($ShellCode) == $(!SHELL_CODE_OK)
  426.                 ifstr(i) $($R0) == STATUS_SUCCESSFUL
  427.                     ifstr(i) $($R1) != $(!SERVICE_DISABLED)
  428.                         set OptionText = #(OptionsText$($0), $($), 1)
  429.                         set InstalledOptions     = >($(InstalledOptions), $($))
  430.                         set InstalledOptionsText = >($(InstalledOptionsText), $(OptionText))
  431.                     endif
  432.                 endif
  433.             endif
  434.         endif
  435.     EndForListDo
  436.     set Status = STATUS_SUCCESSFUL
  437. finish_GetInstalledOptions =+
  438.     Return $(Status) $(InstalledOptions) $(InstalledOptionsText)
  439. [Source Media Descriptions]
  440.     1 = "" , TAGFILE = disk1.nt
  441. [Signature]
  442.     FileType = MICROSOFT_FILE
  443. [GetSignature]
  444.     read-syms Signature
  445.     return $(FileType)
  446. [ProductType]
  447. STF_PRODUCT  = Winnt
  448. STF_PLATFORM = I386
  449. [Files-ScsiMiniportDrivers]
  450. piixide = 1, PIIXIDE.SYS , SIZE=999
  451. [LanguagesSupported]
  452.     ENG
  453. [OptionsTextENG]
  454.     "PIIXIDE"      = "Intel PIIX PCI Bus Master IDE Controller"
  455. [Options]
  456.     "PIIXIDE"      = piixide
  457. [ProgressCopyENG]
  458.     ProCaption   = "Windows NT Setup"
  459.     ProCancel    = "Cancel"
  460.     ProCancelMsg = "Windows NT is not correctly installed.  Are you sure you want "+
  461.                    "to cancel copying files?"
  462.     ProCancelCap = "Setup Message"
  463.     ProText1     = "Copying:"
  464.     ProText2     = "To:"
  465. [StringsENG]
  466.     String1 = "SCSI Adapter"
  467.     String2 = "Setup needs to copy SCSI driver files."$(!LF)$(!LF)+
  468.               "Setup will look for the files in the location specified below. If you want "+
  469.               "Setup to look in a different place, type the new location. When the location "+
  470.               "is correct, click Continue."
  471.