Uniface.exe /bat and printers

Author: i.sharp@pcisystems.co.uk (Iain Sharp)

We do our printing through Crystal reports, having created an ocx wrapper and imported the signature.  I have a customer where the application calls a second copy using /bat to do some processing 'asynchronously' (create transactions, print transactions to a designated printer, close the app).  They have some 66 clients, most terminal services on to the same ts machine. On 3 of the clients, this /bat version fails to print. The crystal dll reports either that the printer doesn't exist or that the parameters are wrong.  If I run the 'side' app /bat /deb (so still /bat but in the debugger), the print works fine.  So, the same software, running as the same windows user, in the same windows session, fails if run stand alone, and works if run /deb. The only thing I can think of is that the /deb will slow the execution down, or connect the app 'better' to the windows environment.  Also, the same software, running as a different windows user on the same machine works every time.  The code was originally designed to be run as an async service on the main server, but we discovered that the userver processes don't have sensible access to windows printers at any time.  Anyone got any hints about running /bat processes and the windows user environment?  TL;DL Windows printing, it's a bitch isn't it? Cool

This page has no comments.