|
AddWindowsPrinterConnection (WshNetwork オブジェクト)
Windows NT/2000:
object.AddWindowsPrinterConnection(path) Windows 9x/Me: object.AddWindowsPrinterConnection(path, drive, [port]) 引数
解説
Windows ベースのプリンタ接続をコンピュータ システムに追加します。 使用例
' Windows NT/2000の場合
Set WshNetwork = WScript.CreateObject("WScript.Network")
PrinterPath = "\\Server1\Printer1"
WshNetwork.AddWindowsPrinterConnection PrinterPath
' Windows 9x/Meの場合
Set WshNetwork = WScript.CreateObject("WScript.Network")
PrinterPath = "\\Server1\Printer1"
PrinterDriver = "Canon Printer Driver"
WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver
関連項目
ComputerName|UserDomain|UserName|AddPrinterConnection|EnumNetworkDrives|EnumPrinterConnection|MapNetworkDrive|RemoveNetworkDrive| |
WSHリファレンス
FileSystemObject オブジェクト Drive オブジェクト Folder オブジェクト File オブジェクト Drives コレクション Folders コレクション Files コレクション |