Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old September 2nd, 2004, 07:25 AM
Friend of Wrox
 
Join Date: May 2004
Location: , , .
Posts: 212
Thanks: 0
Thanked 0 Times in 0 Posts
Default Safe For Scripting

Hi,

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:

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


Cheers
interrupt

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




Similar Threads
Thread Thread Starter Forum Replies Last Post
md5() safe??? foddie PHP How-To 0 December 30th, 2005 10:25 PM
Is it safe to use pwdencrypt and pwdcompare pinkuisadear SQL Server 2000 4 February 18th, 2005 08:50 AM
Are you using Visual Source Safe? xgbnow Pro VB 6 9 February 9th, 2004 06:31 PM
Thread safe ejbs Indian Ocean J2EE 0 September 20th, 2003 03:55 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.