'(c) 2016 Ramesh Srinivasan. 'This script restores the default folder view (fflags) in Explorer. 'Based on my earlier registry edits in the year 2010 'Script written on Jan 31 2016 'http://www.winhelponline.com/blog Option Explicit Dim WshShell, strBagsKeyPath, Rtn, strBagMRUKeyPath, strDelCmd, Process Set WshShell = WScript.CreateObject("WScript.Shell") strBagsKeyPath = "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\" strBagMRUKeyPath = "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU\" ClearSavedViews RestartShell WScript.Sleep(2000) Rtn = WshShell.run ("explorer.exe ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}", 1, True) WScript.Sleep(2000) Sub ClearSavedViews() strDelCmd = "%comspec% /k reg.exe DELETE " & Chr(34) & Left(strBagsKeyPath, Len(strBagsKeyPath) -1) & Chr(34) & " /F" WshShell.Exec strDelCmd WScript.Sleep(1000) strDelCmd = "%comspec% /k reg.exe DELETE " & Chr(34) & Left(strBagMRUKeyPath, Len(strBagMRUKeyPath) -1) & Chr(34) & " /F" WshShell.Exec strDelCmd End Sub Sub RestartShell() For Each Process in GetObject("winmgmts:"). _ ExecQuery ("select * from Win32_Process where name='explorer.exe'") Process.terminate(0) Next End Sub Set WshShell = Nothing