Trying to automatically setup printers for a group of users in w2k domain

LordSandMan

Senior member
Nov 2, 2000
738
0
0
I have a w2k domain with 2 servers. I have the users in Organizational Units. I have a login script that works fine under administrator for mapping printers at login and unmaping them at logout, but regular users get an access denied error. I found this document on Microsofts website explaining how to set it up.

http://support.microsoft.com/default.aspx?scid=kb;en-us;189105


Here is my login script that works under Administrator


rundll32 printui.dll,PrintUIEntry /if /b "lj5si" /f %windir%\inf\ntprint.inf /r "IP_172.16.10.4" /m "HP Laserjet 5si" /z



Here is my logout script that works fine as administrator

rundll32 printui.dll,PrintUIEntry /dl /n "lj5si"



I have tried with a default group policy and without. The regular users can run "rundll32 printui.dll,PrintUIEntry"
without a problem, it's just when they try to setup the printer with the login script they're denied access. I'm sure this is some simple permission that I'm missing. Thanks for any help.
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
do the users have access to the logon script? one possibility is that the error could simply be from accessing the script (and not what it does).

-Spy
 

LordSandMan

Senior member
Nov 2, 2000
738
0
0
Well, the error is coming from "rundll32 printui.dll,PrintUIEntry". so it seems like they are able to access the login script ok. Thanks for the suggestion.
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
that's strange that they would be able to run it correctly from the run prompt but not from the logon script.
 

LordSandMan

Senior member
Nov 2, 2000
738
0
0
I think maybe I didn't explain it very well. The users can run "rundll32 printui.dll,PrintUIEntry /?" and probably some other switches. The login script will work if I put "rundll32 printui.dll,PrintUIEntry /?" into the login script instead of "rundll32 printui.dll,PrintUIEntry /if /b "lj5si" /f %windir%\inf\ntprint.inf /r "IP_172.16.10.4" /m "HP Laserjet 5si" /z". I think the problem is that they are not allowed to create a printer. I'm not sure where that permission is. Thanks.
 

LordSandMan

Senior member
Nov 2, 2000
738
0
0
Maybe another question to ask is "Is there a better way to accomplish what I'm trying to do?". I just need the users to have a printer setup when they login. It would be preferable to have an easy way to change it for groups of users on all workstations but not required. Any insight into this problem would be appreciated.