Dear All,
I am trying to implement a system in the school where by computers only have access to the printer which is in the same room as them..
To acheive this task, i have found a couple of simple .vbs scripts (see the bottom of this post im sure a lot of you have seen these before)
How can i implement these on a per room basis? In my active directory I have containers set up for each room, I have tried adding the scripts under computer configuration --> startup and shutdown scripts and also under user configuration logon and logoff scripts but they dont seem to work.
If i copy these scripts into a test students home folder and run them manually they work fine, so the rights are set up ok.
Is there a better way that I should be doing this?
Please help, this would really earn me some much needed brownie points (there is a governers meeting on whether to make me Network Manager on March 14th)!!!!
My Scripts
Adding A Printer
' Example VBScript to map a printer on a server
' Guy Thomas February 2004.
' ******************************
Option Explicit
Dim netPrinter, UNCpath
UNCpath = "\\server1\PRLaserjet"
Set netPrinter = CreateObject("WScript.Network")
netPrinter.AddWindowsPrinterConnection UNCpath
WScript.Quit
' End of example VBScript
Removing A Printer
' Example VBScript to remove a Printer
' Guy Thomas February 2004.
' ******************************
Option Explicit
Dim DelPrint, UNCpath
UNCpath = "\\server1\PRLaserjet"
Set DelPrint = WScript.CreateObject("WScript.Network")
DelPrint.RemovePrinterConnection UNCpath, true, true
WScript.Quit
' End of Example Script to remove printer
