Default Printer

Ever have multiple users on the same machine and you change the printer driver.  The madness!  That is until you add the defaultprinter.vps to your startup script.  Just remove the hamfound line and add the text of your printer and violla!

defaultprinter.vbs

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colPrinters = objWMIService.ExecQuery("Select * From Win32_Printer")
For Each objPrinter in colPrinters
MsgBox objPrinter.Name
If not InStr(1,objPrinter.Name, "pdf",vbTextCompare) = 0 Then
MsgBox "ham found"
objPrinter.SetDefaultPrinter
end if
Next