Created
September 3, 2014 05:27
-
-
Save sshopov/fa39206d366915724ec6 to your computer and use it in GitHub Desktop.
IE7 sometimes complains that a JavaScript script is running too slow and asks the user whether they want to terminate it or continue. To get rid of this annoying popup a few changes need to be made to the registry. ref: http://www.itwriting.com/blog/119-ie7-script-madness.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Microsoft.Win32; | |
namespace RegistryUpdateForIEScriptProblem | |
{ | |
class Program | |
{ | |
/// <summary> | |
/// IE7 sometimes complains that a JavaScript script is running too slow and asks the user whether they want to terminate it or continue. | |
/// To get rid of this annoying popup a few changes need to be made to the registry. | |
/// ref: http://www.itwriting.com/blog/119-ie7-script-madness.html | |
/// </summary> | |
/// <param name="args"></param> | |
static void Main(string[] args) | |
{ | |
RegistryKey RegKeyWrite = Registry.CurrentUser; | |
RegKeyWrite = RegKeyWrite.CreateSubKey(@"Software\Microsoft\Internet Explorer\Styles"); | |
RegKeyWrite.SetValue("MaxScriptStatements", 1000000000); | |
RegKeyWrite.Close(); | |
RegistryKey RegKeyRead = Registry.CurrentUser; | |
RegKeyRead = RegKeyRead.OpenSubKey(@"Software\Microsoft\Internet Explorer\Styles"); | |
Object regSuccessful = RegKeyRead.GetValue("MaxScriptStatements"); | |
RegKeyRead.Close(); | |
Console.WriteLine("IE7 will no longer complain about scripts running too slow"); | |
Console.ReadLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment