1
我想將stdout發送到每個打印機帶有日期戳記和位置的日誌文件。嘗試將stdout重定向到文件
On Error resume Next
Dim objNetwork, StdIn, StdOut
'Initialize the printer connections object
Set objNetwork = CreateObject("WScript.Network")
Set StdIn = WScript.StdIn
Set StdOut = WScript.StdOut
'Connect each printer
objNetwork.AddWindowsPrinterConnection "\\server\pr01"
objNetwork.AddWindowsPrinterConnection "\\server\pr02"
objNetwork.AddWindowsPrinterConnection "\\server\pr03"
'Remove old printers
'objNetwork.RemoveWindowsPrinterConnection "\\old_server\printer_1"
'objNetwork.RemoveWindowsPrinterConnection "\\old_server\printer_2