Client printer auto-creation may fail if it is connecting to a server running XenApp Server 5.0 or later using specific native drivers or the Citrix Universal Printer Driver. The Event ID: 1116, AddPrinter() Error 0x3EB is found in the Application Event Log.
Converting 3EB from hex to decimal gives 1003.
Running the net helpmsg 1003 command from a command line, provides the following output:
Cannot complete this function.
See CTX106683 – Event ID 1116: Printer auto-creation failure. Reason: AddPrinter() failed with status 0x5 for more information.
Important! Refer to the following Causes and the corresponding Solutions to resolve the issue:
This error code is returned when the local print provider of the spooler cannot load the driver. This can be caused when the caller (in this case the Citrix Print Manager Service) does not provide sufficient privileges to complete this action.
XenApp 5.0 uses the Ctx_cpsvcuser account to call the OpenPrinterW() function for the client printer auto-creation process. XenApp 6.x uses the Local Service account to call the OpenPrinterW() function.
To confirm, add the Ctx_cpsvcuser or Local Service account to the local administrators group, or change the Citrix Print Manager Service to start with the Local System Account. If none of these changes allow for the successful creation of the client printers, a permissions problem is indicated.
Tools such as ProcMon from Microsoft Sysinternals can be used to isolate the permissions. Also refer to CTX113555 - Permissions and Rights Required for the Ctx_CpsvcUser Account providing required permissions details for the Ctx_cpsvcuser account in XenApp Server 5.0.
Additionally, if specific printer drivers that call the OpenPrinterW() function with a System Account privilege are used, client printer auto-creation fails with Access Denied (0x5) in the OpenPrinterW() function. See CTX106683 - Event ID 1116: Printer auto-creation failure. Reason: AddPrinter() failed with status 0x5.
For example:
0:007> kv ChildEBP RetAddr Args to Child 00a2ee50 014db166 00e375e0 00a2ee6c 01537c90 WINSPOOL!OpenPrinterW+0x2 (FPO: [Non-Fpo]) 00a2ee74 014daf5c 00e375e0 00000002 00000010 0x00a4fcf8 00a2ee8c 014d5508 00e375e0 00000003 00000001 0x00b3ebe7 00a2eea4 72ed2104 00e375e0 00000003 00000001 0x00c2dad6 00a2eef0 75fadff2 00e375e0 00000003 00000001 WINSPOOL!SpoolerPrinterEventNative+0x57 (FPO: [Non-Fpo]) 00a2ef0c 75faf9d0 00e375e0 00000003 00000000 localspl!SplDriverEvent+0x21 (FPO: [Non-Fpo]) 00a2ef30 75f9a9b4 00e2a920 00000003 00000000 localspl!PrinterDriverEvent+0x46 (FPO: [Non-Fpo]) 00a2f3f8 75f982de 00000000 00000002 00e4ba40 localspl!SplAddPrinter+0x5f3 (FPO: [Non-Fpo]) 00a2f424 73f37c8f 00000000 00000002 00e4ba40 localspl!LocalAddPrinterEx+0x2e (FPO: [Non-Fpo]) 00a2f874 73f37b76 00000000 00000002 00e4ba40 SPOOLSS!AddPrinterExW+0x151 (FPO: [Non-Fpo]) 00a2f890 01007e29 00000000 00000002 00e4ba40 SPOOLSS!AddPrinterW+0x17 (FPO: [Non-Fpo]) 00a2f8ac 01006ec3 00000000 00e35e80 000aa8a8 spoolsv!YAddPrinter+0x75 (FPO: [Non-Fpo]) 00a2f8d0 77c10f3b 00000000 00e35e80 000aa8a8 spoolsv!RpcAddPrinter+0x37 (FPO: [Non-Fpo]) 00a2f8f8 77c823f7 01006e8c 00a2fae0 00000005 RPCRT4!Invoke+0x30 00a2fcf8 77c826ed 00000000 00000000 000d1134 RPCRT4!NdrStubCall2+0x299 (FPO: [Non-Fpo]) 00a2fd14 77c109be 000d1134 000b84f0 000d1134 RPCRT4!NdrServerCall2+0x19 (FPO: [Non-Fpo]) 00a2fd48 77c1093f 01002c47 000d1134 00a2fdec RPCRT4!DispatchToStubInCNoAvrf+0x38 (FPO: [Non-Fpo]) 00a2fd9c 77c10865 00000005 00000000 0100d228 RPCRT4!RPC_INTERFACE::DispatchToStubWorker+0x117 (FPO: [Non-Fpo]) 00a2fdc0 77c134b1 000d1134 00000000 0100d228 RPCRT4!RPC_INTERFACE::DispatchToStub+0xa3 (FPO: [Non-Fpo]) 00a2fdfc 77c11bb3 000ccbe8 000ba7e8 000b9560 RPCRT4!LRPC_SCALL::DealWithRequestMessage+0x42c (FPO: [Non-Fpo]) 0:007> g @$ra eax=00000000 ebx=00000000 ecx=72ec5a19 edx=000004c2 esi=00a2efb0 edi=00000000 eip=014db166 esp=00a2ee64 ebp=00a2ee74 iopl=0 nv up ei pl zr na po nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246 0x014db166 014db166 85c0 test eax,eax 0:007> !teb TEB at 7ffdc000 ExceptionList: 00a2eee0 StackBase: 00a30000 StackLimit: 00a28000 SubSystemTib: 00000000 FiberData: 00001e00 ArbitraryUserPointer: 00000000 Self: 7ffdc000 EnvironmentPointer: 00000000 ClientId: 00002498 . 00002314 RpcHandle: 00000000 Tls Storage: 00000000 PEB Address: 7ffda000 LastErrorValue: 5 LastStatusValue: c0000022 Count Owned Locks: 0 HardErrorMode: 0
Contact the printer driver vendor.
The Citrix Universal Printer Driver is corrupted or is modified by a non-official certified (MS WHQL) Printer Driver. See CTX089874 – Troubleshooting and Explaining the Citrix Universal Print Driver.
Reinstall the Citrix Universal Printer Driver using the repair function under Add or Remove Programs.