Solved

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

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

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

816 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

7 Experts available now in Live!

Get 1:1 Help Now