这个程序怎么清除不了垃圾文件?
林嘉敏 2012-12-22 08:58:53 // 一键清理垃圾.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <shlobj.h> // 可替换为 windows.h
#include <shellapi.h>
int _tmain(int argc, _TCHAR* argv[])
{
// WinExec("cmd.exe ", SW_SHOWNORMAL);
WinExec("@echo off ", SW_SHOWNORMAL);
WinExec("echo 正在清除系统垃圾文件,请稍等...... ", SW_SHOWNORMAL);
WinExec("del /f /s /q %systemdrive%\*.tmp", SW_SHOWNORMAL);
WinExec("del /f /s /q %systemdrive%\*._mp", SW_SHOWNORMAL);
WinExec("del /f /s /q %systemdrive%\*.log", SW_SHOWNORMAL);
WinExec("del /f /s /q %systemdrive%\*.gid", SW_SHOWNORMAL);
WinExec("del /f /s /q %systemdrive%\*.chk", SW_SHOWNORMAL);
WinExec("del /f /s /q %systemdrive%\*.old", SW_SHOWNORMAL);
WinExec("del /f /s /q %systemdrive%\recycled\*.* ", SW_SHOWNORMAL);
WinExec("del /f /s /q %windir%\*.bak", SW_SHOWNORMAL);
WinExec("del /f /s /q %windir%\prefetch\*.*", SW_SHOWNORMAL);
WinExec("rd /s /q %windir%\temp & md %windir%\temp", SW_SHOWNORMAL);
WinExec("del /f /q %userprofile%\cookies\*.* ", SW_SHOWNORMAL);
WinExec("del /f /q %userprofile%\recent\*.* ", SW_SHOWNORMAL);
WinExec("del /f /s /q '%userprofile%\Local Settings\Temporary Internet Files\*.*' ", SW_SHOWNORMAL);
WinExec("del /f /s /q '%userprofile%\Local Settings\Temp\*.*'", SW_SHOWNORMAL);
WinExec("del /f /s /q '%userprofile%\recent\*.*' ", SW_SHOWNORMAL);
WinExec("echo 清除系统LJ完成!", SW_SHOWNORMAL);
WinExec("echo. & pause ", SW_SHOWNORMAL);
return 0;
}
这个程序怎么清除不了垃圾文件?