#133545 - 2005-02-09 03:01 PM
Manage printers at logon (@Priv = User)
|
googhum
Fresh Scripter
Registered: 2004-12-20
Posts: 7
|
We run a Win2k server, and all clients are Domain User. When trying to add or delete an printer using addprinter (rundll32 printui.dll,PrintUIEntry) it fails. I don't want to make them power user or admin but want to manage there availeble printers. The add/delete runs at user logon. Is this possible?
Code:
runas: Requiers input through keyboard.
Psexec: Requiers the user to add/run services.
GPO "Allow del printer = disabled": Doesn't help either
|
|
Top
|
|
|
|
#133546 - 2005-02-09 04:02 PM
Re: Manage printers at logon (@Priv = User)
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4567
Loc: USA
|
Its been a while since I wrote the Addprinter() UDF but I do believe it requires having either admin or power user permissions to run locally. Other options would be to write an admin script using addprinter() and add the printer remotely, or to just set up your IP Printers on a Server, and then use the built in function AddPrinterConnection() .
|
|
Top
|
|
|
|
#133547 - 2005-02-09 04:27 PM
Re: Manage printers at logon (@Priv = User)
|
googhum
Fresh Scripter
Registered: 2004-12-20
Posts: 7
|
Found several sites explaining you should be at least powerUser for adding deleting printers (ie. http://support.microsoft.com/?kbid=149913). It is nessesery to create local printers (management) 
I'm trying to add the printers whith elevated privileges like this: Code:
SHELL 'lsrunas /user: /password: /domain: /command:c:\test\temp.bat /runpath:c:\test'
temp.bat : Code:
$ = WriteLine(2, 'rundll32 printui.dll,PrintUIEntry /n "' + $CurPrinters[$x,0] + '" /dl @CRLF')
Downsite is the commandwindow popping up, and not being able to inform the user of the progress of the logonscript. Will look in to the admin script option if this fails.
|
|
Top
|
|
|
|
#133555 - 2005-02-13 01:39 AM
Re: Manage printers at logon (@Priv = User)
|
Sealeopard
KiX Master
   
Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
|
Finally found the article. See http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/581.mspx , which deals with the "Prevent users from installing printer drivers" security policy.
Quote:
For a computer to print to a network printer, the driver for that network printer must be installed on the local computer. This security setting determines who is allowed to install a printer driver as part of adding a network printer. If this setting is enabled, only Administrators and Power Users can install a printer driver as part of adding a network printer. If this setting is disabled, any user can install a printer driver as part of adding a network printer. This setting can be used to prevent unprivileged users from downloading and installing an untrusted printer driver. If an administrator has configured a trusted path for downloading drivers, this setting has no impact. When trusted paths are used, the print subsystem attempts to use the trusted path to download the driver. If the trusted path download succeeds, the driver is installed on behalf of any user. If the trusted path download fails, the driver is not installed and the network printer cannot be added.
_________________________
There are two types of vessels, submarines and targets.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 363 anonymous users online.
|
|
|