#25118 - 2002-07-16 05:06 AM
AddPrinterConnection Failing?
|
Austin
Seasoned Scripter
Registered: 2002-01-24
Posts: 439
|
I am having a problem with addprinterconnection(). I am getting @ERROR 123. Can anyone give me more information on this error and how I might go about checking it out more?
Thanks
_________________________
Austin Henderson
|
|
Top
|
|
|
|
#25120 - 2002-07-16 05:33 AM
Re: AddPrinterConnection Failing?
|
Austin
Seasoned Scripter
Registered: 2002-01-24
Posts: 439
|
"The filename, directory name, or volume label syntax is incorrect"
This is what I get out of the @SERROR.
Thanks
_________________________
Austin Henderson
|
|
Top
|
|
|
|
#25121 - 2002-07-16 05:37 AM
Re: AddPrinterConnection Failing?
|
Austin
Seasoned Scripter
Registered: 2002-01-24
Posts: 439
|
code:
?"Adding connection... |" IF ADDPRINTERCONNECTION("\\KCSHOP-1\BC01")=0 color y+/n "INSTALLED"? ELSE color r+/n "FAILED"? ?"ERROR: "@SERROR ENDIF ??"Press any key to continue..." GET $IN
It is just some test code to try to figure out why I cannot map the printer in my real script.
Thanks
_________________________
Austin Henderson
|
|
Top
|
|
|
|
#25123 - 2002-07-16 04:49 PM
Re: AddPrinterConnection Failing?
|
Austin
Seasoned Scripter
Registered: 2002-01-24
Posts: 439
|
I know that is what it looks like... but it is being typed right. WHen you try to connect to the printer via Win style connection it sits there forever and finally will connect.. but the driver is not being installed correctly most definately. The printer will install but the key in the registry for the lanman server stuff is not being created right. I think I may have some other issues here and that is just how kix is responding. I think the error may be misleading a bit.
Thanks for your help thus far.
_________________________
Austin Henderson
|
|
Top
|
|
|
|
#25124 - 2002-07-16 05:42 PM
Re: AddPrinterConnection Failing?
|
Austin
Seasoned Scripter
Registered: 2002-01-24
Posts: 439
|
I went to the machine that is hosting the printer and reinstalled SP2.. removed and added back file and printer sharing.. manually removed all traces of the driver (reg and files) and put it alkl back naming the printer share something different... (just for argument). Now I am getting a handle is invalid error???
_________________________
Austin Henderson
|
|
Top
|
|
|
|
#25125 - 2002-07-16 06:03 PM
Re: AddPrinterConnection Failing?
|
Austin
Seasoned Scripter
Registered: 2002-01-24
Posts: 439
|
Now I am getting an RPC failure error.... no changes have been made. Could this be a latency problem?
Thanks
_________________________
Austin Henderson
|
|
Top
|
|
|
|
#25126 - 2002-07-16 09:06 PM
Re: AddPrinterConnection Failing?
|
Austin
Seasoned Scripter
Registered: 2002-01-24
Posts: 439
|
I am basically now at the handle is invalid error... can anyone give me more information on what this is? Could it be related to the fact that I am trying to map the printer through a frame circuit @ 32K CIR? Latency.?.. timeout?
_________________________
Austin Henderson
|
|
Top
|
|
|
|
#25127 - 2002-07-16 09:44 PM
Re: AddPrinterConnection Failing?
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
have you tried using my MapPrinter() UDF
|
|
Top
|
|
|
|
#25128 - 2002-07-16 09:47 PM
Re: AddPrinterConnection Failing?
|
Austin
Seasoned Scripter
Registered: 2002-01-24
Posts: 439
|
no I have not but at this time I will try anything.. although this would require some rethinkingon my script. What does yours do that is different... why are you thinking it may work when the other will not?
Thanks
_________________________
Austin Henderson
|
|
Top
|
|
|
|
#25129 - 2002-07-16 09:53 PM
Re: AddPrinterConnection Failing?
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
I'm thinking that that number 1 failure in any piece of script is the code itself.... the UDF works and has been tested. (and since code doesn't write itself... )
then check the user privledges on the desktop
the next thing to verify, is the permissions on the printer share
then there is the availability drivers on the server [ 16 July 2002, 22:01: Message edited by: Radimus ]
|
|
Top
|
|
|
|
#25130 - 2002-07-16 10:04 PM
Re: AddPrinterConnection Failing?
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
However, none of this will fix an environment problem...
|
|
Top
|
|
|
|
#25131 - 2002-07-16 10:35 PM
Re: AddPrinterConnection Failing?
|
Austin
Seasoned Scripter
Registered: 2002-01-24
Posts: 439
|
Yes I thank you for your help thus far. You have always been very helpful to me. I have posted my code above and you can tell that there is really nothing wrong with the code... the print server is 2000 so there is no real share permissions to deal with.. there is security permissions but for argument sake I have Everyone with FC. The server is 2000 pro and the machine trying to connect to it is 2000 Adv server. The drivers are avaliable on both systems I have verified. I have done this exact same thing many times before so I am quite frustrated by my issues. I have noticed that when the script above runs I am unable to ping the next hop router until the script bounces out. When it stops I am then able to ping it again. I think this is just that the nature of the tcpip traffic being bursty but I am not sure.
Thanks
_________________________
Austin Henderson
|
|
Top
|
|
|
|
#25132 - 2002-07-16 10:37 PM
Re: AddPrinterConnection Failing?
|
Austin
Seasoned Scripter
Registered: 2002-01-24
Posts: 439
|
I am able to map it through the windows interface.. even though it is very slow. Can you maybe give me a little more information on the difference in your udf and the addprinterconnection?
Thanks
_________________________
Austin Henderson
|
|
Top
|
|
|
|
#25133 - 2002-07-16 10:39 PM
Re: AddPrinterConnection Failing?
|
Austin
Seasoned Scripter
Registered: 2002-01-24
Posts: 439
|
well my previous post was not etirely correct. I can install it and it shows being listed in the printers folder but if you go looking for the lanman providers key you will not find the entry for the print server.. and as such the printer is not functional. Even though it is listed.
I am stuck..
_________________________
Austin Henderson
|
|
Top
|
|
|
|
#25134 - 2002-07-18 03:56 PM
Re: AddPrinterConnection Failing?
|
Austin
Seasoned Scripter
Registered: 2002-01-24
Posts: 439
|
Figured it out... for one reason or another when I go to map the printer the PVC on this circuit is going down. Thus the remote server is unavaliable to my Terminal Server and it just bombs out. I am working with AT&T to determine why this circuit is going down like this.
Thanks for your help and support along the way.
_________________________
Austin Henderson
|
|
Top
|
|
|
|
#25136 - 2002-07-18 04:10 PM
Re: AddPrinterConnection Failing?
|
Austin
Seasoned Scripter
Registered: 2002-01-24
Posts: 439
|
Ohh no not blaming Kix... network issue. Just odd at first because I was not aware that the PVC was going down like that. I am still confused as to how it is happening... I will resolve though. Kix is great...
Thanks
_________________________
Austin Henderson
|
|
Top
|
|
|
|
#25137 - 2002-07-21 11:29 AM
Re: AddPrinterConnection Failing?
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
For the actual errors you can take also a look at the link kix-code.htm greetings.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 756 anonymous users online.
|
|
|