Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
'==========================================================================
'
' NAME: EmptyTempAndIETempFolders.vbs
'
' AUTHOR: Mark D. MacLachlan , The Spider's Parlor
' URL: [URL unfurl="true"]http://www.thespidersparlor.com[/URL]
' DATE : 4/9/2005
'
' COMMENT: Empty's user temp folder and IE Temp Internet Folders
'
'==========================================================================
Dim WSHShell
Dim colUsrEnvVars
Dim fso
Dim oFolder
Dim oFile
Dim oSubFolder
Dim Path
Dim IEPath
Set WSHShell = CreateObject("WScript.Shell")
Set colUsrEnvVars = WSHShell.Environment("USER")
Set fso = CreateObject("Scripting.FileSystemObject")
Path = colUsrEnvVars("Temp")
'Comment out the following line if you want to keep
'the Files directly in the Temp folder
KillFiles(Path)
Set oFolder = fso.GetFolder(Path)
Set colSubfolders = oFolder.Subfolders
For Each oSubfolder in colSubfolders
KillFiles(oSubFolder)
'Comment out the following line if you want to keep
'the subdirectories directories and just empty them
fso.DeleteFolder(oSubFolder)
Next
IEPath = "HKCU\Software\Microsoft\Windows\"
WSHShell.RegWrite IEPath & "ShellNoRoam\MUICache\@inetcplc.dll,-4750","Empty Temporary Internet Files folder when browser is closed","REG_SZ"
WSHShell.RegWrite IEPath & "CurrentVersion\Internet Settings\Cache\Persistent","0","REG_DWORD"
Function KillFiles(TargetDir)
Set oFolder = fso.GetFolder(TargetDir)
For Each oFile In oFolder.files
oFile.Delete True
Next
End Function