View Single Post
  #1 (permalink)  
Old September 2nd, 2004, 07:25 AM
interrupt interrupt is offline
Friend of Wrox
Join Date: May 2004
Posts: 212
Thanks: 0
Thanked 0 Times in 0 Posts
Default Safe For Scripting


I have this VBscript which allows you to add a network printer. However because it calls an activeX object it errors out. Can I mark it Safe For Scripting? Here is the script:

<job id = "jobvbs">
<script language ="VBScript">
Set WshNetwork = CreateObject("WScript.Network")
PrinterPath = "\\TSCL02919\CL-Customer Services"
WshNetwork.AddWindowsPrinterConnection PrinterPath
MsgBox("Customer Services Printer Added!")


\'sync\' &lt;cr&gt;
The name specified is not recognized as an internal or external command, operable program or batch file.
Reply With Quote