Follow

I get a 'Security Warning' when I try to execute a shortcut in a script

The security warning prompt is caused by a change in Windows XP SP2. There is a workaround on the Microsoft website (http://support.microsoft.com/kb/889815).

To work around the problem add the following code to your script:

set oShell= CreateObject("Wscript.Shell")
set oEnv = oShell.Environment("PROCESS")
oEnv("SEE_MASK_NOZONECHECKS") = 1

oShell.Run "c:\windows\erunas.exe c:\windows\example.eras",0,True

oEnv.Remove("SEE_MASK_NOZONECHECKS")

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk