Solved

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

Posted on 2009-05-11
2
332 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

747 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

10 Experts available now in Live!

Get 1:1 Help Now