搜集了几个超赞的方法:
1.删除临时文件 Temporary Internet Files:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
2. 删除Cookies:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
3. 删除历史History:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1
4.删除表单文件:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16
5.删除保存的密码:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32
6. 删除所有:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
7.删除所有,以及保存在Add-ons里的东东:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351
结果ruby,程序如下:
require 'win32ole'
ai = WIN32OLE.new("AutoItX3.Control")
ai.RunWait("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255")
sleep(2)