VB script to answer prompts
Hello,
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?
Thanks!!!
Alison
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?
Thanks!!!
Alison
0 Comments
[ + ] Show comments
Answers (4)
Please log in to answer
Posted by:
A_joy3
14 years ago
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")
oEnv("SEE_MASK_NOZONECHECKS") = 1
oShell.Run("patch.exe", 0, true)
oEnv.Remove("SEE_MASK_NOZONECHECKS")
Now just need to tell it to run the wget without a question.... any help would be greatly appreciated!!!
Set oShell = CreateObject("WScript.Shell")
Set oEnv = oShell.Environment("Process")
oEnv("SEE_MASK_NOZONECHECKS") = 1
oShell.Run("patch.exe", 0, true)
oEnv.Remove("SEE_MASK_NOZONECHECKS")
Now just need to tell it to run the wget without a question.... any help would be greatly appreciated!!!
Posted by:
A_joy3
14 years ago
Posted by:
anonymous_9363
14 years ago
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
14 years ago
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
Setting this to 0 will cause the file to become trusted. And no more popups [:)]
PJ
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
[ZoneTransfer]
ZoneID = 3
Setting this to 0 will cause the file to become trusted. And no more popups [:)]
PJ
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.