3

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.

Ben Pilbrow
  • 12,041
  • 5
  • 36
  • 57
nami
  • 131
  • 1
  • 1
  • 2

2 Answers2

4

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

dogmanky
  • 309
  • 1
  • 3
0

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
djangofan
  • 4,182
  • 10
  • 46
  • 59
  • 1
    You should check out the [`reg.exe` command](http://ss64.com/nt/reg.html). It can manipulate the registry directly without the need to create an intermediate .REG file. – jscott Sep 28 '11 at 00:01