home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April (Special) / Chip-Special_1997-04_cd.bin / hp / laserjet / lj803en / lj803en.exe / PRINTER.INF < prev    next >
INI File  |  1996-10-16  |  13KB  |  318 lines

  1. [Identification]
  2.     OptionType = PRINTER
  3. [Options]
  4. "HP LaserJet 6P/6MP - PostScript"       = pscrptui, hplj6p_4,  pscript
  5. [Identify]
  6.     read-syms Identification
  7.     set Status     = STATUS_SUCCESSFUL
  8.     set Identifier   = $(OptionType)
  9.     set Media      = #("Source Media Descriptions", 1, 1)
  10.     Return $(Status) $(Identifier) $(Media)
  11. [ReturnOptions]
  12.     set Status              = STATUS_FAILED
  13.     set OptionList         = {}
  14.     set OptionTextList   = {}
  15.     set LanguageList     = ^(LanguagesSupported, 1)
  16.     Ifcontains(i) $($0) in $(LanguageList)
  17.         goto returnoptions
  18.     else
  19.         set Status = STATUS_NOLANGUAGE
  20.         goto finish_ReturnOptions
  21.     endif
  22. returnoptions = +
  23.     set OptionList     = ^(Options, 0)
  24.     set OptionTextList = ^(OptionsText$($0), 1)
  25.     set Status         = STATUS_SUCCESSFUL
  26. finish_ReturnOptions = +
  27.     Return $(Status) $(OptionList) $(OptionTextList)
  28. [InstallOption]
  29.     set Status   = STATUS_FAILED
  30.     set Option   = $($1)
  31.     set SrcDir   = $($2)
  32.     set AddCopy  = $($3)
  33.     set DoCopy   = $($4)
  34.     set DoConfig = $($5)
  35.     set LanguageList = ^(LanguagesSupported, 1)
  36.     Ifcontains(i) $($0) in $(LanguageList)
  37.     else
  38.         set Status = STATUS_NOLANGUAGE
  39.         goto finish_InstallOption
  40.     endif
  41.     read-syms Strings$($0)
  42.     set OptionList = ^(Options, 0)
  43.     ifcontains $(Option) in $(OptionList)
  44.     else
  45.         goto finish_InstallOption
  46.     endif
  47.     set OptionList = ""
  48.     set ConfigOption = #(Options, $(Option), 1)
  49.     set DataOption   = #(Options, $(Option), 2)
  50.     set DriverOption = #(Options, $(Option), 3)
  51. installtheoption = +
  52.     ifstr(i) $(AddCopy) == "YES"
  53.         install Install-AddCopyOption
  54.         ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
  55.             Debug-Output "Adding video files to copy list failed"
  56.             goto finish_InstallOption
  57.         endif
  58.     endif
  59.     ifstr(i) $(DoCopy) == "YES"
  60.         read-syms ProgressCopy$($0)
  61.         install Install-DoCopyOption
  62.         ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
  63.             Debug-Output "Copying files failed"
  64.             goto finish_InstallOption
  65.         else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
  66.             set Status = STATUS_USERCANCEL
  67.             goto finish_InstallOption
  68.         endif
  69.     endif
  70.     ifstr(i) $(DoConfig) == "YES"
  71.         set DriverPath      = $(!STF_PRNDRIVERPATH)"\"#(Files-PrinterDriver, $(DriverOption), 2)
  72.         set DataFilePath    = $(!STF_PRNDRIVERPATH)"\"#(Files-PrinterData,   $(DataOption),   2)
  73.         set ConfigFilePath  = $(!STF_PRNDRIVERPATH)"\"#(Files-PrinterConfig, $(ConfigOption), 2)
  74.         LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(DriverPath)
  75.         ifstr(i) $(STATUS) == YES
  76.             LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(DataFilePath)
  77.             ifstr(i) $(STATUS) == YES
  78.                 LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(ConfigFilePath)
  79.             endif
  80.         endif
  81.         ifstr(i) $(STATUS) == NO
  82.             set OptionText = #(OptionsText$($0), $(Option), 1)
  83.             shell "subroutn.inf" SetupMessage $($0) "NONFATAL" $(String4)$(OptionText)$(String5)
  84.             Debug-Output "Copying printer files failed"
  85.             goto finish_InstallOption
  86.         endif
  87.         install Install-Configure
  88.         ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
  89.             Debug-Output "Installing printer driver failed"
  90.             goto finish_InstallOption
  91.         else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
  92.             set Status = STATUS_USERCANCEL
  93.             goto finish_InstallOption
  94.         endif
  95.         ifstr(i) $(STATUS) != "ADDED"
  96.             set OptionText = #(OptionsText$($0), $(Option), 1)
  97.             ifstr(i) $(STATUS) == "PRESENT"
  98.                 shell "subroutn.inf" SetupMessage $($0) "NONFATAL" $(String1)$(OptionText)$(String2)
  99.                 set Status = STATUS_SUCCESSFUL
  100.             else-ifstr(i) $(STATUS) == "DENIED"
  101.                 shell "subroutn.inf" SetupMessage $($0) "NONFATAL" $(String6)
  102.             else
  103.                 shell "subroutn.inf" SetupMessage $($0) "NONFATAL" $(String1)$(OptionText)$(String7)
  104.             endif
  105.             goto finish_InstallOption
  106.         endif
  107.     endif
  108.     set Status = STATUS_SUCCESSFUL
  109. finish_InstallOption = +
  110.     Return $(Status)
  111. [Install-AddCopyOption]
  112.     set STF_VITAL = ""
  113.     set STF_OVERWRITE   = "VERIFYSOURCEOLDER"
  114.     AddSectionKeyFileToCopyList   Files-PrinterConfig          +
  115.                                   $(ConfigOption)              +
  116.                                   $(SrcDir)                    +
  117.                                   $(!STF_PRNDRIVERPATH)
  118.     
  119.     ifstr(i) $(!STF_DATAFILEPATH) != "NOT_FOUND"
  120.         AddSectionKeyFileToCopyList   Files-PrinterData            +
  121.                                   $(DataOption)                +
  122.                                   $(!STF_DATAFILEPATH)                    +
  123.                                   $(!STF_PRNDRIVERPATH)
  124.     else
  125.         AddSectionKeyFileToCopyList   Files-PrinterData            +
  126.                                   $(DataOption)                +
  127.                                   $(SrcDir)                         +
  128.                                   $(!STF_PRNDRIVERPATH)
  129.     endif
  130.     
  131.     AddSectionKeyFileToCopyList   Files-PrinterDriver          +
  132.                                   $(DriverOption)              +
  133.                                   $(SrcDir)                    +
  134.                                   $(!STF_PRNDRIVERPATH)
  135.     AddSectionKeyFileToCopyList   Files-PrinterDriverHelp      +
  136.                                   $(DriverOption)              +
  137.                                   $(SrcDir)                    +
  138.                                   $(!STF_PRNDRIVERPATH)
  139.     AddSectionKeyFileToCopyList   Files-PrinterDriverCnt       +
  140.                                   $(DriverOption)              +
  141.                                   $(SrcDir)                    +
  142.                                   $(!STF_PRNDRIVERPATH)
  143.     exit
  144. [Install-DoCopyOption]
  145.     CopyFilesInCopyList
  146.     exit
  147. [Install-Configure]
  148.     set Model       = $(Option)
  149.     set Driver      = #(Files-PrinterDriver, $(DriverOption), 2)
  150.     set DataFile    = #(Files-PrinterData,   $(DataOption),   2)
  151.     set ConfigFile  = #(Files-PrinterConfig, $(ConfigOption), 2)
  152.     LibraryProcedure STATUS,$(!LIBHANDLE), SetupAddPrinterDriver   +
  153.                                                $(Model)            +
  154.                                                $(!STF_PRNENVIRONM) +
  155.                                                $(Driver)           +
  156.                                                $(DataFile)         +
  157.                                                $(ConfigFile)       +
  158.                                                $(!STF_PRINTSERVER)
  159.     exit
  160. [ExternalInstallOption]
  161.     Set !G:DebugOutputControl = 0
  162.     set Exit_Code    = $(!SETUP_ERROR_GENERAL)
  163.     set DrivesToFree = {}
  164.     install LoadSetupLibrary
  165.     ifstr(i)      $(STF_LANGUAGE)  == ""
  166.         goto end
  167.     else-ifstr(i) $(OPTION)        == ""
  168.         goto end
  169.     else-ifstr(i) $(ADDCOPY)       == ""
  170.         goto end
  171.     else-ifstr(i) $(DOCOPY)        == ""
  172.         goto end
  173.     else-ifstr(i) $(DOCONFIG)      == ""
  174.         goto end
  175.     endif
  176.     read-syms PlatformID
  177.     read-syms ProductType
  178.     ifstr(i) $(STF_PLATFORM) == $(PlatformID_I386)
  179.         set STF_PRNPLATFORM = "w32x86"
  180.         set STF_PRNENVIRONM = "Windows NT x86"
  181.     else-ifstr(i) $(STF_PLATFORM) == $(PlatformID_Mips)
  182.         set STF_PRNPLATFORM = "w32mips"
  183.         set STF_PRNENVIRONM = "Windows NT R4000"
  184.     else-ifstr(i) $(STF_PLATFORM) == $(PlatformID_PPC)
  185.         set STF_PRNPLATFORM = "w32ppc"
  186.         set STF_PRNENVIRONM = "Windows NT PowerPC"
  187.     else-ifstr(i) $(STF_PLATFORM) == $(PlatformID_Alpha)
  188.         set STF_PRNPLATFORM = "w32alpha"
  189.         set STF_PRNENVIRONM = "Windows NT Alpha_AXP"
  190.     else
  191.         goto end
  192.     endif
  193.     read-syms UiVars
  194.     detect    UiVars
  195.     read-syms Strings$(STF_LANGUAGE)
  196.     ifstr(i) $(STF_SRCDIR) != $(STF_CWDDIR)
  197.     goto skip_asksource
  198.     endif
  199.     set DataOption   = #(Options, $(!OPTION), 2)
  200.     set DataFilePath    = $(!STF_SRCDIR)"\"#(Files-PrinterData,   $(DataOption),   2)
  201.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(DataFilePath)
  202.     ifstr(i) $(STATUS) == YES
  203.         set STF_DATAFILEPATH = $(!STF_SRCDIR)
  204.     else 
  205.         set STF_DATAFILEPATH = "NOT_FOUND" 
  206.     endif
  207.     set STF_SRCDIR = A:\
  208.     shell "registry.inf" GetNTSource
  209.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  210.     else-ifstr(i) $($R0) != STATUS_SUCCESSFUL
  211.     else
  212.         set STF_SRCDIR = $($R1)
  213.     endif
  214.     shell "subroutn.inf" DoAskSource $(STF_SRCDIR)
  215.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  216.         Debug-Output "shelling DoAskSource failed"
  217.         goto end
  218.     endif
  219.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  220.         set STF_SRCDIR  = $($R1)
  221.         ifstr(i) $($R2) != ""
  222.             set DrivesToFree = >($(DrivesToFree), $($R2))
  223.         endif
  224.     else
  225.         goto end
  226.     endif
  227. skip_asksource = +
  228.     LibraryProcedure IsFullPath, $(!LIBHANDLE), CheckPathFullPathSpec $(STF_PRNDRIVERPATH)
  229.     ifstr(i) $(IsFullPath) == "NO"
  230.         LibraryProcedure STATUS, $(!LIBHANDLE), ProcessForUNC $(STF_PRNDRIVERPATH)
  231.         ifstr(i) $(STATUS) == "ERROR"
  232.             shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(String3)
  233.             goto end
  234.         else-ifstr(i) $(STATUS) == "NOT-UNC"
  235.             shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(String3)
  236.             goto end
  237.         else-ifstr(i) $(STATUS) == "UNC-FAILCONNECT"
  238.             shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(String3)
  239.             goto end
  240.         else
  241.             set STF_PRNDRIVERPATH = $(STATUS)
  242.         endif
  243.     endif
  244.     shell "" InstallOption $(STF_LANGUAGE) $(OPTION) $(STF_SRCDIR) $(ADDCOPY) $(DOCOPY) $(DOCONFIG)
  245.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  246.         Debug-Output "Execing InstallOption failed"
  247.         goto end
  248.     endif
  249.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  250.         set Exit_Code = $(!SETUP_ERROR_SUCCESS)
  251.     else-ifstr(i) $($R0) == STATUS_USERCANCEL
  252.         set Exit_Code = $(!SETUP_ERROR_USERCANCEL)
  253.     endif
  254. end =+
  255.     ForListDo $(DrivesToFree)
  256.         LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
  257.     EndForListDo
  258.     install   FreeSetupLibrary
  259.     exit
  260. [LoadSetupLibrary]
  261.     LoadLibrary "x" $(!STF_CWDDIR)setupdll.dll !LIBHANDLE
  262.     exit
  263. [FreeSetupLibrary]
  264.     FreeLibrary $(!LIBHANDLE)
  265.     exit
  266. [PlatformID]
  267.     PlatformID_I386 = I386
  268.     PlatformID_Mips = Mips
  269.     PlatformID_Alpha  = Alpha
  270.     PlatformID_PPC  = ppc
  271. [UiVars]
  272.     STF_CONTROLSET     = CurrentControlSet
  273.     STF_WINDOWSPATH    = "" ? $(!LIBHANDLE) GetWindowsNtDir
  274.     STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
  275.     STF_PRNDRIVERPATH  = "" ? $(!LIBHANDLE) GetPrinterDriverDir $(!STF_PRINTSERVER) $(!STF_PRNENVIRONM)
  276.     STF_DATAFILEPATH = "NOT_FOUND"
  277. [Source Media Descriptions]
  278.     1 = "HP NT PPDS" , TAGFILE = DISK1.w
  279. [Signature]
  280.     FileType = MICROSOFT_FILE
  281. [GetSignature]
  282.     read-syms Signature
  283.     return $(FileType)
  284. [ProductType]
  285. STF_PRODUCT  = Winnt
  286. STF_PLATFORM = I386
  287. [Files-PrinterConfig]
  288. pscrptui = 1,PSCRPTUI.DLL , SIZE=184592
  289. [Files-PrinterData]
  290. hplj6p_4 = 1,hplj6p_4.ppd , SIZE=21829
  291. [Files-PrinterDriver]
  292. pscript = 1,PSCRIPT.DLL , SIZE=220944
  293. [Files-PrinterDriverCnt]
  294. pscript = 1,PSCRIPT.CNT , SIZE=91
  295. [Files-PrinterDriverHelp]
  296. pscript = 1,PSCRIPT.HLP , SIZE=36434
  297. [LanguagesSupported]
  298.     ENG
  299. [OptionsTextENG]
  300. "HP LaserJet 6P/6MP - PostScript"     = "HP LaserJet 6P/6MP - PostScript"
  301. [StringsENG]
  302.     String1 = "The printer model "
  303.     String2 = " is already installed."
  304.     String3 = "Failed to connect to the print server."
  305.     String4 = "The driver files for the printer model "
  306.     String5 = " couldn't be copied.  Failed to install the printer model."
  307.     String6 = "Access is denied. You must be logged on as a member of the Administrators "+
  308.               "group to carry out this operation."
  309.     String7 = " could not be installed."
  310. [ProgressCopyENG]
  311.     ProCaption   = "Windows NT Setup"
  312.     ProCancel    = "Cancel"
  313.     ProCancelMsg = "Windows NT is not correctly installed.  Are you sure you want "+
  314.                    "to cancel copying files?"
  315.     ProCancelCap = "Setup Message"
  316.     ProText1     = "Copying:"
  317.     ProText2     = "To:"
  318.