home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1996 February / VPR9602A.ISO / pc98 / prnsetup.in_ / prnsetup.inf
INI File  |  1995-10-25  |  8KB  |  197 lines

  1. [PrintersUiVars]
  2.     PrinterINF = "printer.inf"
  3.     PRINTER_ATTRIBUTE_QUEUED        = 1
  4.     PRINTER_ATTRIBUTE_QUEUEDDEFAULT = 5
  5.     PrintersToInstall = {}
  6. [DoPrinterSetup]
  7.     set       Status            = STATUS_FAILED
  8.     read-syms PrintersUiVars
  9.     read-syms Strings$(!STF_LANGUAGE)
  10.     set PrintersToInstall = {}
  11.     set OurINFFile = "printer.inf"
  12.     shell "other.inf", GetOptionsFromINF $(!STF_LANGUAGE) "Printer" $(PrinterINF)
  13.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  14.         set PrinterList     = $($R1)
  15.         set PrinterTextList = $($R2)
  16.         set $R1 = ""
  17.         set $R2 = ""
  18.     else
  19.         EndWait
  20.         shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "FATAL" $(String2)
  21.         StartWait
  22.         goto finish_printer
  23.     endif
  24. printersetup=+
  25.     read-syms PrintersSetupDlg$(!STF_LANGUAGE)
  26.     EndWait
  27.     ui start PrinterSetup
  28.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  29.         ifstr(i) $(EditTextOut) == ""
  30.             set ReInit = NO
  31.             shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(String1)
  32.             goto printersetup
  33.         else
  34.             LibraryProcedure STATUS,$(!LIBHANDLE),AreCharsInString $(EditTextOut) ",\"
  35.             ifstr(i) $(STATUS) == YES
  36.                 set ReInit = NO
  37.                 shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(String8)
  38.                 goto printersetup
  39.             endif
  40.         endif
  41.         StartWait
  42.         set Name           = $(EditTextOut)
  43.         set Port           = $(Combo2Out)
  44.         set Model          = *( $(PrinterList), ~( $(PrinterTextList), $(Combo1Out) ) )
  45.         set Description    = $(Combo1Out)" "$(String3)" "$(Combo2Out)
  46.         set PrintProcessor = "winprint"
  47.         set PrinterAttribute = $(PRINTER_ATTRIBUTE_QUEUEDDEFAULT)
  48.         set Printer = { $(Name),             +
  49.                         $(Port),             +
  50.                         $(Model),            +
  51.                         $(Description),      +
  52.                         $(PrintProcessor),   +
  53.                         $(Attributes)        +
  54.                       }
  55.         set PrintersToInstall = >( $(PrintersToInstall), $(Printer) )
  56.         set Status = STATUS_SUCCESSFUL
  57.         ui pop 1
  58.         goto install_printers
  59.     else-ifstr(i) $(DLGEVENT) == "BACK"
  60.         ifstr(i) $(PrintersToInstall) == {}
  61.             shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" $(String4)
  62.             set Status = STATUS_USERCANCEL
  63.             ui pop 1
  64.             goto finish_printer
  65.         endif
  66.     else-ifstr(i) $(DLGEVENT) == "EXIT"
  67.         shell "subroutn.inf" QueryUserQuit $(!STF_LANGUAGE)
  68.         ifstr(i) $($R1) == "OK"
  69.             set Status = STATUS_USERQUIT
  70.             ui pop 1
  71.             goto finish_printer
  72.         else
  73.             set ReInit = NO
  74.             goto printersetup
  75.         endif
  76.     else
  77.         ui pop 1
  78.         goto finish_printer
  79.     endif
  80. install_printers = +
  81.     ForListDo $(PrintersToInstall)
  82.         set   Model = *($($), 3)
  83.         shell "printer.inf" +
  84.               InstallOption +
  85.                   $(!STF_LANGUAGE) +
  86.                   $(Model) +
  87.                   $(!STF_SRCDIR) +
  88.                   YES +
  89.                   NO  +
  90.                   NO  +
  91.                   {}
  92.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  93.             Debug-Output "Failed to execute install routine in Printer.inf"
  94.             goto finish_printer
  95.         else-ifstr(i) $($R0) != STATUS_SUCCESSFUL
  96.             Debug-Output "Failed to install printer driver"$(Model)
  97.             goto finish_printer
  98.         endif
  99.     EndForListDo
  100.     set Status = STATUS_SUCCESSFUL
  101. finish_printer = +
  102.     StartWait
  103.     Return $(Status) $(PrintersToInstall)
  104. [DoPrinterConfigure]
  105.     set Status = STATUS_SUCCESSFUL
  106.     read-syms Strings$(!STF_LANGUAGE)
  107.     ForListDo $($0)
  108.         set Name             = *($($), 1)
  109.         set Port             = *($($), 2)
  110.         set Model            = *($($), 3)
  111.         set Description      = *($($), 4)
  112.         set PrintProcessor   = *($($), 5)
  113.         set Attribute        = *($($), 6)
  114.         shell "printer.inf" +
  115.                   InstallOption +
  116.                       $(!STF_LANGUAGE) +
  117.                       $(Model) +
  118.                       "" +
  119.                       NO  +
  120.                       NO  +
  121.                       YES +
  122.                       {}
  123.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  124.             Debug-Output "Failed to execute install routine in Printer.inf"
  125.             goto finish_printerconfigure
  126.         else-ifstr(i) $($R0) != STATUS_SUCCESSFUL
  127.             Debug-Output "Failed to configure printer driver"$(Model)
  128.             goto finish_printerconfigure
  129.         endif
  130.         LibraryProcedure STATUS,$(!LIBHANDLE), SetupAddPrinter       +
  131.                                                   $(Name),           +
  132.                                                   $(Port),           +
  133.                                                   $(Model),          +
  134.                                                   $(Description),    +
  135.                                                   $(PrintProcessor), +
  136.                                                   $(Attribute),      +
  137.                                                   $(!STF_PRINTSERVER)
  138.         ifstr(i) $(STATUS) == "ERROR"
  139.             EndWait
  140.             shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(String5)$(Name)$(String7)
  141.             StartWait
  142.             goto finish_printerconfigure
  143.         else-ifstr(i) $(STATUS) == "PRESENT"
  144.             EndWait
  145.             shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(String5)$(Name)$(String6)
  146.             StartWait
  147.         endif
  148.     EndForListDo
  149.     set Status = STATUS_SUCCESSFUL
  150. finish_printerconfigure = +
  151.     return $(Status)
  152. [PrinterPorts]
  153.     "LPT1:"
  154.     "LPT2:"
  155.     "LPT3:"
  156.     "COM1:"
  157.     "COM2:"
  158.     "COM3:"
  159.     "COM4:"
  160.     "FILE:"
  161. [StringsENG]
  162.     String1 = "必要な名前を入力しないと、セットアップは正しく機能しません。"
  163.     String2 = "プリンタのオプションが見つかりませんでした。"
  164.     String3 = "on"
  165.     String4 = "ローカル プリンタがセットアップされていません。Windows NT の組み込み終了後、プリント マネージャを使用してプリンタをセットアップできます。"
  166.     String5 = "プリンタ "
  167.     String6 = " は、すでにコンピュータに組み込まれています。"
  168.     String7 = " をコンピュータに組み込むことができませんでした。"
  169.     String8 = "カンマおよび円記号をプリンタ名に使用することはできません。"+
  170.               "ほかの名前を使用してください。"
  171. [PrintersSetupDlgENG]
  172.     Caption     = "ローカル プリンタのセットアップ"
  173.     DlgText     = "プリンタに名前を割り当ててください (カンマおよび円記号は使用できません)。"+
  174.                   "次に、プリンタのタイプおよび接続先を選択してください。"$(!LF)$(!LF)+
  175.                   "コンピュータにプリンタが接続されていない場合は、[キャンセル]ボタンをクリックしてください。"
  176.     EditLabel   = "プリンタ名(&N):"
  177.     EditTextLim = 32
  178.     EditTextIn  = ""
  179.     EditFocus   = "ALL"
  180.     Combo1Label       = "モデル(&M):"
  181.     Combo2Label       = "接続先(&T):"
  182.     TextFields        = {}
  183.     Continue    = "続行"
  184.     Cancel      = "キャンセル"
  185.     Help        = "ヘルプ(&H)"
  186.     Exit        = "セットアップ中止(&X)"
  187.     DlgType     = Combination
  188.     DlgTemplate = PRINTERS_SETUP
  189.     HelpContext = $(!IDH_DB_PRNSETUP_INS)
  190.     Combo1List        = $(PrinterTextList)
  191.     Combo1Out         = *($(Combo1List), 1)
  192.     Combo2List        = ^(PrinterPorts, 1)
  193.     Combo2Out         = *($(Combo2List), 1)
  194.     ComboListItemsIn  = {Combo1List,Combo2List}
  195.     ComboListItemsOut = {Combo1Out,Combo2Out}
  196.     NotifyFields      = {NO, NO}
  197.