Jump to content

lumpeh

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by lumpeh

  1. I'm kinda hoping that with only a few schools in the city under discussion, the rest canceled that RM will decide not to go ahead due to making a loss on the service than a profit. We can live in hope right?...
  2. Environmental Variables are your friends here! We use a (part of the server 2003 admin tools?) free utility called setx.exe via a batch file assigned to the startup scripts for a particular OU, which in turn relates to a particular room those computers are in. For instance i have an OU called 'B2' which is also the name of a classroom with those pcs in. In the startup scripts i have a batch file that runs 'C:\Scripts\SETX PRINT_TIME B2 -m' where PRINT_TIME is the variable name, B2 the value and the '-m' so that it is set as a machine variable. Once the desktop has ran this, it will stick for the rest of its OS install. Then when the user logs on a VBS runs that can query the environmental variables for thise and its value, then use a SELECT statement to run the correct printer connection line. Example; Dim WshShell Dim WshNetwork Dim strPrintVar on error resume next Set WshShell = WScript.CreateObject("WScript.Shell") Set WshNetwork = WScript.CreateObject("WScript.Network") Set strPrintVar = WshShell.Environment("SYSTEM") Select Case strPrintVar("PRINT_TIME") Case "B2" WshNetwork.AddWindowsPrinterConnection "\\DATA\B2-3-COLOUR" WshNetwork.SetDefaultPrinter "\\DATA\B2-3-COLOUR" Case "B3" WshNetwork.AddWindowsPrinterConnection "\\DATA\B2-B3 Laser Printer" WshNetwork.SetDefaultPrinter "\\DATA\B2-B3 Laser Printer" End Select We also have a script that deletes all network based printers off the users account as they log off but thats a straight rip from The Scripting Guy website if you search for it You can add as many printers as need - we have about 30 of them and it only takes 1-2 seconds for the script to run on a modest desktop.
×
×
  • Create New...