Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Deploying Windows 7 Image using Sysprep -audit -oobe results Inaccessible Network Printers


Symptoms

Consider the following scenario

  • You have mapped Network Printers for the user.
  • You make this user profile as DEFAULT using KB 973289 How to customize default user profiles in Windows 7
  • You run Sysprep to deploy a Windows 7 image using sysprep –audit and sysprep –oobe (System Out-of-Box Experience)
  • UAC (User Access Control) is enabled.

In this scenario, the Network Printers results to be inaccessible and grayed out. When we click to open them, they throw the following error:

0x00000005 - Access Is Denied

↑ Back to the top


Cause

When you connect to a print server and double click on a network printer to create a mapped queue on a Windows 7 and Windows Vista client machine, the following phenomenon happens:

A registry entry for respective printer connection is created under:

HKCU\Printers\Connections\<,,print_server,printer_name> with a REG_SZ value GuidPrinter={GUID}

Take a note of this {GUID} and traverse through following registry location:

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider\Servers\<print_server>\Monitors\Client Side Port

Look for noted {GUID} with a REG_SZ value

PrinterPath=\Users\<User_SID>\Printers\^\^\<print_server>^\<printer_name>

where <User_SID> is the SID of the user who installed the printer <printer_name>

When we use Sysprep with -audit and -oobe parameters, it restarts the computer in Factory Mode and removes all the SID information.

As UAC is enabled, Print Spooler service checks for SID information under:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider\Servers\<print_server>\Monitors\Client Side Port

If it does not find it healthy or matching with current user SID, it will make the mapped printer inaccessible to the current user.

Hence, it is recommended to use the -audit -oobe parameters only when computer is already in Factory Mode.

↑ Back to the top


Resolution

To have us fix this problem for you, go to the "Fix it for me" section. If you prefer to fix this problem yourself, go to the "Let me fix it myself" section.

Fix it for me

To fix this problem automatically, click the Fix this problem link. Then click Run in the File Download dialog box, and follow the steps in this wizard.

Fix this problem
Microsoft Fix it 50836



Note This wizard may be in English only. However, the automatic fix also works for other language versions of Windows.

Note If you are not on the computer that has the problem, you can save the automatic fix to a flash drive or to a CD so that you can run it on the computer that has the problem.

Let me fix it myself

On the affected Windows 7 and Windows Vista client machines, go to the following registry locations

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider\Servers\<print_server>\Monitors\Client Side Port

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider\Servers\<servername>\Printers

Delete the stale Printer {GUID} from both location and restart the Print Spooler service.

As a result, grayed out Network Printers will refresh and be available. You will be able to double click and use the printer without any errors.

You will see the GuidPrinter entry with a new {GUID} created which maps to the currently logged on user's SID

↑ Back to the top


More Information

973289 How to customize default user profiles in Windows 7 and in Windows Server 2008 R2
http://support.microsoft.com/default.aspx?scid=kb;EN-US;973289

959753 How to customize the default local user profile when you prepare an image of Windows Vista, Windows Server 2008, Windows XP, or Windows Server 2003
http://support.microsoft.com/default.aspx?scid=kb;EN-US;959753

828287 Unsupported Sysprep scenarios
http://support.microsoft.com/default.aspx?scid=kb;EN-US;828287

↑ Back to the top


Keywords: vkball, kb

↑ Back to the top

Article Info
Article ID : 2023766
Revision : 1
Created on : 1/8/2017
Published on : 3/26/2012
Exists online : False
Views : 161