Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm looking to reset Internet Explorer back to factory defaults using a batch file. I'd also like to delete: all Downloads, History, Cookies and Cache, plus anything else in a user's IE profile.

share|improve this question

2 Answers 2

There is a Powershell script to do this. You will need to tweak it for your environment/needs though. As it stands it requires human interaction. It was found on this SuperUser post & was created by Aman Dhally.

#+-------------------------------------------------------------------+   
#| = : = : = : = : = : = : = : = : = : = : = : = : = : = : = : = : = |   
#|{>/-------------------------------------------------------------\<}|            
#|: | Author:  Aman Dhally                                        | :|            
#| :| Email:   amandhally@gmail.com 
#|: | Purpose: Reset Internet Explorer Setting to Default   
#| :|       
#|: |  more info: http://newdelhipowershellusergroup.blogspot.in/                                                           
#| :|           
#|: |                 Date: 23 - July - 2012 
#|: |                            16:29 
#| :|     /^(o.o)^\    Version: 1                                    |: |  
#|{>\-------------------------------------------------------------/<}| 
#| = : = : = : = : = : = : = : = : = : = : = : = : = : = : = : = : = | 
#+-------------------------------------------------------------------+ 


## Load Assembly ## 
[void][reflection.assembly]::Load("System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") 
#-  

"`n" 
Write-Host  "  ============================================" -ForegroundColor 'Green' 
Write-Host  "   [ Resetting IE To Default Settings]" -ForegroundColor 'Red'  
Write-Host  "  ============================================" -ForegroundColor 'Green' 
"`n" 
###  
"`n" 

$arrOfficeProcs = "iexplore" 
$continue = $false 
cls 

#Check for open Office apps 
do { 
    $arrRunning = @() 

    foreach ($proc in $arrofficeProcs) { 
        if(((get-process $proc -ea SilentlyContinue) -ne $Null)){ $arrRunning += $proc }        
    } 

    if ($arrRunning.length -gt 0 ) {   
        $d = [System.Windows.Forms.MessageBox]::Show( 
        "There are currently one or more Internet Explorer windows Open.`n`nYou must close down all Internet explorer windows before reset it to default.",  
        "Reset IE Settings to Default...",  
        [System.Windows.Forms.MessageBoxButtons]::RetryCancel,  
        [System.Windows.Forms.MessageBoxIcon]::Warning ) 

        if ($d -eq [Windows.Forms.DialogResult]::Cancel) { exit } 

    } else {  
        $continue = $true 
        write-host "  No IE process are currently running"  -ForegroundColor 'Green' 
        "`n" 
        Write-Host "  Please TICK on `"Delete personal Settings`" and then click on `"Reset`" button   <====" -ForegroundColor 'Yellow'  
        "`n" 
        & RunDll32.exe InetCpl.cpl,ResetIEtoDefaults | Out-Null 
        "`n" 
        Write-Host "  ====> Please Launch Internet Explorer Now" -ForegroundColor 'Magenta'  


"`n" 
Write-Host  "  ============================================" -ForegroundColor 'Green' 
Write-Host  "   [ Resetting Done]" -ForegroundColor 'Red'  
Write-Host  "  ============================================" -ForegroundColor 'Green' 
"`n" 


    } 


} while ( $continue -eq $false ) 


#### End of the Script #### A m a n     D h a l l y ---- amandhally@gmail.com
share|improve this answer

To reset Internet Explorer automatically, follow these steps:

Note: This Microsoft Fix it is supported by Windows 7, Windows Vista and Windows XP.

  1. Download: http://go.microsoft.com/?linkid=9646978

  2. In the File Download dialog box, click Run, and then follow the steps in the wizard.

  3. In the Reset Internet Explorer Settings dialog box, click Reset.

    Click to select the Delete personal settings check box if you also want to remove browsing history, search providers, Accelerators, home pages, Tracking Protection, and ActiveX Filtering data.

  4. When Internet Explorer finishes applying the default settings, click Close, and then click Close again.

  5. Close and then start Internet Explorer.

share|improve this answer
    
yes mr thankx for ur replay .... but i looking for automatically reset each time when i logon in my pc ..... then i need batch file do that automatically .... i but this batch inside start-up folder or schedule tasks to execute it directly after each start windows –  Emad Alzaobi May 15 '13 at 10:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.