Page 1 of 1 1
Topic Options
#119691 - 2004-05-17 05:08 PM AddPrinterConncetion Problem
burnsc Offline
Starting to like KiXtart

Registered: 2004-04-14
Posts: 171
I have a few Windows 2000 workstations that will not install printers using the AddPrinterConnection command. The thing that perplexes me about it, is that the user can browse for the printer and add it that way.
Where is my thoughts wrong. As I understood it, if the user could add a printer then addprinterconnection should work.

Any ideas?

Top
#119692 - 2004-05-17 05:21 PM Re: AddPrinterConncetion Problem
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
What's the error code (@ERROR / @SERROR) when it fails?
Top
#119693 - 2004-05-17 05:29 PM Re: AddPrinterConncetion Problem
burnsc Offline
Starting to like KiXtart

Registered: 2004-04-14
Posts: 171
1801
Top
#119694 - 2004-05-17 05:38 PM Re: AddPrinterConncetion Problem
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Quote:

1801 : The printer name is invalid




I guess that'll be it then

Make sure that you are using the printer share name, not the printer display name.

Top
#119695 - 2004-05-17 06:00 PM Re: AddPrinterConncetion Problem
burnsc Offline
Starting to like KiXtart

Registered: 2004-04-14
Posts: 171
I will test that soon. For my reference where did the error information come from?

Thanks for all the help

Top
#119696 - 2004-05-17 06:07 PM Re: AddPrinterConncetion Problem
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
@SERROR.

@ERROR returns the error number, @SERROR the error message (if it can be resolved).

I just used this mini-script to display it:
Code:
$=Execute("Exit 1801")
@ERROR " : "+@SERROR ?


Top
#119697 - 2004-05-17 07:01 PM Re: AddPrinterConncetion Problem
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Additionally.. If you do not want to run the script, you can also do a "NET HELPMSG".

Quote:


net helpmsg 1801





Thanks,

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

Top
#119698 - 2004-05-17 07:21 PM Re: AddPrinterConncetion Problem
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
... and of course, this is all covered in the FAQ section.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

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 837 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.149 seconds in which 0.124 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