Disable programmatically message "The publisher could not be verified. Are you sure you want to run this software" message in a vbs script when you run a external program.
The Open File - Security Warning dialog box is displayed when you try to run a program using a Visual Basic script.
Dim oEnvProc, oEnv
'Set Environment objects
On Error Resume Next
Set oEnv = oShell.Environment("System")
Set oEnvProc = oShell.Environment("Process")
On Error Goto 0
' Disable Security Warning dialog box -- KB889815
oEnvProc("SEE_MASK_NOZONECHECKS") = 1
oEnv("SEE_MASK_NOZONECHECKS") = 1
'
'Execute you command or exe file here
'
' Enable Security Warning dialog box -- KB889815
oEnvProc.Remove("SEE_MASK_NOZONECHECKS")
oEnv.Remove("SEE_MASK_NOZONECHECKS")
Microsoft
| Article ID |
: |
889815 |
| Last Review |
: |
August 13, 2007 |
| Revision |
: |
4.4
|
When you try to use a Microsoft Visual Basic script to silently install a hotfix or an update on a Microsoft Windows XP Service Pack 2 (SP2)-based computer, you receive an Open File - Security Warning dialog box.
The Open File - Security Warning dialog box is displayed when you try to silently install a hotfix or an update by using a Visual Basic script in Windows XP Service Pack 2. http://support.microsoft.com/kb/889815/en-us