Solved

VBScript for deploying printer is not working for Windows Vista machines

Posted on 2007-03-26
4
867 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 500 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Well hello again!  Glad to see you've made it this far without giving up.  In this, the fourth installment of my popular series, I'm going to cover functions and subroutines, what they are, and why they are useful.  Just in case you stumbled onto th…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

617 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