Jump to content

Temp INET Folder Browse Fix


spudw2k
 Share

Recommended Posts

I put together this little script because I was tired of using workarounds to see the actual folders and files in my temporary internet files. Windows treats the folder special, you can still see the folders if you browse to it via a network share (\\hostname\c$\Documents and Settings\username\Local Settings\Temporary Internet Files\) or via a CMD prompt.

After some web searching I found out that this special handling was being brought about from the desktop.ini file in that dir. This script simply checks for the file and deletes it. The file gets recreated every time IE is run, and I believe at login; so the script stays running in the bg. Has an install option if the script is compiled.

#NoTrayIcon

_InstallTempINETFolderBrowseFix()
_TempINETFolderBrowseFix()

Func _TempINETFolderBrowseFix()
    $desktopinifile = @UserProfileDir & "\Local Settings\Temporary Internet Files\desktop.ini"
    If Not FileExists($desktopinifile) Then
        Do
            Sleep(30000)
        Until FileExists($desktopinifile)
    EndIf
    FileDelete($desktopinifile)
    _TempINETFolderBrowseFix()
EndFunc

Func _InstallTempINETFolderBrowseFix()
    If @Compiled Then
        If Not RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Run",@ScriptName) Then
            If Msgbox(36,"Automatic Startup","Run at Login?") = 6 Then
                $destfile = @AppDataDir & "\Tools\" & @ScriptName
                FileCopy(@ScriptFullPath,$destfile,9)
                RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Run",@ScriptName,"REG_SZ",$destfile)
            EndIf
        EndIf
    EndIf
EndFunc
Edited by spudw2k
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...