Page 1 of 1 1
Topic Options
#72585 - 2003-01-13 05:49 PM GetObject("LDAP...") doesn't work on Win9x ?
mdorofeev Offline
Lurker

Registered: 2003-01-13
Posts: 2
Hi, All!

See the following script (rather short...):
-------------------------------------------
Dim $prnGroupsOU
Dim $prnGroup

$prnGroupsOU = GetObject("LDAP://dc01-dom/OU=Printer groups,DC=mydom.ru")

If @Error <>0
? "Error!" @Error
Endif

for each $prnGroup in $prnGroupsOU
? $prnGroup.Name
if( $prnGroup.Class = "group")
If ( ingroup($prnGroup.Get("Name")) <> "0")
? "In Group!"
? "Setting printer" $prnGroup.Get("Description")
Endif

endif
next

Dim $ans
Get $ans
-------------------------------------------
On W2K machine this works fine and i see the output:

CN=prn-hp5000-ivc308
In Group!
Setting printer \\fs01-dom\hp5000-ivc308
CN=prn-hp5si-ivc
In Group!
Setting printer \\fs01-dom\hp5000-ivc308

On w98 machine I see:

Error!-2147221014

What am i doing wrong ???
Just in case, kxrpc service is started OK on DC01-DOM.

Or, W98 does NOT suport GetObject("LDAP") ???

Thanks ALL in advance!!!!

Sincerely,
Mike

Top
#72586 - 2003-01-13 06:02 PM Re: GetObject("LDAP...") doesn't work on Win9x ?
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hi Mike welcome to korg - on Windows 9x and NT4 you need to install the dsclient runtimes to support ADSI - it available free from MS - dont have a link handy.
Top
#72587 - 2003-01-13 06:16 PM Re: GetObject("LDAP...") doesn't work on Win9x ?
mdorofeev Offline
Lurker

Registered: 2003-01-13
Posts: 2
HUGE ThankS!!!!
Ohhhh....
Jesus... I've forgotten this... [Frown]
7 times read...

Although, I Don't really need this (Since neither

$WshNetwork = CreateObject("WScript.Network")
$WshNetwork.AddWindowsPrinterConnection($prn_to_setup, $prn_drv)
nor
AddPrinterConnection
works UNDER W9x
) I wanted to make clear...
BTW, HOW DO PEOPLE AUTOMATE PRINTER INSTALLATION UNDER W9x???

P.S. The FIRST option - $WshNetwork.AddWindowsPrinterConnection just does NOT do anything WITHOUT any error on W9x

Sincerely,
Mike

Top
#72588 - 2003-01-13 06:20 PM Re: GetObject("LDAP...") doesn't work on Win9x ?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
We get rid of obsolete and unsupported operating systems at the earliest time possible [Wink]
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


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

Who's Online
0 registered and 484 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.05 seconds in which 0.024 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