Page 1 of 1 1
Topic Options
#22573 - 2002-06-04 06:43 AM Adding a printer to a remote PC
Kwizzical Offline
Lurker

Registered: 2002-06-04
Posts: 4
Loc: Western Australia
Hi,

Does anyone know if there is a way to add a printer connection to a remote computer? [Frown] I have read the doco and it definitely states the AddPrinterConnection is for the current user.

Any help would me much appreciated.

TIA

David.
_________________________
regards David ----------------------------------- Life wasn't meant to be easy.... But it wasn't meant to this hard! -----------------------------------

Top
#22574 - 2002-06-04 07:52 AM Re: Adding a printer to a remote PC
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
David,

Welcome to the board!

I think the key here is the following:
quote:

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.

HTH,

- Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#22575 - 2002-06-04 08:28 AM Re: Adding a printer to a remote PC
Kwizzical Offline
Lurker

Registered: 2002-06-04
Posts: 4
Loc: Western Australia
Kent,

Thanks for the welcome. The reason I have asked this question is because I am trying to get around a problem we have in our NT4 domain. Take a look at Microsofts KB article - Disconnecting Network Printer Leaves Registry Settings (Q188697). I have also found that the subkeys from the HKLM\System\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-2 key need to be removed as well to make this work.What I want to do create a script that will do this automatically.

The main reason for doing this is because we have recently upgraded our servers to Win2KAS and hence upgraded our printer drivers. As the KB article says, the settings from the older drivers are left in the NTUser.dat and the driver info is left in HKLM. We have a lot of people who aren't able to print properly because of this.

What needs to be done is:
1. note all printer connections (including default)
2. stop the spooler service
3. remove the printers
4. remove relevant registry keys
5. start the spooler service
6. re add the printers noted in step 1.

As you can see AddPrinterConnection to a remote PC would come in really handy in this case.

Can you see any other way around this problem?

TIA

David.
_________________________
regards David ----------------------------------- Life wasn't meant to be easy.... But it wasn't meant to this hard! -----------------------------------

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
0 registered and 302 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.048 seconds in which 0.021 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