The collection WshNetwork.EnumPrinterConnectionsdoes not provide any default printer information. You can try to get the default printer name from the registry, although I'm not sure how reliable it is:
Set oShell = CreateObject("WScript.Shell")
strValue = "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device"
strPrinter = oShell.RegRead(strValue)
strPrinter = Split(strPrinter, ",")(0)
WScript.Echo strPrinter
WMI, , WMI Windows. , Win32_Printer.Default, , , Windows 2000/NT. , Windows, PRINTER_ATTRIBUTE_DEFAULT Attribute:
Const ATTR_DEFAULT = 4
strComputer = "."
Set oWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colPrinters = oWMI.ExecQuery("SELECT * FROM Win32_Printer")
For Each oPrinter in colPrinters
If oPrinter.Attributes And ATTR_DEFAULT Then
Wscript.Echo oPrinter.ShareName
End If
Next
Windows.
. , , ! : ?