问题
I am using "deleteURLCacheEntry" Wininet API to delete temporary internet files on Win7/Vista IE 7/8 respectively. The API works perfectly fine when IE's protected mode is OFF. But it fails silently when the protected mode is ON. Can somebody advise me how to delete the temporary internet files programmatically when PROTECTED MODE is ON?
I am basically using the program given in the following msdn link:
http://support.microsoft.com/kb/815718
Thank you.
回答1:
Actually, take a look at my two questions on DeleteUrlCacheEntry failing without providing any information here: The second link contains examples of items it is failing on:
How To Get DeleteUrlCacheEntry() Error Codes? (Or additional information on why a particular deletion didn't work)?
and...
https://stackoverflow.com/questions/12096546/deleteurlcacheentry-function-of-wininet-api-not-deleting-some-internet-explo
Now, check out this document from MSDN, and let me know if it helped you out or if it turns out to be the solution...
Understanding and Working in Protected Mode Internet Explorer
http://msdn.microsoft.com/en-us/library/bb250462(v=vs.85).aspx
The fact that you have tied your question to the "Protected Mode" issue has enlightened me somewhat as well (in terms of trying to answer my two questions) so I will now continue to investigate this as a possible solution.
The MSDN article I have linked to pretty much lets you make Registry Entries to allow your program additional access to things that are typically blocked under Protected Mode. I cannot confirm that this is the solution to your or my questions, however, I have a strong feeling it may be.
Please do keep us posted, and feel free to edit the tagging of your question in order for it to reflect the programming languages you are using DeleteUrlCacheEntry with.
来源:https://stackoverflow.com/questions/4588788/deleteurlcacheentry-doesnot-delete-temporary-internet-files-when-protected-mode