none
How to Reset Internet Explorer 7+ settings from command line

    Question

  • Is there a way to reset Internet Explorer 7/8 zone security settings in vbscript. Either by using InetCPL.cpl or creating an object of InternetExplorer.Application on Windows Vista and Windows 7.

    Friday, June 18, 2010 9:48 AM

All replies

  • Theunis Potgieter wrote:

    Is there a way to reset Internet Explorer 7/8 zone security settings  in vbscript.

    These settings are stored in registry. Conceivably, you can manipulate  them with WshShell.RegWrite et al. See e.g.

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet  Settings\Zones\3

    (3 for Internet zone).

    The "official" way to inspect and modify security settings is via  IInternetZoneManager interface, but it's not automation-compatible and  so can't be used from VBScript.


    Igor Tandetnik

    Friday, June 18, 2010 12:22 PM
  • Just save as a .vbs and run from an admin cmd prompt

    'IE 7/8 Reset Automation

    Set objAP = CreateObject("wscript.shell")

      objAP.Run "rundll32.exe inetcpl.cpl ResetIEtoDefaults"

      wscript.sleep 1000

      objAP.AppActivate "Reset Internet Explorer Settings"

      objAP.SendKeys "%r", True

      wscript.sleep 2000

    If objAP.AppActivate("Reset Internet Explorer Settings") Then objAP.SendKeys "%c"

      wscript.sleep 2000

    If objAP.AppActivate("Reset Internet Explorer Settings") Then objAP.SendKeys "%c"

      wscript.sleep 2000

    If objAP.AppActivate("Reset Internet Explorer Settings") Then objAP.SendKeys "%c"

    If this works for you, please be sure to vote. Thanks.

    • Edited by Mark Kroehler Wednesday, October 09, 2013 3:53 PM Spacing
    Wednesday, October 09, 2013 3:52 PM