Re: Define 'local printer'?
From: David Wang [Msft] (someone_at_online.microsoft.com)
Date: 06/30/04
- Previous message: Clay Calvert: "Re: Ping multiple subnets"
- In reply to: Gordon Price: "Define 'local printer'?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 29 Jun 2004 18:30:15 -0700
Assuming the printers are all available as Windows Network printers and that
the Print Spooler is running on the local machine, I use the following
commands:
SETLOCAL
SET CMD_RUNDLL32=RUNDLL32.EXE
SET PRINTER_NAME1=\\PRINT-SERVER\NET-PRINTER1
SET PRINTER_DEFAULT=%PRINTER_NAME1%
%CMD_RUNDLL32% PrintUI.dll,PrintUIEntry /in /n %PRINTER_NAME1%
%CMD_RUNDLL32% PrintUI.dll,PrintUIEntry /y /n %PRINTER_DEFAULT%
REM Deletes the printer connection
REM %CMD_RUNDLL32% PrintUI.dll,PrintUIEntry /dn /n %PRINTER_DEFAULT%
ENDLOCAL
You need to come up with code to determine the UNC path of "PRINTER_NAME1".
The rest will make sure that the printer gets installed and becomes the
default printer for that user. I couldn't quite figure out how to rename
the network printer, though -- /b is supposed to work for local printers
(haven't tried).
Help:
rundll32 printui.dll,PrintUIEntry /?
-- //David IIS This posting is provided "AS IS" with no warranties, and confers no rights. // "Gordon Price" <gordon(thorn)@thomashacker.com> wrote in message news:OmsqB%23hXEHA.3944@tk2msftngp13.phx.gbl... For reasons of AutoCAD ease of use, I would like to be able to define a printer on each local machine, all called 'Local Printer' or 'Nearest Printer' or some such, but have each desktop actually point this to one of three physical printers. Ideally I would like to manage this with a script, where the logon actually looks at what machine the user is logging on to, and maps the local printer appropriately to the nearest phsysical device. Failing that, it could be based on user group membership, but that would mean a user logging in on a different machine would get output from the printer defined by their usual desk location, not the machine they are currently logged in at. Unfortunately, because of how AutoCAD plots, I can't use the Default printer setting, I need to actually have a specific printer name to work with. So, first off, is there a better way to do this? Can script and/or Windows Server get this affect some better way? And if not, can I do this as I am thinking? Anyone done something similar? Best, Gordon
- Previous message: Clay Calvert: "Re: Ping multiple subnets"
- In reply to: Gordon Price: "Define 'local printer'?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|