StevenTech Posted July 3, 2013 Posted July 3, 2013 Need to delete a couple keys and all subkeys to fix an issue on Windows 7 with IE 9 after removing the IE 10 update they temporary internet files is set to 0. If you try to change it you get "Please select a value between 8 and 8 for how much disk space Temporary Internet Files may use." Should be simple? Tried using RegDelete and always returns 0 - Key not found. $IE_Cache = RegDelete("HKCU\Software\Microsoft\Windows\CurrentVersion\InternetSettings\5.0\Cache") ; $IE_Cache = RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\InternetSettings\5.0\Cache") $IE_LCache = RegDelete("HKCU\Software\Microsoft\Windows\CurrentVersion\InternetSettings\5.0\LowCache") ; $IE_LCache = RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\InternetSettings\5.0\LowCache") Can browse to the key in RegEdit so tried a batch file which also returns key not found: @ECHO off REM Cache: REG QUERY "HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternetSettings5.0Cache" /k Do I have something wrong in the commands? Any suggestions on how to get these keys deleted? Can delete by hand but have 50+ machines that need this done.
SteveTech Posted July 3, 2013 Posted July 3, 2013 Tried #RequireAdmin results still say key not found. Are there any other includes I need for working on the registry? Full script below #RequireAdmin $CDel = RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\InternetSettings\5.0\Cache") $LCDel = RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\InternetSettings\5.0\LowCache") If $CDel = 1 Then $IE_Cache = "Successfuly deleted Cache." ElseIf $CDel = 0 Then $IE_Cache = "Key HKCU\Software\Microsoft\Windows\CurrentVersion\InternetSettings\5.0\Cache does not exist." ElseIf $CDel = 2 Then $IE_Cache = "Error deleting HKCU\Software\Microsoft\Windows\CurrentVersion\InternetSettings\5.0\Cache." EndIf If $LCDel = 1 Then $IE_LCache = "Successfuly deleted LowCache." ElseIf $LCDel = 0 Then $IE_LCache = "Key HKCU\Software\Microsoft\Windows\CurrentVersion\InternetSettings\5.0\LowCache does not exist." ElseIf $LCDel = 2 Then $IE_LCache = "Error deleting HKCU\Software\Microsoft\Windows\CurrentVersion\InternetSettings\5.0\LowCache." EndIf MsgBox(0,"IE Cache Delete", $IE_Cache & @CRLF & $IE_LCache)
TXTechie Posted July 3, 2013 Posted July 3, 2013 Are you running the script on a 64-bit version of Windows 7 ? If so, Windows is automatically redirecting to HKCUSoftwareWow6432NodeMicrosoft... rather than HKCUSoftwareMicrosoft.... Assuming you've compiled the script to an executable, you'll need to compile using 64-bit compilation (using the Compile X64 version. option setting).
ripdad Posted July 3, 2013 Posted July 3, 2013 See any difference? $IE_Cache = RegDelete("HKCU\Software\Microsoft\Windows\CurrentVersion\InternetSettings\5.0\Cache") $IE_Cache = RegDelete("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache") I don't know if I would delete the key, though. That's probably not wise. Why not just change the value instead? Here is an example of setting the Content CacheLimit for 4 megabytes: $IE_Cache = RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content', 'CacheLimit', 'REG_DWORD', '4096') "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward
SteveTech Posted July 5, 2013 Posted July 5, 2013 LOL dang typos, just a missing space. Fixed the missing space and script is working great. Reason for deleting these keys was found on Life of a SysAdmin blog. http://bremiclem.com/losa/2013/04/10/ie-temporary-internet-files-corruption/
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now