How to make WIN98 Clients add network printer in W2K Active Directory

D

Delphi

My HP printer already installed in W2K with Active Directory.
WIN98 driver also install in the W2K.

I cannot go to each WIN98 clients to click Find Printer -> select
Printer and install.

How can I add this network printer to WIN98 Clients by login script?
Any example or link can refer?

Thanks.
 
J

Johan Arwidmark

Here is a logonscript example for installing printers

' Install Printers

Set objwshNetwork = CreateObject("wscript.network")
objwshNetwork.AddWindowsPrinterConnection "\\Server\PR001"
objwshNetwork.AddWindowsPrinterConnection "\\Server\PR002"

' Set default printer
objwshNetwork.SetDefaultPrinter "\\Server\PR001"

regards
Johan Arwidmark

Windows User Group - Nordic
http://www.wug-nordic.net
 
D

Delphi

Thanks Johan Arwidmark.
This will be work fine for W2K client.
However, when I want to do that for WIN98 Clients, error displayed.

The script for win98 Client will like that :

Set WshNetwork = WScript.CreateObject("WScript.Network")
PrinterPath = "\\Myserver\HPLaserJ5"
PrinterDriver = "HP LaserJet 5"
WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver

This script save as sample.vbs and I tested in one of the WIN98 Client
and type "wscript sample.vbs"

Error Message will display : Object not support this properity or
method : WshNetwork.AddWindowsPrinterConnection

As I have found information about window script, some document stated
that printer drive must pre-installed in win98 in order to use
addwindowsprinterconnection. But is it meaningful to do so? Just go to
each computer to find from AD and choose printer can do all thing.
 
J

Johan Arwidmark

Correct, Windows 98 clients like the PrinterDriver to be specified
(not needed on Win2K)

I guess recommending you leaving the toy operating system line isn't
any help....

regards
Johan Arwidmark

Windows User Group - Nordic
http://www.wug-nordic.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top