home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1998 June / Vpr9806a.iso / DRIVER / ibm / 20xs_101 / 20XS_101.EXE / OEMSETUP.INF < prev    next >
INI File  |  1997-06-16  |  16KB  |  467 lines

  1. ;---------------------------------------------------------------
  2. ; Windows NT OEMSETUP.INF
  3. ;   for IBM PCMCIA Portable CD-ROM Drive Series
  4. ;
  5. ;   Version 1.00  Copyright (C) IBM Corp. 1996-1997
  6. ;--------------------------------------------------------------
  7.  
  8. [Identification]
  9.     OptionType = SCSI
  10.  
  11. [LanguagesSupported]
  12.     ENG
  13.  
  14. [Options]
  15.     "CD20X"    = CD20XRNT
  16.  
  17. [OptionsTextENG]
  18.     "CD20X"    = "IBM ポータブル CD-ROM ドライブ CD-20X"
  19. ;    "CD20X"    = "IBM Portable CD-ROM Drive CD-20X"
  20.  
  21. [MiniportDrivers]
  22.     CD20XRNT  = !SERVICE_KERNEL_DRIVER, "SCSI miniport", !SERVICE_ERROR_NORMAL,  17, %SystemRoot%\System32\IoLogMsg.dll , 7
  23.  
  24. [Identify]
  25.     read-syms Identification
  26.  
  27.     set Status     = STATUS_SUCCESSFUL
  28.     set Identifier = $(OptionType)
  29.     set Media      = #("Source Media Descriptions", 1, 1)
  30.  
  31.     Return $(Status) $(Identifier) $(Media)
  32.  
  33. [ReturnOptions]
  34.     set Status        = STATUS_FAILED
  35.     set OptionList     = {}
  36.     set OptionTextList = {}
  37.  
  38.     set LanguageList = ^(LanguagesSupported, 1)
  39.     Ifcontains(i) $($0) in $(LanguageList)
  40.         goto returnoptions
  41.     else
  42.         set Status = STATUS_NOLANGUAGE
  43.         goto finish_ReturnOptions
  44.     endif
  45.  
  46. returnoptions = +
  47.     set OptionList     = ^(Options, 0)
  48.     set OptionTextList = ^(OptionsText$($0), 1)
  49.     set Status         = STATUS_SUCCESSFUL
  50.  
  51. finish_ReturnOptions = +
  52.     Return $(Status) $(OptionList) $(OptionTextList)
  53.  
  54.  
  55. [InstallOption]
  56.  
  57.     set Status = STATUS_FAILED
  58.     set DrivesToFree = {}
  59.  
  60.     set Option   = $($1)
  61.     set SrcDir   = $($2)
  62.     set AddCopy  = $($3)
  63.     set DoCopy   = $($4)
  64.     set DoConfig = $($5)
  65.  
  66.     set LanguageList = ^(LanguagesSupported, 1)
  67.     Ifcontains(i) $($0) in $(LanguageList)
  68.     else
  69.         set Status = STATUS_NOLANGUAGE
  70.         goto finish_InstallOption
  71.     endif
  72.     read-syms Strings$($0)
  73.  
  74.     set OptionList = ^(Options, 0)
  75.     ifcontains $(Option) in $(OptionList)
  76.     else
  77.         Debug-Output "SCSI.INF: SCSI option is not supported."
  78.         goto finish_InstallOption
  79.     endif
  80.     set OptionList = ""
  81.  
  82.     set MiniportDriver   =   #(Options,         $(Option),         1)
  83.     set Type             = $(#(MiniportDrivers, $(MiniportDriver), 1))
  84.     set Group            =   #(MiniportDrivers, $(MiniportDriver), 2)
  85.     set ErrorControl     = $(#(MiniportDrivers, $(MiniportDriver), 3))
  86.     set Tag              =   #(MiniportDrivers, $(MiniportDriver), 4)
  87.     set EventMessageFile =   #(MiniportDrivers, $(MiniportDriver), 5)
  88.     set TypesSupported   =   #(MiniportDrivers, $(MiniportDriver), 6)
  89.  
  90.     set Start            =   $(!SERVICE_BOOT_START)
  91.  
  92. installtheoption = +
  93.  
  94.     ifstr(i) $(AddCopy) == "YES"
  95.         set DoActualCopy = NO
  96.         set FileToCheck = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  97.         LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
  98.         ifstr(i) $(STATUS) == NO
  99.             set DoActualCopy = YES
  100.         endif
  101.  
  102.         ifstr(i) $(DoActualCopy) == NO
  103.             shell "subroutn.inf" DriversExist $($0) $(String1)
  104.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  105.                 Debug-Output "SCSI.INF: shelling DriversExist failed"
  106.                 goto finish_InstallOption
  107.             endif
  108.  
  109.             ifstr(i) $($R0) == STATUS_CURRENT
  110.             else-ifstr(i) $($R0) == STATUS_NEW
  111.                 set DoActualCopy = YES
  112.             else-ifstr(i) $($R0) == STATUS_USERCANCEL
  113.                 Debug-Output "SCSI.INF: User cancelled SCSI installation"
  114.                 goto finish_InstallOption
  115.             else
  116.                 Debug-Output "SCSI.INF: Error reported in DriversExist routine in SUBROUTN.INF"
  117.                 goto finish_InstallOption
  118.             endif
  119.         endif
  120.  
  121.         ifstr(i) $(DoActualCopy) == YES
  122.  
  123.             shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2)
  124.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  125.                 Debug-Output "SCSI.INF: shelling DoAskSourceEx failed"
  126.                 goto finish_InstallOption
  127.             endif
  128.  
  129.             ifstr(i) $($R0) == STATUS_SUCCESSFUL
  130.                 set SrcDir = $($R1)
  131.                 ifstr(i) $($R2) != ""
  132.                     set DrivesToFree = >($(DrivesToFree), $($R2))
  133.                 endif
  134.             else
  135.                 Debug-Output "SCSI.INF: User cancelled asking source."
  136.                 goto finish_InstallOption
  137.             endif
  138.  
  139.             install Install-AddCopyOption
  140.             ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
  141.                 Debug-Output "Adding SCSI files to copy list failed"
  142.                 goto finish_InstallOption
  143.             endif
  144.         else
  145.             set DoCopy = NO
  146.         endif
  147.  
  148.     endif
  149.  
  150.     ifstr(i) $(DoCopy) == "YES"
  151.         read-syms ProgressCopy$($0)
  152.         install Install-DoCopyOption
  153.         ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
  154.             Debug-Output "Copying files failed"
  155.             goto finish_InstallOption
  156.         else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
  157.             set Status = STATUS_USERCANCEL
  158.             goto finish_InstallOption
  159.         endif
  160.     endif
  161.  
  162.     ifstr(i) $(DoConfig) == "YES"
  163.  
  164.         shell "registry.inf" CheckSetupModify
  165.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  166.             goto finish_InstallOption
  167.         endif
  168.  
  169.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  170.             goto finish_InstallOption
  171.         endif
  172.  
  173.  
  174.         set ServiceNode   = $(MiniportDriver)
  175.         set ServiceBinary = System32\drivers\#(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  176.  
  177.         set ServicesValues   = { +
  178.                 {Type,           0, $(!REG_VT_DWORD),     $(Type)                  }, +
  179.                 {Start,          0, $(!REG_VT_DWORD),     $(Start)                 }, +
  180.                 {Group,          0, $(!REG_VT_SZ),        $(Group)                 }, +
  181.                 {ErrorControl,   0, $(!REG_VT_DWORD),     $(ErrorControl)          }, +
  182.                 {Tag,            0, $(!REG_VT_DWORD),     $(Tag)                   }, +
  183.                 {BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary)         }  +
  184.                 }
  185.         set ParametersValues = ""
  186.         set DeviceValues     = {}
  187.         set EventLogValues   = { +
  188.                 {EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, +
  189.                 {TypesSupported,   0, $(!REG_VT_DWORD),     $(TypesSupported)   }  +
  190.                 }
  191.  
  192.         shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
  193.                                                 $(ServicesValues)   +
  194.                                                 $(ParametersValues) +
  195.                                                 $(DeviceValues)     +
  196.                                                 $(EventLogValues)   +
  197.                                                 Parameters
  198.  
  199.  
  200.  
  201.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  202.             Debug-Output "Couldn't execute MakeServicesEntry in registry.inf"
  203.             goto finish_InstallOption
  204.         endif
  205.  
  206.         shell "" MakeCD20XEntry
  207.  
  208.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  209.             Debug-Output "Couldn't execute MakeCD20XEntry "
  210.             goto finish_InstallOption
  211.         endif
  212.  
  213.  
  214.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  215.             Debug-Output "MakeServicesEntry failed for SCSI"
  216.             goto finish_InstallOption
  217.         endif
  218.  
  219.     endif
  220.  
  221.     set Status = STATUS_SUCCESSFUL
  222. finish_InstallOption = +
  223.     ForListDo $(DrivesToFree)
  224.         LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
  225.     EndForListDo
  226.  
  227.     Return $(Status)
  228.  
  229.  
  230. [Install-AddCopyOption]
  231.  
  232.     AddSectionKeyFileToCopyList   Files-ScsiMiniportDrivers         +
  233.                                   $(MiniportDriver)                 +
  234.                                   $(SrcDir)                      +
  235.                                   $(!STF_WINDOWSSYSPATH)\drivers
  236.  
  237.     exit
  238.  
  239.  
  240. [Install-DoCopyOption]
  241.  
  242.     CopyFilesInCopyList
  243.     exit
  244.  
  245. [DeInstallOption]
  246.     set Status   = STATUS_FAILED
  247.     set Option   = $($1)
  248.  
  249.     set LanguageList = ^(LanguagesSupported, 1)
  250.     Ifcontains(i) $($0) in $(LanguageList)
  251.     else
  252.         set Status = STATUS_NOLANGUAGE
  253.         goto finish_DeInstallOption
  254.     endif
  255.     read-syms Strings$($0)
  256.  
  257.     set OptionList = ^(Options, 0)
  258.     ifcontains $(Option) in $(OptionList)
  259.     else
  260.         goto finish_DeInstallOption
  261.     endif
  262.     set OptionList = ""
  263.  
  264.     set MiniportDriver = #(Options, $(Option), 1)
  265.     set MiniportFile   = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  266.     set FilePath       = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
  267.  
  268.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
  269.     ifstr(i) $(STATUS) == "NO"
  270.         set Status = STATUS_SUCCESSFUL
  271.         goto finish_DeInstallOption
  272.     endif
  273.  
  274.     shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  275.     ifstr(i) $($R0) != "STATUS_SUCCESSFUL"
  276.         ; this could happen if there is no start value or there is no
  277.         ; key, in which case the option is not installed
  278.         set Status = STATUS_SUCCESSFUL
  279.         goto finish_DeInstallOption
  280.     endif
  281.  
  282.     ifstr(i) $($R1) == $(!SERVICE_BOOT_START)
  283.         shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "WARNING" $(String3)
  284.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  285.             goto do_removal
  286.         endif
  287.         ifstr(i) $($R1) == "CANCEL"
  288.             goto finish_DeInstallOption
  289.         endif
  290.     endif
  291.  
  292. do_removal =+
  293.  
  294.     shell "registry.inf" RemoveServicesEntry $(MiniportDriver)
  295.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  296.         Debug-Output "SCSI.INF: Failed to shell RemoveServicesEntry"
  297.         goto finish_DeInstallOption
  298.     endif
  299.  
  300.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  301.         Debug-Output "SCSI.INF: Failed to disable services entry"
  302.         goto finish_DeInstallOption
  303.     endif
  304.  
  305.  
  306.     set Status = STATUS_SUCCESSFUL
  307.  
  308. finish_DeInstallOption =+
  309.     return $(Status)
  310.  
  311.  
  312. [GetInstalledOptions]
  313.     set Status = STATUS_FAILED
  314.     set InstalledOptions = {}
  315.     set InstalledOptionsText = {}
  316.  
  317.     set LanguageList = ^(LanguagesSupported, 1)
  318.     Ifcontains(i) $($0) in $(LanguageList)
  319.     else
  320.         set Status = STATUS_NOLANGUAGE
  321.         goto finish_GetInstalledOptions
  322.     endif
  323.  
  324.     set OptionList = ^(Options, 0)
  325.     ForListDo $(OptionList)
  326.         set MiniportDriver = #(Options, $($), 1)
  327.         set MiniportFile   = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  328.         set FilePath       = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
  329.         LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
  330.         ifstr(i) $(STATUS) == "YES"
  331.             shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  332.             ifint $($ShellCode) == $(!SHELL_CODE_OK)
  333.                 ifstr(i) $($R0) == STATUS_SUCCESSFUL
  334.                     ifstr(i) $($R1) != $(!SERVICE_DISABLED)
  335.  
  336.                         set OptionText = #(OptionsText$($0), $($), 1)
  337.                         set InstalledOptions     = >($(InstalledOptions), $($))
  338.                         set InstalledOptionsText = >($(InstalledOptionsText), $(OptionText))
  339.  
  340.                     endif
  341.                 endif
  342.             endif
  343.         endif
  344.     EndForListDo
  345.     set Status = STATUS_SUCCESSFUL
  346. finish_GetInstalledOptions =+
  347.     Return $(Status) $(InstalledOptions) $(InstalledOptionsText)
  348.  
  349.  
  350. ;**************************************************************************
  351. ; PROGRESS GUAGE VARIABLES
  352. ;**************************************************************************
  353.  
  354. [ProgressCopyENG]
  355.     ProCaption   = "IBMポータブルCDROM ドライバーセットアップ"
  356.     ProCancel    = "キャンセル"
  357.     ProCancelMsg = "Windows NT は正しく組み込まれていません。"+
  358.                    "ファイルのコピーを中止しますか?"
  359.     ProCancelCap = "セットアップ メッセージ"
  360.     ProText1     = "コピー元:"
  361.     ProText2     = "コピー先:"
  362.  
  363. [StringsENG]
  364.     String1 = "IBMポータブルCDROMドライブ"
  365.     String2 = "IBMポータブルCDROMドライバーファイルへのフル パスを入力してください。"+
  366.               "セットアップ ディスケットからファイルを組み込む場合は、"+
  367.               "ドライブ名を含むパス名 (A:\ など) を入力してください。"
  368.     String3 = "削除しますか?"
  369.  
  370. ;[ProgressCopyENG]
  371. ;    ProCaption   = "IBM Portable CD-ROM Driver Setup"
  372. ;    ProCancel    = "Cancel"
  373. ;    ProCancelMsg = "Windows NT is not correctly installed.  Are you sure you want "+
  374. ;                   "to cancel copying files?"
  375. ;    ProCancelCap = "Setup Message"
  376. ;    ProText1     = "Copying:"
  377. ;    ProText2     = "To:"
  378. ;
  379. ;[StringsENG]
  380. ;    String1 = "IBM Portable CD-ROM Drive"
  381. ;    String2 = "Please enter the full path to the IBM PCMCIA Portable "+
  382. ;              "CD-ROM Driver files.  Then choose Continue."
  383. ;    String3 = "Are you sure you want to remove the Adapter?"
  384. ;
  385.  
  386. [Source Media Descriptions]
  387.     1  = "Setup Disk"  , TAGFILE = disk1
  388.  
  389. [Files-ScsiMiniportDrivers]
  390. CD20XRNT = 1,cd20xrnt.sys , SIZE=999
  391.  
  392.  
  393. [RegistryConstants]
  394. MaskAllAccess = 33554432
  395. NoTitle = 0
  396. RegLastError = $(!REG_ERROR_SUCCESS)
  397. Company  =  "IBM"
  398. CD20XCIS = "PCMCIA Portable CD-ROM Drive"
  399. CD20XDrv = "CD20XRNT"
  400.  
  401. [MakeCD20XEntry]
  402. set Status = STATUS_FAILED
  403. read-syms RegistryConstants
  404.  
  405.  
  406. ; Open Service key
  407. Debug-Output "MakeCD20XEntry: Open Services key "
  408. OpenRegKey $(!REG_H_LOCAL) "" "system\"$(!STF_CONTROLSET)"\services" $(MaskAllAccess) ServiceKey
  409. ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  410.    Debug-Output "MakeCD20XEntry: Error in open Services key "
  411.    goto finish_MakeCD20XEntry
  412. endif
  413.  
  414. ; Open Pcmcia\DataBase key
  415. Debug-Output "MakeCD20XEntry: Open Pcmcia\DataBase key "
  416. OpenRegKey $(ServiceKey) "" "Pcmcia\DataBase" $(MaskAllAccess) PcmciaDataBaseKey
  417. ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  418.    Debug-Output "MakeCD20XEntry: Error in open Pcmcia\DataBase key "
  419.    CloseRegKey $(ServiceKey)
  420.    goto finish_MakeCD20XEntry
  421. endif
  422.  
  423. ;
  424. set KeyPath = {{$(Company), $(NoTitle), $(MaskAllAccess)}}
  425. set KeyValue = {}
  426. Debug-Output "MakeCD20XEntry: Create IBM key if not exists "
  427. shell "registry.inf" CreateKey $(PcmciaDataBaseKey) $(KeyPath) $(KeyValue)
  428. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  429.    Debug-Output "Shell Error in creating IBM key "
  430.    goto finish_MakeCD20XEntry
  431. endif
  432. ifint $($R0) != STATUS_SUCCESSFUL
  433.    Debug-Output "Couldn't create IBM key "
  434.    goto finish_MakeCD20XEntry
  435. endif
  436. set IbmKey = $($R1)
  437.  
  438. set KeyPath = {{$(CD20XCIS), $(NoTitle), $(MaskAllAccess)}}
  439. set KeyValue = {{"Driver", $(NoTitle), $(!REG_VT_SZ), $(CD20XDrv)}}
  440. Debug-Output "MakeCD20XEntry: Create CD20X key if not exists "
  441. shell "registry.inf" CreateKey $(IbmKey) $(KeyPath) $(KeyValue)
  442. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  443.    Debug-Output "Shell Error in creatint CD20X key "
  444.    goto finish_MakeCD20XEntry
  445. endif
  446. ifint $($R0) != STATUS_SUCCESSFUL
  447.    Debug-Output "Couldn't create CD20X key "
  448.    goto finish_MakeCD20XEntry
  449. endif
  450.  
  451. set KeyPath = {{$(CD20XCIS), $(NoTitle), $(MaskAllAccess)}}
  452. set KeyValue = {{"DeviceType", $(NoTitle), $(!REG_VT_SZ), "SCSI"}}
  453. Debug-Output "MakeCD20XEntry: Create CD20X DeviceType key if not exists "
  454. shell "registry.inf" CreateKey $(IbmKey) $(KeyPath) $(KeyValue)
  455. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  456.    Debug-Output "Shell Error in creatint CD20X key "
  457.    goto finish_MakeCD20XEntry
  458. endif
  459. ifint $($R0) != STATUS_SUCCESSFUL
  460.    Debug-Output "Couldn't create CD20X DeviceType key "
  461.    goto finish_MakeCD20XEntry
  462. endif
  463.  
  464. set Status = STATUS_SUCCESSFUL
  465. finish_MakeCD20XEntry = +
  466.    Return $(Status)
  467.