Page 1 of 1 1
Topic Options
#213196 - 2018-02-12 01:46 PM Code
mmuser Offline
Fresh Scripter

Registered: 2010-05-10
Posts: 14
Loc: Germany
we use Kixtart 4.64 at WIndows 10 1709
In the printerscript i connect printers with:

AddPrinterConnection ("\\"+$printserver+"\DRU00016")

I get an error code 01722.

What means this Code ?

Top
#213197 - 2018-02-12 02:32 PM Re: Code [Re: mmuser]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
First question that comes up, are the drivers for using this printer on the client system available on the server?
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#213198 - 2018-02-12 02:59 PM Re: Code [Re: Mart]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
01722 is likely a bunch of return codes being sent to the screen.

Please change the line of code to this so we know what the error really is:

$RC=AddPrinterConnection ("\\"+$printserver+"\DRU00016")
? $RC
? @serror

Top
#213199 - 2018-02-12 03:37 PM Re: Code [Re: Allen]
mmuser Offline
Fresh Scripter

Registered: 2010-05-10
Posts: 14
Loc: Germany
If i connect to the printer manually - it runs - The driver is available on the Server

If i change the code i get the following error:

1722
The RPC-Server ist not available (i hope this is the translation)
In German: Der RPC-Server ist nicht verfügbar

Top
#213201 - 2018-02-13 09:19 AM Re: Code [Re: mmuser]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1894
Loc: Hilversum, The Netherlands
In command prompt you can get the error code like this:
 Code:
net helpmsg 1722

The answer would be: "The RPC server is unavailable."
The reason you get a 0 in front with your code is because 0 is what is returned by AddPrinterConnection.
As Allen pointed out, you have to catch that with a variable, in his example $RC.
In Kix @ERROR returns the error code and @SERROR returns the error description.

The likely problem seems to be that the $printserver variable doesn't contain the right name.

Top
#213203 - 2018-02-14 08:22 AM Re: Code [Re: Arend_]
mmuser Offline
Fresh Scripter

Registered: 2010-05-10
Posts: 14
Loc: Germany
Sorry i had an error in my script the variable %printserver% has the wrong name of the Printserver
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 557 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.058 seconds in which 0.023 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