Link to home
Start Free TrialLog in
Avatar of chekfu
chekfu

asked on

VBScript for deploying printer is not working for Windows Vista machines

VBscript for deploying shared printer is not working for Windows Vista.

It was perfectly working for current machines which are running in Windows XP Professional and Windows 2000 Professional.

I use two newly purchased machines come with pre-loaded Windows Vista Business. Two machines are successfully joined domain. However, it was no printer deployed through GPO.

Any idea?
Avatar of George Lob
George Lob
Flag of United States of America image

Can you show us your script?
Avatar of chekfu
chekfu

ASKER

Here you go:

Option Explicit
Dim objNetwork, Printer1, Printer2, Printer3, Printer4

Printer1 = "\\server01\PRN001"
Printer2 = "\\server01\PRN002"
Printer3 = "\\server01\PRN004"
Printer4 = "\\server01\PRN005"

Set objNetwork = CreateObject("WScript.Network")

objNetwork.AddWindowsPrinterConnection Printer1
objNetwork.AddWindowsPrinterConnection Printer2
objNetwork.AddWindowsPrinterConnection Printer3
objNetwork.AddWindowsPrinterConnection Printer4
WScript.Quit
ASKER CERTIFIED SOLUTION
Avatar of jd2066
jd2066

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chekfu

ASKER

I see. There is total solution. This issue is also occured to mapping drives script.

Thanks for info.