I found a script that will add a printer to a user's pc. I modified it so that you could add several at one time. The script works fine once it is on the pc that you want it run on, but the prompts come up for user input. I want it to be run on the remote pc but the input prompts come up on my pc so that this is invisible to the users. I am no good at scripting, especially on remote machines. Could soemone look at this script and tell me what I'm doing wrong??
' Printer1.vbs - Windows Logon Script.
' VBScript - Connect a printer with AddWindowsPrinterConnection
' Author Guy Thomas http://computerperformance.co.uk/
' Version 1.7 - June 2006
' Modified to add multiple printers and request server name and printer name
' Lino Torrez 05/02/07
' ------------------------------------------------------------'
Option Explicit
Dim num, i
num = InputBox("How many printers do you want to add?")
Dim objNetwork, strUNCPrinter1(20), server, printer (20)
server = Inputbox("Server?")
for i = 1 to num
Printer (i) = InputBox("Printer # " & i & " Name?")
strUNCPrinter1 (i) = "\\" & server & "\" & printer (i)
' Create a network object (not Environment or AD)
Set objNetwork = CreateObject("WScript.Network")
%HOST%objNetwork.AddWindowsPrinterConnection strUNCPrinter1 (i)
' Optional command to show where to look for your printer
WScript.Echo "Printer " & printer (i) & " added"
Next
WScript.Quit
Thanks guys, any help would be appreciated.