Solved

Need help changing advanced -> security settings in IE via VBS

Posted on 2009-05-11
2
335 Views
Last Modified: 2012-05-06
Hello Experts,

I am new to scripting and need help with a script that that will automatically modify the settings under "Internet Options -> Advanced -> Security"

There are two checkboxes that I need checked:

"Allow active content to run files on my computer"
-and-
"Allow software to run or install even if the signature is invalid"

The workstations are subnetted in an area of the LAN where they do not have access to the Internet and they are not a part of the domain (only a mamber of a workgroup.) These workstations are used by 3rd party vendors that use cloogey applications that require ridiculous settings on IE in order for the apps to run, and I am hence directed to "make it work."

Could anyone help me with a script that I'm trying to use? So far I have been unsuccessful. See the code and thank you very much!
Option Explicit
 

Dim objRegistry

Dim strKeyPath,strValueName
 

Const HKLM = &H80000002
 

Set objRegistry = GetObject("WINMGMTS:\\.\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Internet Explorer\AdvancedOptions\CRYPTO\RUN_INV_SIG"

strValueName = "DefaultValue"

objRegistry.SetDWORDValue HKLM,strKeyPath,strValueName,1

strKeyPath = "SOFTWARE\Microsoft\Internet Explorer\AdvancedOptions\CRYPTO\LMZ_LOCKDOWN"

strValueName = "DefaultValue"

objRegistry.SetDWORDValue HKLM,strKeyPath,strValueName,1
 

WScript.Quit

Open in new window

0
Comment
Question by:cfetzer
2 Comments
 
LVL 7

Accepted Solution

by:
Hubasan earned 500 total points
ID: 24356220
Hi cfetzer,

The script you have attached above will not work on IE 7 as far as I know. I have tested it on my builds and it doesn't work.
My script below, will work and you can use it to change those two settings for IE 7 on a single computer. You would need to deploy this script to all PC's and then execute it under currently logged on user's credentials for it to work properly, since the script is changing HKEY_CURRENT_USER registry keys. This means, that once you execute this script as a logged on user (who ever that might be) if somebody else logs on to that same PC, they will NOT have these settings anymore and you will have to execute this script again on the same PC but for that different user again.

There are several ways you can avoid this, and one of them is "Active Setup" with a custom built MSI file that you can create and then import these registry keys in it. Once installed, this MSI file would "self-heal" and install these user registry keys for every user that logs-in to that workstation.

Hope this information helps you.

Set oWS = CreateObject("WScript.Shell")
 

oWS.Run "REG ADD " & chr(34) & "HKCU\Software\Microsoft\Internet Explorer\Download" &_

	Chr(34) & " /v RunInvalidSignatures /t REG_DWORD /d 1 /f" & Chr(34),0,False

	

oWS.Run "REG ADD " & chr(34) & "HKCU\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_LOCALMACHINE_LOCKDOWN" &_

	Chr(34) & " /v iexplore.exe /t REG_DWORD /d 0 /f" & Chr(34),0,False

Open in new window

0
 
LVL 1

Author Comment

by:cfetzer
ID: 24356444
Thank you Hubasan! This works and solves my problem.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How can I do this in Pyhton? 12 116
Scripting vs. Programming languages 25 151
Powershell script to pull Info from all server within a domain 4 56
Sending Attachment via CDO 3 58
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now