Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to change Internet Explorer security settings using a .bat or .vbs file?

Basically, I need to change IE7 and IE8 security settings for the local intranet. The settings I want to change are:

Display video and animation on a webpage that does not use external media player
Doanload signed ActiveX controls
Download unsighned ActiveX controls
Initialize and script ActiveX controls not marked as safe for scripting

These should be set to Enable

I don't know how to use Group Policies but we have network software which allows me to specify the location of a .bat/vbs file and run it on all computers in the network.

share|improve this question
add comment

2 Answers

You could accomplish this using registry hacks in your batch files, but GPO would be the appropriate and best way to go. With a GPO, you can control the the settings from being changed back by a user or rougue website. GPOs will apply every hour and 1/2 or so in most environments, whereas your scripts (I'm guessing) are more manual in nature.

Here's a good MSKB on the registry keys you can look at: http://support.microsoft.com/kb/182569

another KB for writing the batch files: http://technet.microsoft.com/en-us/library/bb727154.aspx

share|improve this answer
add comment

Yes, you can edit the registry with a batch file. For example:

@echo off
SET COREDB=CoreDB_DB
SET INSTANCE=
@echo Windows Registry Editor Version 5.00>CoreDB.reg
@echo.>>CoreDB.reg
@echo [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources]>>CoreDB.reg
@echo "%COREDB%"="SQL Server">>CoreDB.reg
@echo [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\%COREDB%]>>CoreDB.reg
@echo "Driver"="%SYSTEMDRIVE%\\WINDOWS\\system32\\sqlsrv32.dll">>CoreDB.reg
@echo "Server"="%COMPUTERNAME%%INSTANCE%">>CoreDB.reg
@echo "Database"="%COREDB%">>CoreDB.reg
@echo "Trusted_Connection"="Yes">>CoreDB.reg

@echo [HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources]>>CoreDB.reg
@echo "%COREDB%"="SQL Server">>CoreDB.reg
@echo [HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\%COREDB%]>>CoreDB.reg
@echo "Driver"="%SYSTEMDRIVE%\\WINDOWS\\system32\\sqlsrv32.dll">>CoreDB.reg
@echo "Server"="%COMPUTERNAME%INSTANCE%">>CoreDB.reg
@echo "Database"="%COREDB%">>CoreDB.reg
@echo "Trusted_Connection"="Yes">>CoreDB.reg

regedit /s CoreDB.reg
share|improve this answer
1  
You should check out the reg.exe command. It can manipulate the registry directly without the need to create an intermediate .REG file. –  jscott Sep 28 '11 at 0:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.