Jump to content

Internet Explorer setting to always open maximized


MadBoy
 Share

Recommended Posts

Hopefully this will get useful for others as it did for me. My collegue found out which registry entry is responsible for Maximized option in IE and so I've scripted it.

To change the Internet Explorer setting to always open maximized you have to first 18 chars from the value as described below:

-> HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Window_Placement", "REG_BINARY"

When IE window is not maximized the key value is similar to this: 2C0000000000000001000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF160000001D0000003603000075020000

When IE window is maximized the key value is similar to this: 2C0000000200000003000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF160000001D0000003603000075020000

The only thing that changes is first 18 chars. Simply replacing them works as descrbed.

NOTE: the values after FFFFF are changing constantly depending on user settings so it will vary for every computer/user.

NOTE on the script. The script returns 1 if failed to change the key and returns 0 if everything is okey.

Global $reg_read, $reg_write
Global $reg_value = "2C0000000200000003"

$reg_read = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Window_Placement")
If $reg_read <> "" Then
    $reg_write = RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Window_Placement", "REG_BINARY", $reg_value & StringTrimLeft($reg_read, 18))
    If $reg_write = 1 Then Exit(0)
EndIf
Exit(1)

Regards,

MadBoy

My little company: Evotec (PL version: Evotec)

Link to comment
Share on other sites

The problem is that like so many things Micro$oft, it tends to change when unasked. So altering the registry must be done time and time again. This is why people have written dedicated software to deal with this, like IE Window Maximizer and AutoSizer.

Edit: Oh, and this is one of the reasons I use Firefox. :)

Edited by HeffeD
Link to comment
Share on other sites

  • 7 years later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...