[Identification]
    OptionType = POINTER
[MapOfOptions]
    "MICROSOFT PS2 MOUSE"              = msps2
    "LOGITECH PS2 MOUSE"               = lgps2
    "MICROSOFT INPORT MOUSE"           = msinp
    "MICROSOFT SERIAL MOUSE"           = msser
    "MICROSOFT BALLPOINT SERIAL MOUSE" = msbpser
    "LOGITECH SERIAL MOUSE"            = lgser
    "MICROSOFT BUS MOUSE"              = bus
    NONE                               = none
[PortDrivers]
    i8042prt = !SERVICE_KERNEL_DRIVER, "Keyboard Port", !SERVICE_ERROR_NORMAL, 1, "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\drivers\i8042prt.sys" , 7
    inport   = !SERVICE_KERNEL_DRIVER, "Pointer Port",  !SERVICE_ERROR_NORMAL, 1, "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\drivers\inport.sys"   , 7
    sermouse = !SERVICE_KERNEL_DRIVER, "Pointer Port",  !SERVICE_ERROR_NORMAL, 2, "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\drivers\sermouse.sys" , 7
    busmouse = !SERVICE_KERNEL_DRIVER, "Pointer Port",  !SERVICE_ERROR_NORMAL, 3, "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\drivers\busmouse.sys" , 7
[ClassDrivers]
    mouclass = !SERVICE_KERNEL_DRIVER, "Pointer Class", !SERVICE_ERROR_NORMAL, 1, "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\drivers\mouclass.sys" , 7
[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)
[MapToSupportedOption]
    set Status = STATUS_FAILED
    set MappedOption = $($0)
    set OptionList = ^(MapOfOptions, 0)
    ifcontains $($0) in $(OptionList)
        set MappedOption = #(MapOfOptions, $($0), 1)
    endif
    set Status = STATUS_SUCCESSFUL
    Return $(Status) $(MappedOption)
[ServicesEntry]
    CurrentPortEntry  = "" ? $(!LIBHANDLE) GetDevicemapValue PointerPort  \Device\PointerPort0
    CurrentClassEntry = "" ? $(!LIBHANDLE) GetDevicemapValue PointerClass \Device\PointerClass0
[InstallOption]
    set Status   = STATUS_FAILED
    set DrivesToFree = {}
    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 = ""
    read-syms ServicesEntry
    detect    ServicesEntry
    Debug-Output "POINTER.INF: Current Port Entry is:  "$(CurrentPortEntry)
    Debug-Output "POINTER.INF: Current Class Entry is: "$(CurrentClassEntry)
    set PortDriver  = #(Options, $(Option), 1)
    set ClassDriver = #(Options, $(Option), 2)
    Debug-Output "POINTER.INF: New Port Entry is:      "$(PortDriver)
    Debug-Output "POINTER.INF: New Class Entry is:     "$(ClassDriver)
    ifstr(i) $(Option) == NONE
        set AddCopy = NO
        set DoCopy  = NO
    endif
installtheoption = +
    ifstr(i) $(AddCopy) == "YES"
        set DoActualCopy = NO
        set FileToCheck = #(Files-MousePortDrivers, $(PortDriver), 2)
        LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
        ifstr(i) $(STATUS) == NO
            set DoActualCopy = YES
        else
            set FileToCheck = #(Files-MouseClassDrivers, $(ClassDriver), 2)
            LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
            ifstr(i) $(STATUS) == NO
                set DoActualCopy = YES
            endif
        endif
        ifstr(i) $(DoActualCopy) == NO
            shell "subroutn.inf" DriversExist $($0) $(String1)
            ifint $($ShellCode) != $(!SHELL_CODE_OK)
                Debug-Output "POINTER.INF: shelling DriversExist failed"
                goto finish_InstallOption
            endif
            ifstr(i) $($R0) == STATUS_CURRENT
            else-ifstr(i) $($R0) == STATUS_NEW
                set DoActualCopy = YES
            else-ifstr(i) $($R0) == STATUS_USERCANCEL
                Debug-Output "POINTER.INF: User cancelled Pointer installation"
                goto finish_InstallOption
            else
                Debug-Output "POINTER.INF: Error reported in DriversExist routine in SUBROUTN.INF"
                goto finish_InstallOption
            endif
        endif
        ifstr(i) $(DoActualCopy) == YES
            shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2)
            ifint $($ShellCode) != $(!SHELL_CODE_OK)
                Debug-Output "POINTER.INF: shelling DoAskSourceEx failed"
                goto finish_InstallOption
            endif
            ifstr(i) $($R0) == STATUS_SUCCESSFUL
                set SrcDir = $($R1)
                ifstr(i) $($R2) != ""
                    set DrivesToFree = >($(DrivesToFree), $($R2))
                endif
            else
                Debug-Output "POINTER.INF: User cancelled asking source."
                goto finish_InstallOption
            endif
            install Install-AddCopyOption
            ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
                Debug-Output "POINTER.INF: Adding mouse files to copy list failed"
                goto finish_InstallOption
            endif
        else
            set DoCopy = NO
        endif
    endif
    ifstr(i) $(DoCopy) == "YES"
        read-syms ProgressCopy$($0)
        install Install-DoCopyOption
        ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
            Debug-Output "POINTER.INF: 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"
        shell "registry.inf" CheckSetupModify
        ifint $($ShellCode) != $(!SHELL_CODE_OK)
            goto finish_InstallOption
        endif
        ifstr(i) $($R0) != STATUS_SUCCESSFUL
            goto finish_InstallOption
        endif
        ifstr(i) $(PortDriver) != ""
            set ServiceNode   = $(PortDriver)
            set ServiceBinary = %SystemRoot%\System32\drivers\#(Files-MousePortDrivers, $(PortDriver), 2)
            set Type             = $(#(PortDrivers, $(PortDriver), 1))
            set Group            =   #(PortDrivers, $(PortDriver), 2)
            set ErrorControl     = $(#(PortDrivers, $(PortDriver), 3))
            set Tag              =   #(PortDrivers, $(PortDriver), 4)
            set EventMessageFile =   #(PortDrivers, $(PortDriver), 5)
            set TypesSupported   =   #(PortDrivers, $(PortDriver), 6)
            set ServicesValues   = { +
                    {Type,           0, $(!REG_VT_DWORD),     $(Type)                  }, +
                    {Start,          0, $(!REG_VT_DWORD),     $(!SERVICE_SYSTEM_START) }, +
                    {Group,          0, $(!REG_VT_SZ),        $(Group)                 }, +
                    {ErrorControl,   0, $(!REG_VT_DWORD),     $(ErrorControl)          }, +
                    {Tag,            0, $(!REG_VT_DWORD),     $(Tag)                   }, +
                    {BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary)         }  +
                    }
            set ParametersValues = ""
            set DeviceValues     = {}
            set EventLogValues   = { +
                    {EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, +
                    {TypesSupported,   0, $(!REG_VT_DWORD),     $(TypesSupported)   }  +
                    }
            shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
                                                    $(ServicesValues)   +
                                                    $(ParametersValues) +
                                                    $(DeviceValues)     +
                                                    $(EventLogValues)   +
                                                    Parameters
            ifint $($ShellCode) != $(!SHELL_CODE_OK)
                Debug-Output "POINTER.INF: Couldn't execute MakeServicesEntry in registry.inf"
                goto errorconfig
            endif
            ifstr(i) $($R0) != STATUS_SUCCESSFUL
                Debug-Output "POINTER.INF: MakeServicesEntry failed for pointer"
                goto errorconfig
            endif
        endif
        ifstr(i) $(ClassDriver) != ""
            set ServiceNode   = $(ClassDriver)
            set ServiceBinary = %SystemRoot%\System32\drivers\#(Files-MouseClassDrivers, $(ClassDriver), 2)
            set Type             = $(#(ClassDrivers, $(ClassDriver), 1))
            set Group            =   #(ClassDrivers, $(ClassDriver), 2)
            set ErrorControl     = $(#(ClassDrivers, $(ClassDriver), 3))
            set Tag              =   #(ClassDrivers, $(ClassDriver), 4)
            set EventMessageFile =   #(ClassDrivers, $(ClassDriver), 5)
            set TypesSupported   =   #(ClassDrivers, $(ClassDriver), 6)
            set ServicesValues   = { +
                    {Type,           0, $(!REG_VT_DWORD),     $(Type)                  }, +
                    {Start,          0, $(!REG_VT_DWORD),     $(!SERVICE_SYSTEM_START) }, +
                    {Group,          0, $(!REG_VT_SZ),        $(Group)                 }, +
                    {ErrorControl,   0, $(!REG_VT_DWORD),     $(ErrorControl)          }, +
                    {Tag,            0, $(!REG_VT_DWORD),     $(Tag)                   }, +
                    {BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary)         }  +
                    }
            set ParametersValues = ""
            set DeviceValues     = {}
            set EventLogValues   = { +
                    {EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, +
                    {TypesSupported,   0, $(!REG_VT_DWORD),     $(TypesSupported)   }  +
                    }
            shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
                                                    $(ServicesValues)   +
                                                    $(ParametersValues) +
                                                    $(DeviceValues)     +
                                                    $(EventLogValues)   +
                                                    Parameters
            ifint $($ShellCode) != $(!SHELL_CODE_OK)
                Debug-Output "POINTER.INF: Couldn't execute MakeServicesEntry in registry.inf"
                goto errorconfig
            endif
            ifstr(i) $($R0) != STATUS_SUCCESSFUL
                Debug-Output "POINTER.INF: MakeServicesEntry failed for pointer"
                goto errorconfig
            endif
        endif
        ifstr(i) $(CurrentPortEntry) != $(PortDriver)
            ifstr(i) $(CurrentPortEntry) != ""
                ifstr(i) $(CurrentPortEntry) != i8042prt
                    shell "registry.inf" ModifyServicesEntry $(CurrentPortEntry) $(!SERVICE_DISABLED)
                    ifint $($ShellCode) != $(!SHELL_CODE_OK)
                        Debug-Output "POINTER.INF: Couldn't find DisableServicesEntry in registry.inf"
                        goto errorconfig
                    endif
                    ifstr(i) $($R0) != STATUS_SUCCESSFUL
                        Debug-Output "POINTER.INF: DisableServices entry failed"
                        goto errorconfig
                    endif
                endif
            endif
        endif
        ifstr(i) $(CurrentClassEntry) != $(ClassDriver)
            ifstr(i) $(CurrentClassEntry) != ""
                shell "registry.inf" ModifyServicesEntry $(CurrentClassEntry) $(!SERVICE_DISABLED)
                ifint $($ShellCode) != $(!SHELL_CODE_OK)
                    Debug-Output "POINTER.INF: Couldn't find DisableServicesEntry in registry.inf"
                    goto errorconfig
                endif
                ifstr(i) $($R0) != STATUS_SUCCESSFUL
                    Debug-Output "POINTER.INF: DisableServices entry failed"
                    goto errorconfig
                endif
            endif
        endif
        goto configdone
errorconfig = +
        ifstr(i) $(CurrentPortEntry) != $(PortDriver)
            ifstr(i) $(PortDriver) != ""
                shell "registry.inf" ModifyServicesEntry $(PortDriver) $(!SERVICE_DISABLED)
            endif
            ifstr(i) $(CurrentPortEntry) != ""
                shell "registry.inf" ModifyServicesEntry $(CurrentPortEntry) $(!SERVICE_SYSTEM_START)
            endif
        endif
        ifstr(i) $(CurrentClassEntry) != $(ClassDriver)
            ifstr(i) $(ClassDriver) != ""
                shell "registry.inf" ModifyServicesEntry $(ClassDriver) $(!SERVICE_DISABLED)
            endif
            ifstr(i) $(CurrentClassEntry) != ""
                shell "registry.inf" ModifyServicesEntry $(CurrentClassEntry) $(!SERVICE_SYSTEM_START)
            endif
        endif
        goto finish_InstallOption
configdone = +
    endif
    set Status = STATUS_SUCCESSFUL
finish_InstallOption = +
    ForListDo $(DrivesToFree)
        LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
    EndForListDo
    Return $(Status)
[Install-AddCopyOption]
    set STF_VITAL = ""
    AddSectionKeyFileToCopyList   Files-MousePortDrivers         +
                                  $(PortDriver)                  +
                                  $(SrcDir)                      +
                                  $(!STF_WINDOWSSYSPATH)\drivers
    AddSectionKeyFileToCopyList   Files-MouseClassDrivers         +
                                  $(ClassDriver)                  +
                                  $(SrcDir)                       +
                                  $(!STF_WINDOWSSYSPATH)\drivers
    exit
[Install-DoCopyOption]
    CopyFilesInCopyList
    exit
[Source Media Descriptions]
    1	= "Windows NT Advanced Server Setup Disk #1"   , TAGFILE = disk1
    2	= "Windows NT Advanced Server Setup Disk #2"   , TAGFILE = disk2
    3	= "Windows NT Advanced Server Setup Disk #3"   , TAGFILE = disk3
    4	= "Windows NT Advanced Server Setup Disk #4"   , TAGFILE = disk4
    5	= "Windows NT Advanced Server Setup Disk #5"   , TAGFILE = disk5
    6	= "Windows NT Advanced Server Setup Disk #6"   , TAGFILE = disk6
    7	= "Windows NT Advanced Server Setup Disk #7"   , TAGFILE = disk7
    8	= "Windows NT Advanced Server Setup Disk #8"   , TAGFILE = disk8
    9	= "Windows NT Advanced Server Setup Disk #9"   , TAGFILE = disk9
    10	= "Windows NT Advanced Server Setup Disk #10"  , TAGFILE = disk10
    11	= "Windows NT Advanced Server Setup Disk #11"  , TAGFILE = disk11
    12	= "Windows NT Advanced Server Setup Disk #12"  , TAGFILE = disk12
    13	= "Windows NT Advanced Server Setup Disk #13"  , TAGFILE = disk13
    14	= "Windows NT Advanced Server Setup Disk #14"  , TAGFILE = disk14
    15	= "Windows NT Advanced Server Setup Disk #15"  , TAGFILE = disk15
    16	= "Windows NT Advanced Server Setup Disk #16"  , TAGFILE = disk16
    17	= "Windows NT Advanced Server Setup Disk #17"  , TAGFILE = disk17
    18	= "Windows NT Advanced Server Setup Disk #18"  , TAGFILE = disk18
    19	= "Windows NT Advanced Server Setup Disk #19"  , TAGFILE = disk19
    20	= "Windows NT Advanced Server Setup Disk #20"  , TAGFILE = disk20
    21	= "Windows NT Advanced Server Setup Disk #21"  , TAGFILE = disk21
    22	= "Windows NT Advanced Server Setup Disk #22"  , TAGFILE = disk22
    23	= "Windows NT Advanced Server Setup Disk #23"  , TAGFILE = disk23
    24	= "Windows NT Advanced Server Setup Disk #24"  , TAGFILE = disk24
    25	= "Windows NT Advanced Server Setup Disk #25"  , TAGFILE = disk25
    26	= "Windows NT Advanced Server Setup Disk #26"  , TAGFILE = disk26
    27	= "Windows NT Advanced Server Setup Disk #27"  , TAGFILE = disk27
    28	= "Windows NT Advanced Server Setup Disk #28"  , TAGFILE = disk28
    29	= "Windows NT Advanced Server Setup Disk #29"  , TAGFILE = disk29
[ProductType]
STF_PRODUCT  = LanmanNT
STF_PLATFORM = I386
[Files-MouseClassDrivers]
mouclass = 8,MOUCLASS.SYS , SIZE=17920
[Files-MousePortDrivers]
busmouse = 8,BUSMOUSE.SYS , SIZE=18944
i8042prt = 8,I8042PRT.SYS , SIZE=35328
inport = 8,INPORT.SYS , SIZE=19456
sermouse = 8,SERMOUSE.SYS , SIZE=23552
[LanguagesSupported]
    ENG
[OptionsTextENG]
    msps2   = "Microsoft Mouse Port Mouse (includes BallPoint)"
    lgps2   = "Logitech Mouse Port Mouse"
    msinp   = "Microsoft InPort Bus Mouse"
    msser   = "Microsoft Serial Mouse"
    msbpser = "Microsoft BallPoint Serial Mouse"
    lgser   = "Logitech Serial Mouse"
    bus     = "Microsoft (Green Buttons) or Logitech Bus Mouse"
    none    = "No Mouse or Other Pointing Device"
[Options]
    msps2   = i8042prt  , mouclass
    lgps2   = i8042prt  , mouclass
    msinp   = inport    , mouclass
    msser   = sermouse  , mouclass
    msbpser = sermouse  , mouclass
    lgser   = sermouse  , mouclass
    bus     = busmouse  , mouclass
    none    = ""        , ""
[ProgressCopyENG]
    ProCaption   = "Windows NT Setup"
    ProCancel    = "Cancel"
    ProCancelMsg = "Windows NT is not correcly installed.  Are you sure you want "+
                   "to cancel copying files?"
    ProCancelCap = "Setup Message"
    ProText1     = "Copying:"
    ProText2     = "To:"
[StringsENG]
    String1 = "Mouse"
    String2 = "Please enter the full path to the Windows NT Mouse "+
              "driver files.  If you want to install files from the "+
              "original Setup floppy disks, type a drive letter (such "+
              "as A:) and Setup will prompt you for the correct disk.  "+
              "Then choose Continue."



