MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically.
ding8503 posted a topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)I'm new to VB scripts, and having issues wrapping my head around how to do this. I have a simple script written to put on machine by machine that will set default printer, but looking to write one to apply through Domain policy to cover all. We have some computers installed in cars that have local USB connections to Brother Pocket Jet printers (some Brother Pocket Jet 3 Plus and some Brother PJ-623). I’m trying to write a script that on can be applied to user OU from AD that when the user logs in the script will look to see if one of the Brother printers are installed, if so make that the default printer. If the script finds that there is not a Brother printer I want it to connect to a network share printer and set the network share as the default. It would be nice to set the network share as a printer to for all computers, just set the default depending on the Brother printers. Thanks in advanced for any and all help. Here is the only thing I have now. Set WshNetwork = CreateObject("WScript.Network") WshNetwork.AddWindowsPrinterConnection "\\Server\printer" WshNetwork.SetDefaultPrinter "\\Server\printer"