在nt下你可以使用 MoveFileExThe MoveFileEx function moves an existing file or directory.The MoveFileWithProgress function is equivalent to the MoveFileEx function, except that MoveFileWithProgress allows you to provide a callback function that receives progress notifications.BOOL MoveFileEx( LPCTSTR lpExistingFileName, LPCTSTR lpNewFileName, DWORD dwFlags ); MoveFileEx(szSrcFile, szDstFile, MOVEFILE_DELAY_UNTIL_REBOOT);具体参考 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/movefileex.asp 98下你需要操作wininit文件 http://cndev.6to23.com/docviewer.asp?docid=4355
del driverpath:filename
记忆中是这样
G, FILE_FLAG_DELETE_ON_CLOSE, NULL);
MoveFileExThe MoveFileEx function moves an existing file or directory.The MoveFileWithProgress function is equivalent to the MoveFileEx function, except that MoveFileWithProgress allows you to provide a callback function that receives progress notifications.BOOL MoveFileEx(
LPCTSTR lpExistingFileName,
LPCTSTR lpNewFileName,
DWORD dwFlags
);
MoveFileEx(szSrcFile, szDstFile, MOVEFILE_DELAY_UNTIL_REBOOT);具体参考
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/movefileex.asp
98下你需要操作wininit文件
http://cndev.6to23.com/docviewer.asp?docid=4355
很多办法, 一将 某一个文件还原为原来的文件,
采用写保护
二,写一个脚本,del 此文件
三,写一个exe ,使用api
ON_MESSAGE(WM_QUERYENDSESSION,OnQueryEndSession)
afx_msg BOOL OnQueryEndSession(WPARAM wReserved,LPARAM lEndReason);
BOOL CMainFrame::OnQueryEndSession(WPARAM wReserved,LPARAM lEndReason)
{
if(lEndReason==ENDSESSION_LOGOFF)
{
/// 删除你要删的东西
return TRUE;
}
else
{
return false;
}
return TRUE;
}