Printer VB Script confirmation.



asif
07-09-2005, 10:56 PM
I'm supporting a schol where I'm using a VB script to connect network
printers so that printers are available to any user logs in.
I have placed this script in the all user startup. When this VB script runs
it pops up a confirmation message "Open File - Security Warning" - 'Do you
want to open this file'
Can I stop this message asking to confirm the execution of the script.

The script is as follows:

Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection "\\tech\HPLaser"
WshNetwork.SetDefaultPrinter "\\tech\HPLaser"

Lanwench [MVP - Exchange]
07-09-2005, 10:56 PM
In news:061E40DD-7AC5-4EF7-B4EA-EF720526777A@microsoft.com,
asif <asif@discussions.microsoft.com> typed:
> I'm supporting a schol where I'm using a VB script to connect network
> printers so that printers are available to any user logs in.
> I have placed this script in the all user startup. When this VB
> script runs it pops up a confirmation message "Open File - Security
> Warning" - 'Do you want to open this file'
> Can I stop this message asking to confirm the execution of the script.
>
> The script is as follows:
>
> Set WshNetwork = CreateObject("WScript.Network")
> WshNetwork.AddWindowsPrinterConnection "\\tech\HPLaser"
> WshNetwork.SetDefaultPrinter "\\tech\HPLaser"

What about having it be a startup script in group policy, so it doesn't run
under the context of the user logging in? I don't think it will trigger this
prompt (corrections welcome) but it also seems more efficient to run it that
way, if you want it for all computers & all users.


Printer VB Script confirmation.