Page 1 of 1 1
Topic Options
#192094 - 2009-02-06 05:39 PM Addprinterconnection credential problem
knuckled Offline
Just in Town

Registered: 2009-02-06
Posts: 4
Loc: Quebec
i'm adding printer with addprinterconnection in my login script. i wanna know is there a way to bypass the credential for all my users that aren't administrators. if yes tell me i try it AddPrinterConnection(strLocalName, strRemoteName[,bUpdateProfile][,strUser][,strPassword]) struser and strpassword it won't work... thx so much
Top
#192095 - 2009-02-06 06:48 PM Re: Addprinterconnection credential problem [Re: knuckled]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4572
Loc: USA
Not sure about all those parameters... Users do not have to be admins to use Addprinterconnection.

 Quote:

AddPrinterConnection( )
Action: Adds a connection to the specified printer for the current user.

Syntax: ADDPRINTERCONNECTION ("printer name")

Parameters:

Printer name

The (share)name of the printer to which to connect.

Remarks: This function is available only on Windows NT family, and can be used only to connect to printers on a server running the Windows NT/2000/XP operating system.

When Windows NT connects to the printer, it may copy printer driver files to the local computer. If the user does not have permission to copy files to the appropriate location, ADDPRINTERCONNECTION fails, and @ERROR returns ERROR_ACCESS_DENIED.

Returns:
0 Printer connection established
Error code Function failed

See Also: DelPrinterConnection( ), SetDefaultPrinter( )

Example:

If ADDPRINTERCONNECTION ("\\vleerbeer\hp laserjet 4") = 0
? "Added printer connection...."
Endif
_________________________
(... better days ahead)

Top
#192115 - 2009-02-09 02:14 PM Re: Addprinterconnection credential problem [Re: Allen]
knuckled Offline
Just in Town

Registered: 2009-02-06
Posts: 4
Loc: Quebec
i'm speaking about the permission for the driver to install i need to bypass that
Top
#192116 - 2009-02-09 02:17 PM Re: Addprinterconnection credential problem [Re: knuckled]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Well this means that the permissions of the account under which the script is ran have to be local admin. Setting this script as a startup script would solve that problem. However keep in mind that you can not do "InGroup" statements when placed as Startup as it is not the user thats running the script but rather the System account.
Top
#192117 - 2009-02-09 02:30 PM Re: Addprinterconnection credential problem [Re: knuckled]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
you are using some kind of driver installer?
if so, it has nothing to do with addprinterconnection.

or do you mean, your normal users get access denied errors, when script runs?
if so, see what's set in your group policies for:
Computer configuration\Windows settings\Security settings\Local
Policies\Security options
"Devices: Prevent users from installing printer drivers"
_________________________
!

download KiXnet

Top
#192119 - 2009-02-09 02:42 PM Re: Addprinterconnection credential problem [Re: Lonkero]
knuckled Offline
Just in Town

Registered: 2009-02-06
Posts: 4
Loc: Quebec
user is ok its his permission of a simple user the problem when time comming for installing the driver of the printer the first time i need to bypass the credential windows of yes and user name and pass.
Top
#192121 - 2009-02-09 08:14 PM Re: Addprinterconnection credential problem [Re: knuckled]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
what credential window?
I think I should try limiting one account and see where that happens.

but, no credential window should pop up, by calling addprinterconnection... afaik.
_________________________
!

download KiXnet

Top
#192122 - 2009-02-09 08:22 PM Re: Addprinterconnection credential problem [Re: Lonkero]
knuckled Offline
Just in Town

Registered: 2009-02-06
Posts: 4
Loc: Quebec
when the time for installing driver on the local computer that hasn't right
Top
#192123 - 2009-02-09 08:29 PM Re: Addprinterconnection credential problem [Re: knuckled]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
you told in PM that this was on vista.

I currently don't have a vista at my disposal, but tomorrow I should receive one laptop with it.
so, if you have time and nobody else jumps in, I shall try it out.
_________________________
!

download KiXnet

Top
#192125 - 2009-02-09 11:55 PM Re: Addprinterconnection credential problem [Re: Lonkero]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4572
Loc: USA
Make sure Vista SP1 is installed, as I know this cleaned up some network printing issues when connecting to Windows 2003 Servers.
_________________________
(... better days ahead)

Top
#193520 - 2009-04-20 04:53 PM Re: Addprinterconnection credential problem [Re: Allen]
DHornby Offline
Just in Town

Registered: 2005-11-09
Posts: 2
Was there an answer to this? I'm getting the same issue \:\(
Top
Page 1 of 1 1


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

Who's Online
1 registered (StuTheCoder) and 798 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.058 seconds in which 0.024 seconds were spent on a total of 13 queries. Zlib compression enabled.

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