Error 0x80070490 or 0x00000490 when attempting to connect to a Printer queue on a Windows Print Server

System Requirements:

  • Windows Vista, 7, 8, 8.1,10
  • Windows Server 2008, 2008 R2, 2012, 2012 R2

The Problem:

I was having some problems automating the connection to a printer queue from a set of managed Windows 7 systems to foreign Windows Server managed SafeCom printer queue. The device in question was a generic follow-me Printing queue for Xerox Workcentre 7655 devices (not that it is especially relevant).

On opening the SMB share to the print server and connecting to the printer queue, the system would go off for 60 seconds before coming back with error 0x00000490 and no description.

Exploration of this error in event viewer under Event Viewer > Applications and Services > Microsoft > Windows > PrintService > Admin reveals:

Installing printer driver Xerox GPD PS V3.2.303.16.0 failed, error code 0x490, HRESULT 0x80070490. See the event user data for context information.

The only additional information available in the user data of any substance was either

Parse Inf
ProcessDriverDependencies failed

or

PerformInfInstallActions
ParseInf failed

More Info

I also tried the following recommendations from general troubleshooting/elsewhere:

  1. Attempting to manually install the driver didn’t help
  2. Using pnputil -d to delete the driver oemXX.inf didn’t help (i.e. clearing the driver out of C:\Windows\System32\DriverStore\FileRepository)
  3. Using pnputil -a to manually add the desired driver didn’t help
  4. Using the Print Management MMC snap-in to flush the driver out (including renaming any reference dll’s under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Print Processors\winprint to xxx.old and restarting the print server to allow the deletion of stuck print drivers) didn’t help
  5. Obtaining older and new drivers from Xerox didn’t help
  6. The Microsoft Printer Troubleshooter tool
    View: Fixing Printer Problems
  7. Enabling the Operational log under Event Viewer > Applications and Services > Microsoft > Windows > PrintService didn’t add anything significant to the troubleshooting process just:
    ParseInfAndCommitFileQueue
    PerformInfInstallActions failedProcessDriverDependencies
    FindLatestCoreDrivers failed
  8. Checking setupapi.app.log and setupapi.dev.log for errors under C:\Windows\inf did not show any errors, everything was reporting ‘success’

The Fix

In downloading and installing the older version of the print driver, event viewer was showing an identical error for the driver install to that shown when displaying the error for the install of the most up to date driver version, however comparing the source driver files to the destination files that appeared after repository injection in C:\Windows\System32\DriverStore\FileRepository revealed some slight differences in file dates, the print server was sending slightly modified versions of the driver compared to the vanilla Xerox source of the same version number (2015 file dates for a 2013 Xerox driver package).

Some sleuthing through monitoring tools ultimately presented the cause of the issue and ultimately its fix. Windows was downloading the driver package from the target foreign print server (with its modified files) and injecting it into the repository correctly. Immediately afterwards however it was going off to our internal, public driver repository (a SMB share on a build server) and finding additional copies of a compatible x64 Xerox driver, finding that they were newer and then attempting to use the newer driver.

Without the driver customisation’s (presumably part of the SafeCom suite configuration for follow-me printing) the print server was immediately rejecting the connection.

So the lesson from this experience was that even if you are explicitly telling Windows to use a specific driver version, if it can find a newer version in a driver search path, it will attempt to pick it up and use it instead. Remove any media with drivers (UFD, CD, DVD, Floppy) and check/modify you driver search paths for conflicting drivers as listed in:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\DevicePath

0x80090020 when attempting to load a .PFX Private Key Certificate into a CAPICOM_MEMORY_STORE using Store.Load() or Certificate.Load() using CAPICOM 2.1.0.2

System Requirements:

  • Windows Server 2008, R2
  • Windows Vista
  • Windows 7
  • Windows 8, 8.1
  • 7.0, 7.5, 8.0
  • ASP 3.0 (Classic)
  • CAPICOM 2.1.0.2

The Problem:

Ah encryption, that most noble of things. One thing that is sure to drive every developer close to the brink on the odd occasion. The one time where clear, concise API documentation should be considered mandatory – and the one place where good API documentation it seems is an obligation itself not to provide. Be it Microsoft, Java, BouncyCastle, PHP it would seem they are all blighted with the same issue.

Attempting to use legacy API on an unsupported platform should seem like an exercise in masochism, however, you know how much I like to avoid using .net whenever I can.

If you attempt to do this

Dim cert
set cert = Server.CreateObject("CAPICOM.Certificate")
call cert.load("c:\myPrivateKey.pfx", "test", CAPICOM_KEY_STORAGE_EXPORTABLE)

or this

const CAPICOM_MEMORY_STORE = 0
const CAPICOM_LOCAL_MACHINE_STORE = 1
const CAPICOM_STORE_OPEN_READ_WRITE = 1
const CAPICOM_KEY_STORAGE_EXPORTABLE = 1Dim store
set store = Server.CreateObject("CAPICOM.Store")
call store.Open(CAPICOM_MEMORY_STORE, "MemoryStore1", CAPICOM_STORE_OPEN_READ_WRITE)
call store.load("c:\myPrivateKey.pfx", "test", CAPICOM_KEY_STORAGE_EXPORTABLE)

you will get back

error '80090020'
/file.asp, line ###

If you send in a .cer file instead of a .pfx, it works without error but doesn’t allow you to access the Private Key.

More Info

Taking the two code samples in order

Dim cert
set cert = Server.CreateObject("CAPICOM.Certificate")
call cert.load("c:\myPrivateKey.pfx", "test", CAPICOM_KEY_STORAGE_EXPORTABLE)

Should you be getting a 0x80070056 error, your password is wrong. If the file doesn’t have a password, only send parameter 1 (which is about to cause you a problem). To resolve the 0x80090020 error while using a CAPICOM_MEMORY_STORE, you need to stop CAPICOM from attempting to insert the certificate as a resource for a user. If the IIS worker process that you are using doesn’t connect to a user account and has no permissions, the default parameter CAPICOM_CURRENT_USER_KEY or 0 will throw 0x80090020.

To change the scope, ensure that you use the fourth parameter and set the value to CAPICOM_LOCAL_MACHINE_KEY.

const CAPICOM_CURRENT_USER_KEY = 0
const CAPICOM_LOCAL_MACHINE_KEY = 1Dim cert
set cert = Server.CreateObject("CAPICOM.Certificate")
call cert.load("c:\myPrivateKey.pfx", "test", CAPICOM_KEY_STORAGE_EXPORTABLE, CAPICOM_LOCAL_MACHINE_KEY)

To resolve the second issue, modify the original code to make use of the now fixed certificate.load() call and import it vie the long route.

const CAPICOM_MEMORY_STORE = 0
const CAPICOM_LOCAL_MACHINE_STORE = 1
const CAPICOM_STORE_OPEN_READ_WRITE = 1
const CAPICOM_KEY_STORAGE_EXPORTABLE = 1Dim cert
Dim store
set store = Server.CreateObject("CAPICOM.Store")
call store.Open(CAPICOM_MEMORY_STORE, "MemoryStore1", CAPICOM_STORE_OPEN_READ_WRITE)set cert = Server.CreateObject("CAPICOM.Certificate")
call cert.load("c:\myPrivateKey.pfx", "test", CAPICOM_KEY_STORAGE_EXPORTABLE, CAPICOM_LOCAL_MACHINE_KEY)

call store.add(cert)

If you receive 0x80070005, you are either getting an Access Denied error to the MEMORY_STORE or you are attempting to import a certificate into the instantiated store which already exists. Similarly, if you receive 0x80070056, your password is wrong.

The Samsung Universal Print Driver causes the printer to print documents without white space, including paragraph whitespace, breaks, page margins and header footer margins

System Requirements:

  • Samsung CLP-300N
  • Samsung Universal Print Driver

The Problem:

It’s a Samsung printer driver problem reprise! For those not familiar with the self evident truth that Samsung have never quite managed to develop a competency in writing printer drivers, you may with to familiarise yourself with the last inexplicable printer driver problem that I found and just how unhelpful Samsung themselves were about my trying to report it to them.

The latest native driver for the CLP-300N is a release from the 20th October 2009. It is also possible to get it working via Windows Update using this driver under Windows 7. However, for the last year I have been experiencing a problem: Microsoft Word will not print unless it is in greyscale.

I’ve tried uninstalling the print drivers, altering the default and enforced printer settings – all of which are set to colour – and the instant you leave the printer configuration dialogue in Word 2010, the driver resets back to greyscale. Inexplicable and a problem that is not present in other applications; including other parts of Office 2010, Adobe reader etc.

My short-term fix was to print to PDF and then print from Adobe Reader directly to the CLP-300N. However this afternoon I was annoyed enough by it to fix it.

It’s obviously the driver. So I took it off again and ever hopeful attempted to see if there was a new Samsung driver – there wasn’t. Yet I did notice that like most printer manufacturers, the vogue at present is to offer universal PCL print drivers, for which the CLP-300N downloads page on Samsung.com did offer a 2013-03-09 (2013-03-15 signed) driver reportedly of version 2.50.02.00.03.

Fantastic! It fixed the problem and Word 2010 now printed in colour for the first time in a year without even a reboot. Except…

If we pretend that this was my document

<header>

Dear Sir,

Bla, bla, bla.

Bla, bla, bla.

Bla, bla, bla.

Bla, bla, bla.

Yours faithfully,

C:Amie

<footer>
<bottom of A4 page>

What I actually got was

<header>
Dear Sir,
Bla, bla, bla.
Bla, bla, bla.
Bla, bla, bla.
Bla, bla, bla.
Yours faithfully,
C:Amie
<footer><bottom of A4 page>

Oops.

 

The Fix

There isn’t any point in going into troubleshooting details on this, I spent about 20 minutes wasting paper on it and the driver doesn’t work. I’m not the only person to see this either.

View: Ubuntu Forums

The simple fix is to go back to the Samsung downloads page for printers and don’t select a model number. Head directly to the Samsung Universal Print driver page and download the latest release (2013-09-23 of version 2.50.04.00.08 as of writing).

This fixes the problem.

After last time, I’m not going to waste my phone bill or breath attempting to report it to Samsung.

If you want my advice, don’t buy their printers. If you don’t want my advice, don’t follow it.

You can send audio but not receive it when using Skype for Android

System Requirements:

  • Android
  • Skype for Android 4.5.0.39600

The Problem:

When you make a Skype call on an Android device (Skype for Android 4.5.0.39600 at the time of writing) your partner can hear you and see you, however you cannot hear them.

This problem was observed on a Barnes & Noble Nook HD+ running ICS 4.0.4, but should by no means be exclusive to this equipment.

More Info

Quite simply, the fix to this one was that the Android device had been left with a pairing state with a Bluetooth Audio device – one that was not connected. This occurred irrespective of whether Bluetooth was on or off or the speaker in range.

By unpairing the device from the bluetooth partners list in Android Settings, the sound started to work once again at the next establishment of a call.

As other apps were using Audio correctly via the built-in speakers, I suspect this to be a bug in Skype rather than Android or Barnes & Noble’s firmware.