Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Network Printer Install

Status
Not open for further replies.

Spilogale

IS-IT--Management
Jul 10, 2014
14
0
0
US
So I am not 100% where this post might fall under if this is wrong please let me know.

I work in for a corporation that involves computer users of varied levels and abilities. We have a print server and in some cases people can add the printer to their computer all by themselves. Others have no clue and we have to visit them either remotly or physically to install the printers for them. Many of the computers are shared and a printer needs to be installed to each profile. Often having to install the printer to multiple users on the same computer. Is there a script or an app that we can drop on their desktop that says "Add a Printer", the user would then click on app and a dialog pop up asking for the network name of a printer. (All printers are currently clearly labeled with a sticker that has it netowrk name ip address model information etc. Including a "if this is broken call this number".) The user would then just simply type in the network name of the printer hit ok and the script would automatically install the printer for them. Some users only need to install 1 printer and some users need to install many printers (4-5). We have attempt to write instructions for installing a network printer but they still manage to screw it up. Any ideas how this script or app might be written to do this? Any help would be great. Thank you in advance.
 
Never mind wrote one myself : Just update items in red

strInput = UserInput( "Please enter the network name of the printer you would like to install (example: Printer Name) :" )

Function UserInput( myPrompt )
' Check if the script runs in CSCRIPT.EXE
If UCase( Right( WScript.FullName, 12 ) ) = "\CSCRIPT.EXE" Then
' If so, use StdIn and StdOut
WScript.StdOut.Write myPrompt & " "
UserInput = WScript.StdIn.ReadLine
Else
' If not, use InputBox( )
UserInput = InputBox( myPrompt )
End If

End Function

Dim net
Set net = CreateObject("WScript.Network")
on error resume next
net.AddWindowsPrinterConnection "\\networkPath\"& strInput

' Set the default printer now
net.SetDefaultPrinter "\\networkpath\"& strInput
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top