Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Option Explicit
Dim strComputer
Dim strUserName
Dim strDefaultPrinter
Dim objWMIService
Dim objNetwork
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & _
"{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\cimv2")
Set objNetwork = CreateObject("Wscript.Network")
strUserName = objNetwork.UserName
strDefaultPrinter = "\\ServerName\PrinterName"
If lcase(strUserName) = "johnd" Then
WScript.Echo "set default printer"
'objNetwork.SetDefaultPrinter strDefaultPrinter
End If