[Identification] OptionType = POINTER [MapOfOptions] "PS2 MOUSE" = chps2 "SERIAL MOUSE" = chser1 [PortDrivers] c8042prt = !SERVICE_KERNEL_DRIVER, "Keyboard Port", !SERVICE_ERROR_NORMAL, 1, "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\drivers\c8042prt.sys" , 7 chsermou = !SERVICE_KERNEL_DRIVER, "Pointer Port", !SERVICE_ERROR_NORMAL, 2, "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\drivers\chsermou.sys" , 7 [Shell Commands] Set !G:DebugOutputControl = 1 set-title "Windows NT Mouse Driver Setup" LoadLibrary "x" $(!STF_CWDDIR)\setupdll.dll !LIBHANDLE StartWait set LanguageList = ^(LanguagesSupported, 1) set !STF_LANGUAGE = *($(LanguageList), 1) read-syms Strings$(!STF_LANGUAGE) read-syms UiVars detect UiVars set !STF_NTPATH = $(!STF_WINDOWSSYSPATH) GetDriveInPath !STF_NTDRIVE $(!STF_WINDOWSSYSPATH) shell "subroutn.inf" ReadSetupHelpIds SetHelpFile "setupnt.hlp" $(!MinimumID) $(!MaximumID) read-syms PointerVars detect PointerVars set Option = "Pointer" shell "hardware.inf" InitOptionVars $(!STF_LANGUAGE) $(Option) $($(Option)HardwareDetected) $($(Option)SystemSet) $($(Option)Default) ifstr(i) $($R0) == "STATUS_SUCCESSFUL" set $(Option)OurINFOptions = $($R1) set $(Option)OemINFOptions = $($R2) set $(Option)MergedOptions = $($R3) set $(Option)SpecialOption = $($R4) set $(Option)CurrentOption = $($R5) set $(Option)Option = *($($R5), 1) set $(Option)NewOption = *($($R5), 1) else shell "subroutn.inf" PopBillboard EndWait shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "FATAL" $(String3) StartWait goto end endif EndWait ifstr(i) $(!STF_CWDDIRECT) == "" set $(Option)DisketteSrc = "." else set $(Option)DisketteSrc = $(!STF_CWDDIRECT) endif set DialogText = "Select a Mouse Driver that your mouse used. Then press OK to continue." ;;; shell "other.inf" GetNewOEMOption $(!STF_LANGUAGE) $($(Option)OemINFOptions) $(Option) $($(Option)DisketteSrc) $(DialogText) shell "" GetOEMMouseOption $(!STF_LANGUAGE) $($(Option)OemINFOptions) $(Option) $($(Option)DisketteSrc) $(DialogText) ifstr(i) $($R0) == STATUS_SUCCESSFUL set $(Option)OemINFOptions = $($R1) set $(Option)NewOption = $($R2) set $(Option)DisketteSrc = $($R4) else goto end endif shell "" InstallOption $(!STF_LANGUAGE) $($(Option)NewOption) $($(Option)DisketteSrc) "YES" "YES" "YES" ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "Shelling installOption "$($(Option)NewOption)" in INF "$($(Option)INF)" failed" goto end endif ifstr(i) $($R0) != STATUS_SUCCESSFUL Debug-Output "InstallOption "$($(Option)NewOption)" in INF "$($(Option)INF)" failed" goto end endif end = + FreeLibrary $(!LIBHANDLE) exit ;----------------------------------------------------------------------- ; ; ROUTINE: GetOEMMouseOption ; ; DESCRIPTION: This routine prompts the user for a new OEM file, presents ; the options supported and if the user chooses one of these ; copies over the INF to the windows system directory. ; ; INPUTS: $0: Language to use ; $1: OemOptionList ; $2: OptionType ; $3: OptDisketteSource ; $4: Optional Dialog Text ; ; OUTPUTS: $R0: STATUS: STATUS_SUCCESSFUL | ; STATUS_USERCANCEL | ; STATUS_FAILED | ; ; $R1: NewOemOptionList ; $R2: OemOptionChosen ; $R3: OemOptionChosenText ; $R4: OEMINFSource ; ;------------------------------------------------------------------------ [GetOEMMouseOption] ; set Status = STATUS_FAILED set Option = $($2) set OptDisketteSrc = $($3) set OptionalDlgText = $($4) set OptDiskette = "Mouse Driver" set InfName = "OEMSETUP.INF" set Abb = "ptr" set NewOemOptionList = $($1) set OptionChosen = "" set OptionChosenText = "" ; ; Prompt the user for the diskette containing the INF ; ask_dodiskette = + ; ; Check that the Diskette contains an INF we are looking for ; FlushInf $(InfName) LibraryProcedure FileToCheck, $(!LIBHANDLE), AppendBackSlash $(OptDisketteSrc) set FileToCheck = $(FileToCheck)$(InfName) install Install-SeeIfFileIsPresent set OemSetupFilePath = $(FileToCheck) set NfError = 1 ifstr(i) $(STATUS) == YES set NfError = 2 ; ; Check that the INF represents the option we are looking for ; shell $(OemSetupFilePath) Identify ifstr(i) $($R0) == "STATUS_SUCCESSFUL" ifstr(i) $($R1) == $(Option) ForListDo $(!STF_BUSTYPELIST) shell $(OemSetupFilePath) ReturnOptions $($0) $($) ifstr(i) $($R0) == STATUS_SUCCESSFUL set OemList = $($R1) set OemTextList = $($R2) goto asksingleselection endif EndForListDo endif endif endif ; ; The file isn't in NT format; try the alternate name. ; set Status = STATUS_FAILED goto finish_GetOEMMouseOption ; ; Present the OEM options to the user. Let the user select. If ; the user selects to cancel, don't change anything, just return ; asksingleselection = + shell "other.inf" DoSingleOption $(OemList) $(OemTextList) $(OptDiskette) $(OptionalDlgText) ifstr(i) $($R0) == STATUS_FAILED set Status = STATUS_FAILED goto finish_GetOEMMouseOption else-ifstr(i) $($R0) == STATUS_USERCANCEL set Status = STATUS_USERCANCEL goto finish_GetOEMMouseOption endif set OptionChosen = $($R1) set OptionChosenText = $($R2) ; ; Determine the file name to use to copy over. First see if the INF ; is a duplicate ; set Duplicate = FALSE ForListDo $($1) ifstr(i) *($($), 2) == $(OemList) set OemFileName = *($($), 1) set Duplicate = TRUE FlushInf $(OemFileName) goto copyinf endif EndForListDo ; ; Not a duplicate, we need to copy it under a unique name. ; set Num = 0 nextinf = + ifint $(Num) < 99 set OemFileName = "oem"$(Abb)$(Num)".inf" set FileToCheck = $(!STF_WINDOWSSYSPATH)"\"$(OemFileName) install Install-SeeIfFileIsPresent ifstr(i) $(STATUS) == "YES" set-add Num = $(Num) 1 goto nextinf else goto copyinf endif endif goto finish_GetOEMMouseOption copyinf = + ; ; copy the INF over to the windows system directory ; set OemSrc = $(OemSetupFilePath) set OemDst = $(!STF_WINDOWSSYSPATH)"\"$(OemFileName) install Install-OemINF ; ; form the new oem option list ; ifstr(i) $(Duplicate) == TRUE else set NewOemOptionList = >($(NewOemOptionList), {$(OemFileName), $(OemList), $(OemTextList)}) endif set Status = STATUS_SUCCESSFUL finish_GetOEMMouseOption = + FlushInf $(InfName) Return $(Status) $(NewOemOptionList) $(OptionChosen) $(OptionChosenText) $(OptDisketteSrc) [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] CurrentPortEntry1 = "" ? $(!LIBHANDLE) GetDevicemapValue PointerPort \Device\PointerPort0 CurrentPortEntry2 = "" ? $(!LIBHANDLE) GetDevicemapValue PointerPort \Device\PointerPort1 CurrentPortEntry3 = "" ? $(!LIBHANDLE) GetDevicemapValue PointerPort \Device\PointerPort2 CurrentPortEntry4 = "" ? $(!LIBHANDLE) GetDevicemapValue PointerPort \Device\PointerPort3 [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 set CurrentPortEntryList = {} ifstr(i) $(CurrentPortEntry1) != "" set CurrentPortEntryList = >($(CurrentPortEntryList), $(CurrentPortEntry1)) endif ifstr(i) $(CurrentPortEntry2) != "" set CurrentPortEntryList = >($(CurrentPortEntryList), $(CurrentPortEntry2)) endif ifstr(i) $(CurrentPortEntry3) != "" set CurrentPortEntryList = >($(CurrentPortEntryList), $(CurrentPortEntry3)) endif ifstr(i) $(CurrentPortEntry4) != "" set CurrentPortEntryList = >($(CurrentPortEntryList), $(CurrentPortEntry4)) endif set PortDriver = #(Options, $(Option), 1) Debug-Output "OEMSETUP.INF: New Port Entry is: "$(PortDriver) set CurrentPortEntry = "" ifstr(i) $(PortDriver) == c8042prt ifcontains(i) i8042prt in $(CurrentPortEntryList) set CurrentPortEntry = i8042prt else set CurrentPortEntry = *($(CurrentPortEntryList), 1) endif else set CurrentPortEntry = *($(CurrentPortEntryList), 1) ifstr(i) $(CurrentPortEntry) == i8042prt set CurrentPortEntry = *($(CurrentPortEntryList), 2) endif endif Debug-Output "OEMSETUP.INF: Current Port Entry is: "$(CurrentPortEntry) 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 endif ifstr(i) $(DoActualCopy) == NO shell "subroutn.inf" DriversExist $($0) $(String1) ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "OEMSETUP.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 "OEMSETUP.INF: User cancelled Pointer installation" goto finish_InstallOption else Debug-Output "OEMSETUP.INF: Error reported in DriversExist routine in SUBROUTN.INF" goto finish_InstallOption endif endif ifstr(i) $(DoActualCopy) == YES ifstr(i) $(!STF_CWDDIRECT) == "" shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2) ifint $($ShellCode) != $(!SHELL_CODE_OK) Debug-Output "OEMSETUP.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 "OEMSETUP.INF: User cancelled asking source." goto finish_InstallOption endif endif install Install-AddCopyOption ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS" Debug-Output "OEMSETUP.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 "OEMSETUP.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 = { + {"MouseDataQueueSize", 0, $(!REG_VT_DWORD), 100}, + {"NumberOfButtons", 0, $(!REG_VT_DWORD), 3}, + {"PointerDeviceBaseName", 0, $(!REG_VT_SZ), "PointerPort"} + } ifstr(i) $(PortDriver) == chsermou set ParametersValues = >($(ParametersValues), + {"SampleRate", 0, $(!REG_VT_DWORD), 40}) else set-hextodec Synchronization = 1312d00 set-hextodec PollingIteration = 2ee0 set ParametersValues = >($(ParametersValues), + {"SampleRate", 0, $(!REG_VT_DWORD), 60}) set ParametersValues = >($(ParametersValues), + {"MouseResolution", 0, $(!REG_VT_DWORD), 3}) set ParametersValues = >($(ParametersValues), + {"MouseSynchIn100ns", 0, $(!REG_VT_DWORD), $(Synchronization)}) set ParametersValues = >($(ParametersValues), + {"PollingIterations", 0, $(!REG_VT_DWORD), $(PollingIteration)}) set ParametersValues = >($(ParametersValues), + {"PollingIterationsMaximum", 0, $(!REG_VT_DWORD), $(PollingIteration)}) set ParametersValues = >($(ParametersValues), + {"PollStatusIterations", 0, $(!REG_VT_DWORD), 1}) set ParametersValues = >($(ParametersValues), + {"ResendIterations", 0, $(!REG_VT_DWORD), 3}) set ParametersValues = >($(ParametersValues), + {"KeyboardDataQueueSize", 0, $(!REG_VT_DWORD), 100}) set ParametersValues = >($(ParametersValues), + {"KeyboardDeviceBaseName",0, $(!REG_VT_SZ), "KeyboardPort"}) endif ifstr(i) $(Option) == chser1 set ParametersValues = >($(ParametersValues), + {"OverrideHardwareBitstring", 0, $(!REG_VT_DWORD), 1}) endif 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 "OEMSETUP.INF: Couldn't execute MakeServicesEntry in registry.inf" goto errorconfig endif ifstr(i) $($R0) != STATUS_SUCCESSFUL Debug-Output "OEMSETUP.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 "OEMSETUP.INF: Couldn't find DisableServicesEntry in registry.inf" goto errorconfig endif ifstr(i) $($R0) != STATUS_SUCCESSFUL Debug-Output "OEMSETUP.INF: DisableServices entry failed" goto errorconfig endif ;;; 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 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 exit [Install-DoCopyOption] CopyFilesInCopyList exit [Install-SeeIfFileIsPresent] LibraryProcedure STATUS,$(!LIBHANDLE), CheckFileExistance $(FileToCheck) exit [Install-OemINF] LibraryProcedure STATUS,$(!LIBHANDLE), CopySingleFile $(OemSrc) $(OemDst) exit [Source Media Descriptions] ;;; 1 = "Windows NT Mouse Driver" , TAGFILE = disk1 1 = "Windows NT Mouse Driver" [Signature] FileType = MICROSOFT_FILE [GetSignature] read-syms Signature return $(FileType) [ProductType] STF_PRODUCT = Winnt STF_PLATFORM = I386 [Files-MousePortDrivers] c8042prt = 1,c8042prt.SYS , SIZE=42400 chsermou = 1,chsermou.SYS , SIZE=22336 [LanguagesSupported] ENG [UiVars] STF_NTDRIVE = "" ? $(!LIBHANDLE) GetNtDrive STF_NTPATH = "" ? $(!LIBHANDLE) GetNtDir STF_WINDOWSNTPATH = "" ? $(!LIBHANDLE)GetWindowsPath STF_WINDOWSPATH = "" ? $(!LIBHANDLE) GetWindowsNtDir STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir STF_INSTALL_MODE = "CUSTOM" STF_INSTALL_TYPE = "MAINTENANCE" STF_UPGRADE = "YES" STF_CONTROLSET = "CurrentControlSet" STF_COMPUTERNAME = "" ? $(!LIBHANDLE) GetMyComputerName STF_BUSTYPELIST = "" ? $(!LIBHANDLE) GetMyBusTypeList [PointerVars] PointerHardwareDetected = "" ? $(!LIBHANDLE) GetMyPointerType PointerSystemSet = "" ? $(!LIBHANDLE) GetSelectedPointer PointerDefault = "" PointerOurINFOptions = {} PointerOemINFOptions = {} PointerMergedOptions = {} PointerSpecialOption = {} PointerCurrentOption = {} PointerOptionList = {} PointerOptionTextList = {} PointerOption = {} PointerINF = "" PointerInstall = "NO" PointerSrcDir = "" PointerDstDir = "" [OptionsTextENG] chps2 = "PS/2 Port Mouse" chser1 = "Serial Mouse" [Options] chps2 = c8042prt chser1 = chsermou [ProgressCopyENG] ProCaption = "Windows NT Mouse Deiver 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:" [StringsENG] String1 = "Mouse" String2 = "Please enter the full path to the Windows NT Mouse "+ "Driver files. Then choose Continue." String3 = "Failed to read OEM's INF file."Download Driver Pack
After your driver has been downloaded, follow these simple steps to install it.
Expand the archive file (if the download file is in zip or rar format).
If the expanded file has an .exe extension, double click it and follow the installation instructions.
Otherwise, open Device Manager by right-clicking the Start menu and selecting Device Manager.
Find the device and model you want to update in the device list.
Double-click on it to open the Properties dialog box.
From the Properties dialog box, select the Driver tab.
Click the Update Driver button, then follow the instructions.
Very important: You must reboot your system to ensure that any driver updates have taken effect.
For more help, visit our Driver Support section for step-by-step videos on how to install drivers for every file type.