Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We're trying to standardise our printing environment to provide consistent settings across our various print queues. To do this, we would like create a settings file per model of printer so that they can be used to quickly deploy new Windows print servers and queues with standard settings. We've used

Rundll32.exe PrintUI.dll,PrintUIEntry /Ss /n <Queue> /a <SettingsFile>

to create the settings files without error. However, now that I am trying to use them to restore the settings on another server with

Rundll32.exe PrintUI.dll,PrintUIEntry /Sr /n <Queue> /a <SettingsFile>

I'm getting the error "Operation could not be completed (error 0x0000000c)." This translates to the Windows error code: ERROR_INVALID_ACCESS, though that might be a red-herring.

Both the servers I'm using are Windows Server 2008 R2 RTM and my queues are both pointing at the same printer with the same driver installed. UAC is disabled on both machines and I am running as an Adminsitrator.

Does anyone have any ideas as to how to troubleshoot this issue? Alternatively, what methods could we use to provide consistent print queue settings at a per-device level for 100s of print queues?

Many thanks.

share|improve this question
Just encountered this myself using rundll32 printui.dll /Sr /n "printer name" /a "settings.dat" after running the same command with the /Ss switch, under Windows 7 64bit Enterprise. Gives the same error as above. – gsreynolds Feb 15 '12 at 14:43

Apparently the rundll32.exe executable calls the 32-bit version of Tcpmonui.dll from the wrong location (probably due to wow64 filesystem redirection).

There's a hotfix available for Win7 64-bit and Windows 2008 R2 over at

share|improve this answer
Thanks, the hotfix solves the problem. However since its a 32/64bit issue, I've now tried using the 64bit version of rundll32.exe in SysWOW64, which I've found works as expected on systems without the hotfix applied: C:\Windows\SysWOW64\Rundll32.exe PRINTUI.DLL,PrintUIEntry /Sr /n "printer name" /a "settings.dat". – gsreynolds Feb 17 '12 at 12:10
Odd that this 32bit/64bit issue only seems to arise for the /Sr switch, since I hadn't come across it with any of the other uses of PrintUI.dll such as installing printers. – gsreynolds Feb 17 '12 at 12:21
@gsreynolds the one in SysWOW64 IS the 32-bit version – Mathias R. Jessen Feb 17 '12 at 15:25
So it is, thanks. Not exactly the obvious acronym at first glance ever... WOW64 = "Windows 32-bit on Windows 64-bit"... Not had much exposure to this aspect of Windows, thanks for the correction. – gsreynolds Feb 17 '12 at 23:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.