[Identification]
    OptionType = MONITOR
[Options]
"Local Port"                                        = localmon
"Digital Network Port"                         = decpsmon
"Lexmark DLC Network Port"          = lexmon
"Lexmark TCP/IP Network Port"       = lexlmpm
[Identify]
    read-syms Identification
    set Status     = STATUS_SUCCESSFUL
    set Identifier = $(OptionType)
    set Media      = #("Source Media Descriptions", 1, 1)
    Return $(Status) $(Identifier) $(Media)
[ReturnOptions]
    set Status        = STATUS_FAILED
    set OptionList     = {}
    set OptionTextList = {}
    set LanguageList = ^(LanguagesSupported, 1)
    Ifcontains(i) $($0) in $(LanguageList)
        goto returnoptions
    else
        set Status = STATUS_NOLANGUAGE
        goto finish_ReturnOptions
    endif
returnoptions = +
    set OptionList     = ^(Options, 0)
    set OptionTextList = ^(OptionsText$($0), 1)
    set Status         = STATUS_SUCCESSFUL
finish_ReturnOptions = +
    Return $(Status) $(OptionList) $(OptionTextList)
[InstallOption]
    set Status   = STATUS_FAILED
    set Option   = $($1)
    set SrcDir   = $($2)
    set AddCopy  = $($3)
    set DoCopy   = $($4)
    set DoConfig = $($5)
    set LanguageList = ^(LanguagesSupported, 1)
    Ifcontains(i) $($0) in $(LanguageList)
    else
        set Status = STATUS_NOLANGUAGE
        goto finish_InstallOption
    endif
    read-syms Strings$($0)
    set OptionList = ^(Options, 0)
    ifcontains $(Option) in $(OptionList)
    else
        goto finish_InstallOption
    endif
    set OptionList = ""
    set MonitorOption = #(Options, $(Option), 1)
installtheoption = +
    ifstr(i) $(AddCopy) == "YES"
        install Install-AddCopyOption
        ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
            Debug-Output "Adding video files to copy list failed"
            goto finish_InstallOption
        endif
    endif
    ifstr(i) $(DoCopy) == "YES"
        read-syms ProgressCopy$($0)
        install Install-DoCopyOption
        ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
            Debug-Output "Copying files failed"
            goto finish_InstallOption
        else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
            set Status = STATUS_USERCANCEL
            goto finish_InstallOption
        endif
    endif
    ifstr(i) $(DoConfig) == "YES"
        set MonitorPath      = $(!STF_PRNMONITORPATH)"\"#(Files-PrinterMonitor, $(MonitorOption), 2)
        LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(MonitorPath)
        ifstr(i) $(STATUS) == NO
            set OptionText = #(OptionsText$($0), $(Option), 1)
            shell "subroutn.inf" SetupMessage $($0) "NONFATAL" $(String4)$(OptionText)$(String5)
            Debug-Output "Copying printer files failed"
            goto finish_InstallOption
        endif
        install Install-Configure
        ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
            Debug-Output "Installing printer monitor failed"
            goto finish_InstallOption
        else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
            set Status = STATUS_USERCANCEL
            goto finish_InstallOption
        endif
        ifstr(i) $(STATUS) != "ADDED"
            set OptionText = #(OptionsText$($0), $(Option), 1)
            ifstr(i) $(STATUS) == "PRESENT"
                shell "subroutn.inf" SetupMessage $($0) "NONFATAL" $(String1)$(OptionText)$(String2)
                set Status = STATUS_SUCCESSFUL
            else-ifstr(i) $(STATUS) == "DENIED"
                shell "subroutn.inf" SetupMessage $($0) "NONFATAL" $(String6)
            else
                shell "subroutn.inf" SetupMessage $($0) "NONFATAL" $(String1)$(OptionText)$(String7)
            endif
            goto finish_InstallOption
        endif
    endif
    set Status = STATUS_SUCCESSFUL
finish_InstallOption = +
    Return $(Status)
[Install-AddCopyOption]
    set STF_VITAL = ""
    set STF_OVERWRITE   = "VERIFYSOURCEOLDER"
    AddSectionKeyFileToCopyList   Files-PrinterMonitor          +
                                  $(MonitorOption)              +
                                  $(SrcDir)                    +
                                  $(!STF_PRNMONITORPATH)
    set KeyList = ^( PrinterMonitorsWithHelp, 1 )
    ifcontains(i) $(MonitorOption) in $(KeyList)
        AddSectionKeyFileToCopyList   Files-PrinterMonitorHelp      +
                                      $(MonitorOption)              +
                                      $(SrcDir)                    +
                                      $(!STF_PRNMONITORPATH)
    endif
    ifstr(i) $(MonitorOption) == "lexmon"
        AddSectionFilesToCopyList Files-$(MonitorOption) $(SrcDir) $(!STF_PRNMONITORPATH)
    endif
    ifstr(i) $(MonitorOption) == "lexlmpm"
        AddSectionFilesToCopyList Files-$(MonitorOption) $(SrcDir) $(!STF_PRNMONITORPATH)
        LoadLibrary "" $(SrcDir)mvntinst.dll !LIBMVINSTHANDLE
        LibraryProcedure Directory $(!LIBMVINSTHANDLE), GetMarkVisionDirectory
        set !MVDirectory = $(Directory)
        AddSectionFilesToCopyList Files-MarkVision $(SrcDir) $(!MVDirectory)
    endif
    exit
[Install-DoCopyOption]
    CopyFilesInCopyList
    exit
[Install-Configure]
    ifstr(i) $(MonitorOption) == "lexmon"
        LoadLibrary "" $(!STF_CWDDIR)lexcfg.cpl !LIBCFGHANDLE
        LibraryProcedure STATUS  $(!LIBCFGHANDLE), CreateInteractShortcut
        LibraryProcedure STATUS, $(!LIBCFGHANDLE), LexCfgInf
        FreeLibrary $(!LIBCFGHANDLE)
    endif
    set Model       = $(Option)
    set Monitor      = #(Files-PrinterMonitor, $(MonitorOption), 2)
    LibraryProcedure STATUS,$(!LIBHANDLE), SetupAddPrinterMonitor   +
                                               $(Model)            +
                                               $(!STF_PRNENVIRONM) +
                                               $(Monitor)           +
                                               $(!STF_PRINTSERVER)
    ifstr(i) $(MonitorOption) == "lexlmpm"
       LibraryProcedure Result, $(!LIBMVINSTHANDLE), CreateMVRegistryEntries
    endif
    ifstr(i) $(MonitorOption) == "lexlmpm"
       LibraryProcedure Result, $(!LIBMVINSTHANDLE), CreateMVShortcut
    endif
    ifstr(i) $(MonitorOption) == "lexlmpm"
       FreeLibrary $(!LIBMVINSTHANDLE)
    endif
    exit
[ExternalInstallOption]
    Set !G:DebugOutputControl = 0
    set Exit_Code    = $(!SETUP_ERROR_GENERAL)
    set DrivesToFree = {}
    install LoadSetupLibrary
    ifstr(i)      $(STF_LANGUAGE)  == ""
        goto end
    else-ifstr(i) $(OPTION)        == ""
        goto end
    else-ifstr(i) $(ADDCOPY)       == ""
        goto end
    else-ifstr(i) $(DOCOPY)        == ""
        goto end
    else-ifstr(i) $(DOCONFIG)      == ""
        goto end
    endif
    read-syms PlatformID
    read-syms ProductType
    ifstr(i) $(STF_PLATFORM) == $(PlatformID_I386)
        set STF_PRNPLATFORM = "w32x86"
        set STF_PRNENVIRONM = "Windows NT x86"
    else-ifstr(i) $(STF_PLATFORM) == $(PlatformID_Mips)
        set STF_PRNPLATFORM = "w32mips"
        set STF_PRNENVIRONM = "Windows NT R4000"
    else-ifstr(i) $(STF_PLATFORM) == $(PlatformID_PPC)
        set STF_PRNPLATFORM = "w32ppc"
        set STF_PRNENVIRONM = "Windows NT PowerPC"
    else-ifstr(i) $(STF_PLATFORM) == $(PlatformID_Alpha)
        set STF_PRNPLATFORM = "w32alpha"
        set STF_PRNENVIRONM = "Windows NT Alpha_AXP"
    else
        goto end
    endif
    read-syms UiVars
    detect    UiVars
    read-syms Strings$(STF_LANGUAGE)
    ifstr(i) $(STF_SRCDIR) != $(STF_CWDDIR)
        goto skip_asksource
    endif
    set STF_SRCDIR = A:\
    shell "registry.inf" GetNTSource
    ifint $($ShellCode) != $(!SHELL_CODE_OK)
    else-ifstr(i) $($R0) != STATUS_SUCCESSFUL
    else
        set STF_SRCDIR = $($R1)
    endif
    read-syms LexmarkVars
    debug-output $(OPTION)
    Split-String $(STF_SRCDIR) "\" SrcDirList
    set TestItem = *( $(SrcDirList), 3 )
    ifstr(i) $(TestItem) == $(STF_PLATFORM)
       set STF_SRCDIR = *( $(SrcDirList), 1 )"\"
    endif
    set TempSrcDir = $(STF_SRCDIR)"LexmarkBackSlashTest"
    Split-String $(TempSrcDir) "\" SrcDirList
    QueryListSize ListSize $(SrcDirList)
    set TestItem = *( $(SrcDirList), $(ListSize) )
    ifstr(i) $(TestItem) != "LexmarkBackSlashTest"
       set STF_SRCDIR = $(STF_SRCDIR)"\"
    endif
    ifstr(i) $(OPTION) == $(LexDLCOption)
       ifstr(i) $(STF_PLATFORM) == $(PlatformID_I386)
          set STF_SRCDIR = $(STF_SRCDIR)$(LexSrcDir)"\x86\"
       else
          set STF_SRCDIR = $(STF_SRCDIR)$(LexSrcDir)"\"$(STF_PLATFORM)"\"
       endif
       set LexmarkFile = $(STF_SRCDIR)$(LexDLCFile)
       debug-output $(STF_SRCDIR)
       debug-output $(LexmarkFile)
       LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(LexmarkFile)
       ifstr(i) $(STATUS) == YES
          debug-output $(LexmarkFile)" exists"
          goto skip_asksource
       else
          debug-output $(LexmarkFile)" does not exist"
       endif
    else-ifstr(i) $(OPTION) == $(LexIPOption)
       ifstr(i) $(STF_PLATFORM) == $(PlatformID_I386)
          set STF_SRCDIR = $(STF_SRCDIR)$(LexSrcDir)"\x86\"
       else
          set STF_SRCDIR = $(STF_SRCDIR)$(LexSrcDir)"\"$(STF_PLATFORM)"\"
       endif
       set LexmarkFile = $(STF_SRCDIR)$(LexIPFile)
       debug-output $(STF_SRCDIR)
       debug-output $(LexmarkFile)
       LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(LexmarkFile)
       ifstr(i) $(STATUS) == YES
          debug-output $(LexmarkFile)" exists"
          goto skip_asksource
       else
          debug-output $(LexmarkFile)" does not exist"
       endif
    endif
    shell "subroutn.inf" DoAskSource $(STF_SRCDIR)
    ifint $($ShellCode) != $(!SHELL_CODE_OK)
        Debug-Output "shelling DoAskSource failed"
        goto end
    endif
    ifstr(i) $($R0) == STATUS_SUCCESSFUL
        set STF_SRCDIR  = $($R1)
        ifstr(i) $($R2) != ""
            set DrivesToFree = >($(DrivesToFree), $($R2))
        endif
    else
        goto end
    endif
skip_asksource = +
    LibraryProcedure IsFullPath, $(!LIBHANDLE), CheckPathFullPathSpec $(STF_PRNMONITORPATH)
    ifstr(i) $(IsFullPath) == "NO"
        LibraryProcedure STATUS, $(!LIBHANDLE), ProcessForUNC $(STF_PRNMONITORPATH)
        ifstr(i) $(STATUS) == "ERROR"
            shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(String3)
            goto end
        else-ifstr(i) $(STATUS) == "NOT-UNC"
            shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(String3)
            goto end
        else-ifstr(i) $(STATUS) == "UNC-FAILCONNECT"
            shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(String3)
            goto end
        else
            set STF_PRNMONITORPATH = $(STATUS)
        endif
    endif
    shell "" InstallOption $(STF_LANGUAGE) $(OPTION) $(STF_SRCDIR) $(ADDCOPY) $(DOCOPY) $(DOCONFIG)
    ifint $($ShellCode) != $(!SHELL_CODE_OK)
        Debug-Output "Execing InstallOption failed"
        goto end
    endif
    ifstr(i) $($R0) == STATUS_SUCCESSFUL
        set Exit_Code = $(!SETUP_ERROR_SUCCESS)
    else-ifstr(i) $($R0) == STATUS_USERCANCEL
        set Exit_Code = $(!SETUP_ERROR_USERCANCEL)
    endif
end =+
    ForListDo $(DrivesToFree)
        LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
    EndForListDo
    install   FreeSetupLibrary
    exit
[LoadSetupLibrary]
    LoadLibrary "x" $(!STF_CWDDIR)setupdll.dll !LIBHANDLE
    exit
[FreeSetupLibrary]
    FreeLibrary $(!LIBHANDLE)
    exit
[PlatformID]
    PlatformID_PPC = ppc
    PlatformID_I386 = I386
    PlatformID_Mips = Mips
    PlatformID_Alpha  = Alpha
[UiVars]
    STF_CONTROLSET     = CurrentControlSet
    STF_WINDOWSPATH    = "" ? $(!LIBHANDLE) GetWindowsNtDir
    STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
     STF_PRNMONITORPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
[LexmarkVars]
   LexDLCOption = "Lexmark DLC Network Port"
   LexDLCFile   = "lexmon.dll"
   LexIPOption  = "Lexmark TCP/IP Network Port"
   LexIPFile    = "lexlmpm.dll"
   LexSrcDir    = "drvlib\print\lexmark"
[PrinterMonitorsWithHelp]
   decpsmon
   lexmon
[Source Media Descriptions]
    1 = "Windows NT Workstation CD-ROM" , TAGFILE = cdrom_w.45
[Signature]
    FileType = MICROSOFT_FILE
[GetSignature]
    read-syms Signature
    return $(FileType)
[ProductType]
STF_PRODUCT  = Winnt
STF_PLATFORM = I386
[Files-lexlmpm]
1,LEXBCE.DLL , SIZE=999
1,LEXBCELM.DLL , SIZE=999
1,LEXIP32.DLL , SIZE=999
1,LEXLL32.DLL , SIZE=999
1,LEXNETUI.CNT , SIZE=999
1,LEXNETUI.DLL , SIZE=999
1,LEXNETUI.HLP , SIZE=999
1,LEXSTART.EXE , SIZE=999
1,MVFILES.LST , SIZE=999
1,MVNTINST.DLL , SIZE=999
1,MVUNINST.EXE , SIZE=999
[Files-lexmon]
1,INTERACT.DLL , SIZE=999
1,INTERACT.EXE , SIZE=999
1,INTERACT.HLP , SIZE=999
1,LEXCFG.CPL , SIZE=999
1,LEXCFG.HLP , SIZE=999
1,LEXLANG.DLL , SIZE=999
[Files-MarkVision]
1,AGGUIDLL.DLL , SIZE=999
1,AGPRTGUI.DLL , SIZE=999
1,CDCF.WAV     , SIZE=999
1,COMMON.DLL   , SIZE=999
1,CPEF.WAV     , SIZE=999
1,CPF.WAV      , SIZE=999
1,CPJF.WAV     , SIZE=999
1,DEFAULTS.PSF , SIZE=999
1,DFF.WAV      , SIZE=999
1,FFF.WAV      , SIZE=999
1,LEXMV95.HLP  , SIZE=999
1,LPEF.WAV     , SIZE=999
1,MARKVIS.CNT  , SIZE=999
1,MARKVIS.EXE  , SIZE=999
1,MARKVIS.HLP  , SIZE=999
1,MFF.WAV      , SIZE=999
1,MVGUIDLL.DLL , SIZE=999
1,MVPO_SUN.DLL , SIZE=999
1,MVPO_WRI.DLL , SIZE=999
1,MVPRM.DLL    , SIZE=999
1,MVPRTGUI.DLL , SIZE=999
1,MVPRTMGR.DLL , SIZE=999
1,MVPRTOBJ.DLL , SIZE=999
1,MVRESDLL.DLL , SIZE=999
1,OBFF.WAV     , SIZE=999
1,OPTRADEF.PSF , SIZE=999
1,OPTRAE.HLP   , SIZE=999
1,OPTRCDEF.PSF , SIZE=999
1,OPTRPDEF.PSF , SIZE=999
1,PNUIF.WAV    , SIZE=999
1,PRINTREE.DLL , SIZE=999
1,RESOURCE.HLP , SIZE=999
1,RPSF.WAV     , SIZE=999
1,RTCF.WAV     , SIZE=999
1,SFGUIDLL.DLL , SIZE=999
1,SFPRTGUI.DLL , SIZE=999
1,SPF.WAV      , SIZE=999
1,TCOF.WAV     , SIZE=999
1,TYF.WAV      , SIZE=999
1,VERIFY.TXT   , SIZE=999
[Files-PrinterMonitor]
decpsmon = 1,DECPSMON.DLL , SIZE=999
hpmon = 1,HPMON.DLL , SIZE=999
lexlmpm = 1,LEXLMPM.DLL , SIZE=999
lexmon = 1,LEXMON.DLL , SIZE=999
localmon = 1,LOCALMON.DLL , SIZE=999
[Files-PrinterMonitorHelp]
decpsmon = 1,DECPSMON.HLP , SIZE=999
hpmon = 1,HPMON.HLP , SIZE=999
lexmon = 1,LEXMON.HLP , SIZE=999
[LanguagesSupported]
    ENG
[OptionsTextENG]
"Local Port"                                 = "Local Port"
"Digital Network Port"                  = "Digital Network Port"
"Lexmark DLC Network Port"     = "Lexmark DLC Network Port"
"Lexmark TCP/IP Network Port"  = "Lexmark TCP/IP Network Port"
[StringsENG]
    String1 = "The monitor "
    String2 = " is already installed."
    String3 = "Failed to connect to the print server."
    String4 = "The monitor files for the selected monitor "
    String5 = " couldn't be copied.  Failed to install the monitor."
    String6 = "Access is denied. You must be logged on as a member of the Administrators "+
              "group to carry out this operation."
    String7 = " could not be installed."
[ProgressCopyENG]
    ProCaption   = "Windows NT Setup"
    ProCancel    = "Cancel"
    ProCancelMsg = "Windows NT is not correctly installed.  Are you sure you want "+
                   "to cancel copying files?"
    ProCancelCap = "Setup Message"
    ProText1     = "Copying:"
    ProText2     = "To:"
