In conjunction with using cleanspl.exe to remove printers, printer drivers, and clean the print spooler, you may run into some side effects. One problem I saw was the following error message when trying to install a USB printer:
“Cannot install this hardware. An error occurred during installation. The specified port is unknown.”
Most likely what has happened, since this is a USB printer, the USB port has been removed as well. As long as USBMon.dll is located in your C:Windowssystem32 directory, you can add a registry key and be back in business.
Go to Start, Run… and enter regedit.
Browse to: HKEY_LOCAL_MACHINESystemCurrentControlSetControlPrintMonitors
Right click on the ‘Monitors’ key and choose to export. Save the .reg file somewhere you will be able to find as this will be a backup before we start making changes.
If there is no key for ‘USB Monitor’ under ‘Monitors,’ right-click on ‘Monitors’ and choose New -> Key.
Rename the new key to USB Monitor.
There should be two entries in the USB Monitor key.
The first would most likely be automatically created.
Name: (Default)
Type: REG_SZ
Data: (value not set)
Create the other value under ‘USB Monitor’ by right-clicking in the white space on the right-hand pane. Go to New -> String Value.
Change the name and data to match this:
Name: Driver
Data: usbmon.dll
Restart the computer and this problem should go away and you should be able to install the driver for the USB printer successfully.
If the usbmon.dll is not located in C:Windowssystem32, you might try copying the file from another machine with the same operating system.
Frequently, you might also find that when trying to create a new printer port, the port type ‘Standard TCP/IP Port’ is not listed as an option in the drop-down. You can easily restore this ability in a similar manner.
For this problem, you’ll want to confirm that tcpmon.dll is located in C:WINDOWSsystem32. Still in RegEdit and also at HKEY_LOCAL_MACHINESystemCurrentControlSetControlPrintMonitors, look to see if there is a key under ‘Monitors’ for ‘Standard TCP/IP Port’. If not, create one. In this key, there should be two values. The first would most likely be automatically created.
Name: (Default)
Type: REG_SZ
Data: (value not set)
Create the other value under ‘USB Monitor’ by right-clicking in the white space on the right-hand pane. Go to New -> String Value.
Change the name and data to match this:
Name: Driver
Data: tcpmon.dll
Create a key under ‘Standard TCP/IP Port’ called ‘Ports.’
There will be four values under the ‘Ports’ key.
Name: (Default)
Type: REG_SZ
Data: (value not set)
The other three should be created by right-clicking on the white space in the right-hand pane and choosing New -> DWORD Value. Rename them and change the Data value to match these specifications:
Name: LprAckTimeout
Data: 0x000000b4 (180) (as Hex)
Name: StatusUpdateEnabled
Data: 0x00000001 (1) (as Hex)
Name: StatusUpdateInterval
Data: 0x0000000a (10) (as Hex)
Restart the computer and a Standard TCP/IP Port should again be an option in the drop-down for adding a printer.