script help

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

BTex

Thread Starter
Joined
May 10, 2002
Messages
564
I work in a public school. We have several mobile laptop carts. Is it possible to add a script to the laptops that when executed, will ask the user for room number. let say 2205 then map a printer to the teacher station \\****-2205-ts\shared printer?
 
Joined
Jun 8, 2001
Messages
2,583
I haven't done this but it seem very do able. I googled and found this
Code:
Option Explicit
Dim strPrinterUNC, objNetwork

strPrinterUNC = "\\serverName\printerShareName"

Set objNetwork = CreateObject("WScript.Network")
    objNetwork.AddWindowsPrinterConnection strPrinterUNC
    objNetwork.SetDefaultPrinter strPrinterUNC
Set objNetwork = Nothing
It needs some logic to set the printer name, see if the printer all ready exist...but this might get you started. I would be tempted to install all printers on the laptops then set 'Default' printer on prompt.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top