电脑上网后如何更好的清除历史记录呢?请支招
发布网友
发布时间:2024-09-30 17:33
我来回答
共5个回答
热心网友
时间:2024-10-20 14:59
不用过多依赖软件来帮忙。 我帮你写个批处理文件。把电脑的垃圾一次性搞定。
@echo off
echo. & pause
echo 正在清除系统垃圾文件,请稍等......
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\cookies\*.*
del /f /q %userprofile%\recent\*.*
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%userprofile%\recent\*.*"
echo 清除系统垃圾完成!
echo. & pause
呵呵。 你会发现用完之后机器会快很多!
热心网友
时间:2024-10-20 14:59
http://www.onlinedown.net/soft/2636.htm 超级兔子
在”超级兔子清理王”里面
热心网友
时间:2024-10-20 14:59
用雅虎助手 我一直用 相当不错
热心网友
时间:2024-10-20 15:00
安装一个黄山ie修复器试一下
热心网友
时间:2024-10-20 15:01
清除Internet Explorer临时文件 在TfrmMain你必须引用WinINet单元 Uses WinINet; 然后放上一个TButton按钮命名为btnEmptyCache,加入以下代码:
Procere TfrmMain.btnEmptyCacheClick( Sender : TObject );
Var
lpEntryInfo : PInternetCacheEntryInfo;
hCacheDir : LongWord;
dwEntrySize : LongWord;
dwLastError : LongWord;
Begin
dwEntrySize := 0;
FindFirstUrlCacheEntry(NIL,TInternetCacheEntryInfoNIL^ ),dwEntrySize );
GetMem( lpEntryInfo, dwEntrySize );
hCacheDir := FindFirstUrlCacheEntry( NIL, lpEntryInfo^,
dwEntrySize );
If ( hCacheDir <> 0 ) Then
DeleteUrlCacheEntry( lpEntryInfo^.lpszSourceUrlName );
FreeMem( lpEntryInfo );
Repeat
dwEntrySize := 0;
FindNextUrlCacheEntry( hCacheDir, TInternetCacheEntryInfo(
NIL^ ), dwEntrySize );
dwLastError := GetLastError();
If ( GetLastError = ERROR_INSUFFICIENT_BUFFER ) Then Begin
GetMem( lpEntryInfo, dwEntrySize );
If ( FindNextUrlCacheEntry( hCacheDir, lpEntryInfo^,
dwEntrySize ) ) Then
DeleteUrlCacheEntry( lpEntryInfo^.lpszSourceUrlName );
FreeMem(lpEntryInfo);
End;
Until ( dwLastError = ERROR_NO_MORE_ITEMS );
End;
*********************
type
TSTATURL = record
cbSize: DWORD;
pwcsUrl: DWORD;
pwcsTitle: DWORD;
ftLastVisited: FILETIME;
ftLastUpdated: FILETIME;
ftExpires: FILETIME;
dwFlags: DWORD;
end;
type
IEnumSTATURL = interface(IUnknown)
['{3C374A42-BAE4-11CF-BF7D-00AA006946EE}']
function Next(celt: Integer; out elt; pceltFetched: PLongint): HRESULT; stdcall;
function Skip(celt: Longint): HRESULT; stdcall;
function Reset: HResult; stdcall;
function Clone(out ppenum: IEnumSTATURL): HResult; stdcall;
function SetFilter(poszFilter: PWideChar; dwFlags: DWORD): HResult; stdcall;
end;
type
IUrlHistoryStg = interface(IUnknown)
['{3C374A41-BAE4-11CF-BF7D-00AA006946EE}']
function AddUrl(pocsUrl: PWideChar; pocsTitle: PWideChar; dwFlags: Integer): HResult; stdcall;
function DeleteUrl(pocsUrl: PWideChar; dwFlags: Integer): HResult; stdcall;
function QueryUrl(pocsUrl: PWideChar; dwFlags: Integer; var lpSTATURL: TSTATURL): HResult; stdcall;
function BindToObject(pocsUrl: PWideChar; var riid: TGUID; out ppvOut: Pointer): HResult; stdcall;
function EnumUrls(out ppenum: IEnumSTATURL): HResult; stdcall;
end;
type
IUrlHistoryStg2 = interface(IUrlHistoryStg)
['{AFA0DC11-C313-11D0-831A-00C04FD5AE38}']
function AddUrlAndNotify(pocsUrl: PWideChar; pocsTitle: PWideChar; dwFlags: Integer;
fWriteHistory: Integer; var poctNotify: Pointer;
const punkISFolder: IUnknown): HResult; stdcall;
function ClearHistory: HResult; stdcall;
end;
function ClearIEHistory:integer;
const
CLSID_CUrlHistory: TGUID = '{3C374A40-BAE4-11CF-BF7D-00AA006946EE}';
var
IEHistory:IUrlHistoryStg2;
begin
IEHistory:=CreateComObject(CLSID_CUrlHistory) as IUrlHistoryStg2;
IEHistory.ClearHistory;
end;
procere TForm1.Button1Click(Sender: TObject);
begin
ClearIEHistory;
end;
**********************
uses wininet;
procere TForm1.Button1Click(Sender: TObject);
var
cache_info:PInternetCacheEntryInfo;
cbSizeOf_Cache_info:dword;
hw:hwnd;
buf:tstrings;
begin
// buf:=tstringlist.Create;
new(cache_info);
hw:=FindFirstUrlCacheEntryEx(nil,0,NORMAL_CACHE_ENTRY or URLHISTORY_CACHE_ENTRY,0,cache_info,@cbSizeOf_Cache_info,nil,nil,nil);
if hw<>0 then
begin
DeleteUrlCacheEntry(cache_info.lpszSourceUrlName);
// buf.Add(cache_info.lpszSourceUrlName);
while FindNextUrlCacheEntryEx(hw,cache_info,@cbSizeOf_Cache_info,nil,nil,nil) do
// buf.Add(cache_info.lpszSourceUrlName);
DeleteUrlCacheEntry(cache_info.lpszSourceUrlName);
end;
FindCloseUrlCache(hw);
dispose(cache_info);
// showmessage(buf.Text);
// buf.Free;
end;