Sign in to follow this  
Followers 0
leomoon

Internet Explorer Reset Problem

3 posts in this topic

#1 ·  Posted (edited)

Hi, I wrote the code below to reset internet explorer:

;IE Reset Automation
RunWait("control.exe inetcpl.cpl,,6")
WinWaitActive("Internet Properties")
Send("!s")
WinWaitActive("Reset Internet Explorer Settings")
Send("!r")
WinWaitActive("Reset Internet Explorer Settings") ;<---- Problem!!!
Send("!c")
;Disable IE Popup
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "IE8RunOnceLastShown", "REG_DWORD", "00000001")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "IE8RunOncePerInstallCompleted", "REG_DWORD", "00000001")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "IE8RunOnceCompletionTime", "REG_DWORD", "0x")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "IE8TourShown", "REG_DWORD", "00000001")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "IE8TourShownTime", "REG_DWORD", "0x")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "IE8RunOnceLastShown_TIMESTAMP", "REG_DWORD", "0x")
;Google homepage
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page", "REG_SZ", "http://www.google.ca/")
RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Secondary Start Pages")

Here is the problem. After we send Alt + R to reset, a small window will popup that will do some check marks and the close button is disabled until everything is done. Now sometimes this process will be done instantly, sometimes it will take 1 second to 12 seconds.

Is there a way to pause the script and check if Close button is enabled and then press Alt + C to close it?

Edited by leomoon

Share this post


Link to post
Share on other sites



After an hour of searching I found it. The script below will reset Internet Explorer Version 8.

_qtIeReset()

Func _qtIeReset()
    ;IE Reset Automation
    RunWait('control.exe inetcpl.cpl,,6')
    WinWaitActive('Internet Properties')
    Send('!s')
    WinWaitActive('Reset Internet Explorer Settings')
    Send('!r')
    WinWait('Reset Internet Explorer Settings')
    While Not ControlCommand('Reset Internet Explorer Settings','', 'Button1','IsEnabled','')
        Sleep(500)
    WEnd
    Send('!c')
    ;Disable IE Popup
    RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main', 'IE8RunOnceLastShown', 'REG_DWORD', '00000001')
    RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main', 'IE8RunOncePerInstallCompleted', 'REG_DWORD', '00000001')
    RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main', 'IE8RunOnceCompletionTime', 'REG_DWORD', '0x')
    RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main', 'IE8TourShown', 'REG_DWORD', '00000001')
    RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main', 'IE8TourShownTime', 'REG_DWORD', '0x')
    RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main', 'IE8RunOnceLastShown_TIMESTAMP', 'REG_DWORD', '0x')
    ;Google homepage
    RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main', 'Start Page', 'REG_SZ', 'http://www.google.ca/')
    RegDelete('HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main', 'Secondary Start Pages')
    Exit
EndFunc

Share this post


Link to post
Share on other sites

Although this thread is very old, I had to make an account to say thanks for this script. I needed to reset my IE settings and afterwards edit some registry values and this script was a very helpful reference.

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  
Followers 0