VB script to answer prompts


I am an admin who was given a vb script that uses wget to go to a website, pull down 2 files and then run the files which explodes themselves into appropriate folders. Running this script outside of my deployment tool works great. No prompts, no questions... it just goes. Running it within sccm it apparently hits some snags. It asks if I really want to use wget and then confirms that I really want to run the file (which is from MS). Is there something I can add to the script to stop it asking for this info?



0 Comments   [ + ] Show comments

Answers (4)

Posted by: A_joy3 10 years ago
Yellow Belt
So I found the answer to half of my question; for the security warning I need to add to the script the following:

Set oShell = CreateObject("WScript.Shell")

Set oEnv = oShell.Environment("Process")


oShell.Run("patch.exe", 0, true)


Now just need to tell it to run the wget without a question.... any help would be greatly appreciated!!!
Posted by: A_joy3 10 years ago
Yellow Belt
So yeah... I just didn't put the oEnv("SEE_MASK_NOZONECHECKS") = 1 before the wget command. So now it ignores the wget and the file security warning. Which, in reality, they are the same thing. Just had a duh moment. I am re-testing these changes through sccm...
Posted by: anonymous_9363 10 years ago
Red Belt
As tends to be the case, there's an alternative to using the command line WGET tool, although the script will switch to using that if the ADODB.Stream object creation fails.
Posted by: pjgeutjens 10 years ago
Red Belt
small remark about Zone Identifiers:

any files that cause Windows to pop up an "are you sure you want to..." security warning, try the following:

run the command notepad.exe <path-to-the-file>:Zone.Identifier

if it exists, this should open the stream associated with the file that contains the ZoneID. It will look something like


ZoneID = 3

Setting this to 0 will cause the file to become trusted. And no more popups [:)]

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ