Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VBScript for deploying printer is not working for Windows Vista machines

Posted on 2007-03-26
4
Medium Priority
?
873 Views
Last Modified: 2008-02-01
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?
0
Comment
Question by:chekfu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 6

Expert Comment

by:gvlob
ID: 18794018
Can you show us your script?
0
 
LVL 1

Author Comment

by:chekfu
ID: 18798302
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
0
 
LVL 2

Accepted Solution

by:
jd2066 earned 1500 total points
ID: 18806608
I did a Google search for "Vista WScript.Network" and found the following page http://www.developersdex.com/asp/message.asp?p=593&r=5431945&page=2
So it would appear then this will happen if the user logging in has Administrator Privileges . The problem being that the script runs elevated and the user's desktop with printer connections runs non-elevated so the script fails to work.
If that is your problem you can use a script on that page to workaround this or remove the Administrator Privileges from the account.
Justin
0
 
LVL 1

Author Comment

by:chekfu
ID: 18807742
I see. There is total solution. This issue is also occured to mapping drives script.

Thanks for info.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

664 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question