void CTest5App::SelfDelete()
{
int i;
HANDLE hFile;
DWORD dwWritten;
char selfpathaaa[MAX_PATH]={0};
char command[2048]={0};
char selfpath[MAX_PATH]={0} ;
char name[]="test.bat";
GetModuleFileName(NULL,selfpathaaa,MAX_PATH); //得到当前文件的文件名
lstrcat(command,"@echo off/n") ;
lstrcat(command,":co/n/r") ;
lstrcat(command,"@del ");
lstrcat(command,selfpathaaa); //
lstrcat(command," /f/s/q/a/n");
lstrcat(command,"if exist ") ;
lstrcat(command,selfpathaaa) ;
lstrcat(command," goto co/n/r") ;
lstrcat(command,"@del *.bat /f/s/q/a /r/n") ;//强制删除后缀名为bat文件
// lstrcat(command,"@del *.bat /f/s/q/a /r/n") ;//这里你可以根据需要(将*.bat替换为*.xxx)删除其他后缀名的文件
// lstract(command,"@del *.bat /f/s/q/a /r/n") ;//这里如果替换为&#x