Page 3 of 3 <123
Topic Options
#124912 - 2004-08-20 04:10 PM Re: Still can't add network printer...
HelpMe Offline
Fresh Scripter

Registered: 2004-08-11
Posts: 16
Yes I think that the problem was in fact that I wrote "doamin" instead of "domain", so when I used :
IF ComputerInGroup("PC-CENT-SI") Kix didn't understand the domain stuff and gave me the error :
Script error: invalid method/function call: missing required parameter 2!
If ComputerInGroup ("PC-CENT-SI")=1
Is this possible ?
And the reason why I modified the UDF is that I thought that if I only have 1 domain, the script would be faster if it doesn't have to check about the domain, don't you think ?
Since I'm french (my english is not so good...) I don't really understand what you mean by recompiling the udf but I guess not, I just took the example and put away the domain stuff... Is this better answer ? But the first time I told you it doesn't work I didn't modify the UDF, I just wrote "doamin" instead of "domain"....

Top
#124913 - 2004-08-20 04:19 PM Re: Still can't add network printer...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
read above.
the reason is that you removed the "optional" word from the second argument text, making it must have argument.
and when you didn't pass it on your function call, it obviously errors out.
so, it has nothing to do with mistyping but you clearly just removed stuff you didn't understand.

the error code was 100% right this time.
_________________________
!

download KiXnet

Top
#124914 - 2004-08-20 04:36 PM Re: Still can't add network printer...
HelpMe Offline
Fresh Scripter

Registered: 2004-08-11
Posts: 16
So I'm glad to see that you understand the error with my english ! By the way I still have a little problem but it's not very important since it works well anyway. The problem is that if I do :
IF ComputerInGroup("ABC")=1
AddPrinterConnection...
ENDIF

and the computer is member of group "ABC" it works fine.
But if I do :
IF ComputerInGroup("DEF")=1 AddPrinterConnection... ENDIF
and if the computer is member of group "ABC", and group "ABC" is member of group "DEF", it won't work... Is this normal ? It should work or am I wrong ?

Top
#124915 - 2004-08-20 05:20 PM Re: Still can't add network printer...
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

It should work or am I wrong ?



You are wrong.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#124916 - 2004-08-20 08:08 PM Re: Still can't add network printer...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, ingroup() works recursively and it seems computerInGroup() does not.
I don't really know, have never tested (just put up my AD at home) and could not care more
_________________________
!

download KiXnet

Top
Page 3 of 3 <123


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 2145 anonymous users online.
Newest Members
BeeEm, min_seow, Audio, Hoschi, Comet
17882 Registered Users

Generated in 0.128 seconds in which 0.103 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