Page 1 of 1 1
Topic Options
#25118 - 2002-07-16 05:06 AM AddPrinterConnection Failing?
Austin Offline
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
#25119 - 2002-07-16 05:08 AM Re: AddPrinterConnection Failing?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
@SERROR will give you a description of the error. You can also look it up on MSDN.

Please post your code for examination.
_________________________
There are two types of vessels, submarines and targets.

Top
#25120 - 2002-07-16 05:33 AM Re: AddPrinterConnection Failing?
Austin Offline
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 Offline
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
#25122 - 2002-07-16 03:23 PM Re: AddPrinterConnection Failing?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
The error message says it all. Make sure you type the printer name correctly (case-sensitivity?).
_________________________
There are two types of vessels, submarines and targets.

Top
#25123 - 2002-07-16 04:49 PM Re: AddPrinterConnection Failing?
Austin Offline
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 Offline
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 Offline
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 Offline
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 Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
have you tried using my MapPrinter() UDF
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#25128 - 2002-07-16 09:47 PM Re: AddPrinterConnection Failing?
Austin Offline
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 Offline
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... [Big Grin] )

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 ]
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#25130 - 2002-07-16 10:04 PM Re: AddPrinterConnection Failing?
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
However, none of this will fix an environment problem...
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#25131 - 2002-07-16 10:35 PM Re: AddPrinterConnection Failing?
Austin Offline
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 Offline
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 Offline
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 Offline
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
#25135 - 2002-07-18 04:09 PM Re: AddPrinterConnection Failing?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Just don't blame KiXtart for this [Wink]

I can already see the headlines: "Microsoft product brings down AT&T Network!"
_________________________
There are two types of vessels, submarines and targets.

Top
#25136 - 2002-07-18 04:10 PM Re: AddPrinterConnection Failing?
Austin Offline
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 Offline
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.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

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 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.082 seconds in which 0.035 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