Wednesday 11 March 2015

Preventing "Open File - Security Warning" through VBScript - Advance Application Packaging


When we run any VBScript from network location Security Warning popup comes up to go further,




 To prevents "Open File - Security Warning" dialog box use below code :



'Declare this variable
Dim oEnv

'Put this piece of code after obj shell declaration
set oEnv = objShell.Environment("PROCESS")
oEnv("SEE_MASK_NOZONECHECKS") = 1

'Put this code at the last section of script
objEnv.Remove("SEE_MASK_NOZONECHECKS")

Thank you for reading.

No comments:

Post a Comment