Hi
Can someone help me put some codes together please, I already have a script which I would like to add a check and install or not install to it.
ComputerName= LCase(WshNetwork.ComputerName)
ShortName = Left(ComputerName, 16)
Select Case ShortName
Case”computer1″
wshnetwork.addwindowsprinterconnection “\\pserver\printer1”
wshnetwork.addwindowsprinterconnection “\\pserver\colourprinter1”
WshNetwork.SetDefaultPrinter “\\pserver\printer1″
Case”computer2”
wshnetwork.addwindowsprinterconnection “\\pserver\printer2”
wshnetwork.addwindowsprinterconnection “\\pserver\colourprinter2”
WshNetwork.SetDefaultPrinter “\\pserver\printer2″
Case”computer3”
wshnetwork.addwindowsprinterconnection “\\pserver\printer3”
wshnetwork.addwindowsprinterconnection “\\pserver\colourprinter3”
WshNetwork.SetDefaultPrinter “\\pserver\printer3”
Case Else
REM WScript.Echo “Problem determining PC location.”
End Select
This vbs script is run when a user logins and it will check the computer name and if it matches installed 2 printers and make one of them the default, I want it to check if the computer already have this printer installed and if so don’t install it and check the second one and again don’t install it if it’s installed already and so on checking all the machines.
Thanks
I have changed the login script not to include the office printer and so far no errors when the users login.