Solved

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

Posted on 2009-05-11
2
354 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
This article will show, step by step, how to integrate R code into a R Sweave document
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
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.

626 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