Page 1 of 1 1
Topic Options
#62932 - 2002-02-07 05:50 PM Addprinterconnection Problems
2000Admin Offline
Fresh Scripter

Registered: 2002-01-17
Posts: 8
Hello everyone!

I am in the process of a migration from Novell to Win2K and I have a question about adding printers. Does anyone have an easy way to allow NT WS clients to add printers using the Kix method. The nature of NT does not provide the typical user the ability to add drivers, set time, etc. I am looking for an easy way of giving these permissions via the login script. I have used resource kit tools in the past as a manual method, but would like to do it automatically. Any help would be appreciated.

Thanks all.

Still new to Kix, but getting better.

Top
#62933 - 2002-02-07 06:06 PM Re: Addprinterconnection Problems
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
code:

$defprinter=""
select
case ingroup($group+"med") $defprinter="\\a06\Elton"
case ingroup($group+"mis") $defprinter="\\wheelerc\printer"
case ingroup($group+"mqa") $defprinter="\\a06\barbrady"
case ingroup($group+"oig") $defprinter="\\a06\elton"
endselect
if $defprinter<>""
$printerexists=0 $lptprinter=0 $index=0
:printloop
$printer=enumvalue("$HKCUSMWNTCV\PrinterPorts",$index)
$printerport=readvalue("$HKCUSMWNTCV\PrinterPorts","$printer")
if @error=0
if "$printer"="$defprinter" $printerexists=1 endif
if instr("$printerport","LPT") $lptprinter=1 endif
$index=$index+1
goto printloop
endif
if $printerexists=0
$=addprinterconnection("$defprinter")
if $lptprinter=0
$=setdefaultprinter("$defprinter")
endif
endif
endif

[ 07 February 2002: Message edited by: Radimus ]

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#62934 - 2002-02-07 07:03 PM Re: Addprinterconnection Problems
2000Admin Offline
Fresh Scripter

Registered: 2002-01-17
Posts: 8
I still get Error 5: Access Denied when trying to run the script from a normal user. NT requires the user to have a specific user right to add device drivers. Any more suggestions for giving the users this right through the script?

Thanks.

Top
#62935 - 2002-02-08 03:33 AM Re: Addprinterconnection Problems
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
that is funny... joe user is supposed to be able to install network printers... Is this for a terminal server?
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#62936 - 2002-02-08 01:23 PM Re: Addprinterconnection Problems
Will Hetrick Offline
Hey THIS is FUN

Registered: 2001-10-02
Posts: 320
Loc: Harrisburg, PA USA
Doesn't the error 5 mean that the password and user name are not correct. Seems to me that when we used to use print servers, a person that was logging in the computer and also had a username on the domain would get an error 5 if those did not match.
_________________________
You have at least 2 choices. Each choice changes your destiny. Choose wisely!

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 640 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.052 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org