|
|
|||||||
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 ? |
||||||||
|
|
|||||||
First question that comes up, are the drivers for using this printer on the client system available on the server? |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
Sorry i had an error in my script the variable %printserver% has the wrong name of the Printserver |