Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE Protected Mode for Local System Account

I have a Windows Service that runs a Team City Build agent on a Windows 7 OS.

This agent triggers NUnit tests which use the Selenium IE web drivers to execute a series of tests.

For the Selenium IE web drivers to work the protected mode for all zones needs to be set to the same value (either protected mode on or off).

The problem is the default settings for the Local System Account are invalid (some zones are running in protected mode, others are not).

Can anyone can tell me how to change the protected mode settings for either all users or the Local System Account user?

like image 318
Shaun Avatar asked Aug 29 '11 21:08

Shaun


1 Answers

Here is the solution (and I've been to every corner of the Internet in order to get this):

Fire up RegEdit and go to this key:

HKEY_USERS\S-1-5-18\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones

On my machine (Windows 7) the Local System account is S-1-5-18. This might be the same for all versions of Windows, but I don't know about that.

In that registry key, there are five more keys 1, 2, 3, 4 and 5 - each representing a Zone.

For every zone, if there is a DWORD value with the name "2500", set its value to 0 to turn protected mode off. Note that you don't have to add it if it isn't there.

The value "2500" is supposed to control the tick box "Enable protected mode".

UPDATE (from an anon user):

A graphical way of doing the same is to ensure the "Interactive Services Detection" service (UI0Detect) is running (note that Windows 8/2012 and later need the HKLM\SYSTEM\CurrentControlSet\Control\Windows\NoInteractiveServices registry key to be set correctly in order for the popup to appear) get hold of psexec and run

psexec -si 0 "C:\Program Files\Internet Explorer\iexplore.exe"

In the popup click on View the message, then after the screen switches in Internet Explorer go to Tools -> Internet options | Security and check the Security level for each zone.

Happy UI testing!

like image 106
Mikael Östberg Avatar answered Oct 01 '22 20:10

Mikael Östberg