2

各プリンターの日付スタンプと場所を含むログファイルに 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
4

1 に答える 1