home *** CD-ROM | disk | FTP | other *** search
INI File | 1993-07-24 | 7.5 KB | 201 lines |
- [PrintersUiVars]
- PrinterINF = "printer.inf"
- PRINTER_ATTRIBUTE_QUEUED = 1
- PRINTER_ATTRIBUTE_QUEUEDDEFAULT = 5
- PrintersToInstall = {}
- [DoPrinterSetup]
- set Status = STATUS_FAILED
- read-syms PrintersUiVars
- read-syms Strings$(!STF_LANGUAGE)
- set PrintersToInstall = {}
- set OurINFFile = "printer.inf"
- shell "other.inf", GetOptionsFromINF $(!STF_LANGUAGE) "Printer" $(PrinterINF)
- ifstr(i) $($R0) == STATUS_SUCCESSFUL
- set PrinterList = $($R1)
- set PrinterTextList = $($R2)
- set $R1 = ""
- set $R2 = ""
- else
- EndWait
- shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "FATAL" $(String2)
- StartWait
- goto finish_printer
- endif
- printersetup=+
- read-syms PrintersSetupDlg$(!STF_LANGUAGE)
- EndWait
- ui start PrinterSetup
- ifstr(i) $(DLGEVENT) == "CONTINUE"
- ifstr(i) $(EditTextOut) == ""
- set ReInit = NO
- shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(String1)
- goto printersetup
- else
- LibraryProcedure STATUS,$(!LIBHANDLE),AreCharsInString $(EditTextOut) ",\"
- ifstr(i) $(STATUS) == YES
- set ReInit = NO
- shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(String8)
- goto printersetup
- endif
- endif
- StartWait
- set Name = $(EditTextOut)
- set Port = $(Combo2Out)
- set Model = *( $(PrinterList), ~( $(PrinterTextList), $(Combo1Out) ) )
- set Description = $(Combo1Out)" "$(String3)" "$(Combo2Out)
- set PrintProcessor = "winprint"
- set PrinterAttribute = $(PRINTER_ATTRIBUTE_QUEUEDDEFAULT)
- set Printer = { $(Name), +
- $(Port), +
- $(Model), +
- $(Description), +
- $(PrintProcessor), +
- $(Attributes) +
- }
- set PrintersToInstall = >( $(PrintersToInstall), $(Printer) )
- set Status = STATUS_SUCCESSFUL
- ui pop 1
- goto install_printers
- else-ifstr(i) $(DLGEVENT) == "BACK"
- ifstr(i) $(PrintersToInstall) == {}
- shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" $(String4)
- set Status = STATUS_USERCANCEL
- ui pop 1
- goto finish_printer
- endif
- else-ifstr(i) $(DLGEVENT) == "EXIT"
- shell "subroutn.inf" QueryUserQuit $(!STF_LANGUAGE)
- ifstr(i) $($R1) == "OK"
- set Status = STATUS_USERQUIT
- ui pop 1
- goto finish_printer
- else
- set ReInit = NO
- goto printersetup
- endif
- else
- ui pop 1
- goto finish_printer
- endif
- install_printers = +
- ForListDo $(PrintersToInstall)
- set Model = *($($), 3)
- shell "printer.inf" +
- InstallOption +
- $(!STF_LANGUAGE) +
- $(Model) +
- $(!STF_SRCDIR) +
- YES +
- NO +
- NO +
- {}
- ifint $($ShellCode) != $(!SHELL_CODE_OK)
- Debug-Output "Failed to execute install routine in Printer.inf"
- goto finish_printer
- else-ifstr(i) $($R0) != STATUS_SUCCESSFUL
- Debug-Output "Failed to install printer driver"$(Model)
- goto finish_printer
- endif
- EndForListDo
- set Status = STATUS_SUCCESSFUL
- finish_printer = +
- StartWait
- Return $(Status) $(PrintersToInstall)
- [DoPrinterConfigure]
- set Status = STATUS_SUCCESSFUL
- read-syms Strings$(!STF_LANGUAGE)
- ForListDo $($0)
- set Name = *($($), 1)
- set Port = *($($), 2)
- set Model = *($($), 3)
- set Description = *($($), 4)
- set PrintProcessor = *($($), 5)
- set Attribute = *($($), 6)
- shell "printer.inf" +
- InstallOption +
- $(!STF_LANGUAGE) +
- $(Model) +
- "" +
- NO +
- NO +
- YES +
- {}
- ifint $($ShellCode) != $(!SHELL_CODE_OK)
- Debug-Output "Failed to execute install routine in Printer.inf"
- goto finish_printerconfigure
- else-ifstr(i) $($R0) != STATUS_SUCCESSFUL
- Debug-Output "Failed to configure printer driver"$(Model)
- goto finish_printerconfigure
- endif
- LibraryProcedure STATUS,$(!LIBHANDLE), SetupAddPrinter +
- $(Name), +
- $(Port), +
- $(Model), +
- $(Description), +
- $(PrintProcessor), +
- $(Attribute), +
- $(!STF_PRINTSERVER)
- ifstr(i) $(STATUS) == "ERROR"
- EndWait
- shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(String5)$(Name)$(String7)
- StartWait
- goto finish_printerconfigure
- else-ifstr(i) $(STATUS) == "PRESENT"
- EndWait
- shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(String5)$(Name)$(String6)
- StartWait
- endif
- EndForListDo
- set Status = STATUS_SUCCESSFUL
- finish_printerconfigure = +
- return $(Status)
- [PrinterPorts]
- "LPT1:"
- "LPT2:"
- "LPT3:"
- "COM1:"
- "COM2:"
- "COM3:"
- "COM4:"
- "FILE:"
- [StringsENG]
- String1 = "Setup cannot function properly unless you enter the "+
- "name(s) requested."
- String2 = "Failed to find printer options."
- String3 = "on"
- String4 = "No local printer has been set up. You can use Print Manager to set up a printer after Windows NT has been installed."
- String5 = "The printer "
- String6 = " is already installed on your computer."
- String7 = " couldn't be installed on your computer."
- String8 = "Commas and backslashes are not allowed in printer names. Please enter "+
- "a different name."
- [PrintersSetupDlgENG]
- Caption = "Set up Local Printer"
- DlgText = "Assign a name to your printer. (The name should not contain commas or backslashes.)"+
- " Then select its type and the port it is connected to. "$(!LF)$(!LF)+
- "If there is no printer attached to this computer, choose Cancel."
- EditLabel = "Printer &Name:"
- EditTextLim = 32
- EditTextIn = ""
- EditFocus = "ALL"
- Combo1Label = "&Model:"
- Combo2Label = "Print &to:"
- TextFields = {}
- Continue = "Continue"
- Cancel = "Cancel"
- Help = "&Help"
- Exit = "E&xit Setup"
- DlgType = Combination
- DlgTemplate = PRINTERS_SETUP
- HelpContext = $(!IDH_DB_PRNSETUP_INS)
- Combo1List = $(PrinterTextList)
- Combo1Out = *($(Combo1List), 1)
- Combo2List = ^(PrinterPorts, 1)
- Combo2Out = *($(Combo2List), 1)
- ComboListItemsIn = {Combo1List,Combo2List}
- ComboListItemsOut = {Combo1Out,Combo2Out}
- NotifyFields = {NO, NO}
-
-
-
-