Jump to content
Sign in to follow this  
tonysing

About Modifying Reg Key

Recommended Posts

tonysing

Hello guy, I have just made a update patch for IE 11, including to disable some function of IE (i.e. auto upgrade)

However, thing goes wrong when I try to modify the reg key

#RequireAdmin
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN","EnableAutoUpgrade","REG_DWORD",0)
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\BrowserEmulation","AllSitesCompatibilityMode","REG_DWORD",0)
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\BrowserEmulation","IntranetCompatibilityMode","REG_DWORD",0)

Can anyone tell one what's going wrong in my program? Thanks a lot

Share this post


Link to post
Share on other sites
lolipop

I don't see anything wrong with the sample you post. What is wrong? What error message did you receive? Perhaps you can post the whole script so we can see what's wrong.

Share this post


Link to post
Share on other sites
tonysing

After running the script, nothing happen. So that's the problem.

Those reg key remain unchanged :(

As I have to do the patch for both 32 bit and 64 bit system,

I wonder if different reg key is used in 64 bit system

Edited by tonysing

Share this post


Link to post
Share on other sites
devilman16

Are your trying to change this keys on a x64 System with a x86 compiled script?
Then you have to use:

RegWrite("HKLM64\SOFTWARE\Microsoft\Internet Explorer\MAIN","EnableAutoUpgrade","REG_DWORD",0)
RegWrite("HKLM64\SOFTWARE\Microsoft\Internet Explorer\BrowserEmulation","AllSitesCompatibilityMode","REG_DWORD",0)
RegWrite("HKLM64\SOFTWARE\Microsoft\Internet Explorer\BrowserEmulation","IntranetCompatibilityMode","REG_DWORD",0)

Cause else they will be written to:

HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeMicrosoftInternet Explorer ....

Also on x64 Systems you need to know that there exists a x64 iexplore.exe and a x86 iexplore.exe -> so you have to set the keys for the version you use

Edited by devilman16

Share this post


Link to post
Share on other sites
tonysing

Are your trying to change this keys on a x64 System with a x86 compiled script?

Then you have to use:

RegWrite("HKLM64\SOFTWARE\Microsoft\Internet Explorer\MAIN","EnableAutoUpgrade","REG_DWORD",0)
RegWrite("HKLM64\SOFTWARE\Microsoft\Internet Explorer\BrowserEmulation","AllSitesCompatibilityMode","REG_DWORD",0)
RegWrite("HKLM64\SOFTWARE\Microsoft\Internet Explorer\BrowserEmulation","IntranetCompatibilityMode","REG_DWORD",0)

Cause else they will be written to:

HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeMicrosoftInternet Explorer ....

Also on x64 Systems you need to know that there exists a x64 iexplore.exe and a x86 iexplore.exe -> so you have to set the keys for the version you use

Wow, Thanks a lot. At least it can solve my doubt. I will try it now and see if the problem is solve.

Besides, I want to know that when the modification apply on the computer? Is that after the script the keys will change immediately?

The problem is solved, thanks for your effort :)

Edited by tonysing

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×