[THIN] Adding printer ports at login?

  • From: Angus Macdonald <Angus.Macdonald@xxxxxxxxxxxxxxxxxxx>
  • To: thin@xxxxxxxxxxxxx
  • Date: Thu, 13 Oct 2005 10:14:36 +0100

I am busy deploying a self-made application to lots of doctors surgeries. It
involves using virtual postscript printers printing to file to make portable
documents that may be emailed and dumped to printers. A utility monitors the
relevant folder, capturing and processing the files. It all works well.

However, several surgeries use thin client (TS and Citrix) so the virtual
postscript printers need to print to a unique folder for each user. I tried
using SUBST to map a drive letter (L:) to a unique folder and set the
printer to print to L:\stdref.ps but that doesn't work properly. Clients map
L: as expected and the print queue seems happy with the L: mapping but it
will only work when somebody is logged on at the console and even then
everybody prints to the L: drive of the logged on user, not their own.

So, at the moment I'm creating individual printers for each user and setting
security options so that the printer is only visible to the user in
question. This works but will cause an administrative overhead in the future
as staff change and creating and configuring 40 identical printers gets
dull!

So, to the actual query! I can programmatically create printers at login
using RUNDLL32 PrintUI.Dll... but I can only print to ports that already
exist. Does anyone know of a way to programatically create "Print to file"
ports (like c:\users\user1\stdref.ps, c:\users\user2\stdref.ps etc) from a
script or an application called from a script? Also, is it possible to
change the security on printers from a script, as the newly created printers
assign permissions to "everybody" by default.

All suggestions welcome.

Angus
********************************************************
This Weeks Sponsor: Cesura, Inc.
Know about Citrix end-user slowdowns before they know.
Know the probable cause, immediately.
Know it all now with this free white paper.
http://www.cesurasolutions.com/landing/WPBCForCitrix.htm?mc=WETBCC
******************************************************** 
Useful Thin Client Computing Links are available at:
http://thin.net/links.cfm
ThinWiki community - Excellent SBC Search Capabilities!
http://www.thinwiki.com
***********************************************************
For Archives, to Unsubscribe, Subscribe or 
set Digest or Vacation mode use the below link:
http://thin.net/citrixlist.cfm

Other related posts: