This tool allows you to delete or move files at winidows bootup. It does
it like its a service, BUT it doesnt use a Windows nt service. It uses
Windows NT Exported function MoveFileEx. By using that the file will be
deleted or moved before anything loads. Its a great tool to have if you
have a virus that is preventing itself from being deleted. A batch file
has been included called delete.bat. Just drag and drop the file you wish
to delete onto it. To see on ways to use this tool just open moveex by
itself at the command prompt.
WARNING THIS TOOL HASN’T BEEN TESTED ON WINDOWS 9X/ME,AND ACCOURDING TO
THE WIN32 API MANUAL IT SAYS THAT ONLY WINDOWS NT PLATFORM SUPPORT
OPERATIONS ON REBOOT.
More tools available at
program MoveEx; {$RESOURCE moveex32.res} {$APPTYPE Console} uses SysUtils, windows, Classes; var dwopt:Dword; b:boolean; s:string; begin if paramcount<2 then begin writeln('Usage: ',extractfilename(paramstr(0)),' oldfilename [newfilename] [options]'); writeln('Options:'); writeln('/D Deletes the file instead of moving/renaming it'); writeln('/E Work even when newfilename exists'); writeln('/T Try moving/deleting file before doing it on next boot'); writeln('OPTIONS ARE CASE SENSITVE'); writeln('IF FILEPATHS CONTAIN SPACES THEY SHOULD HAVE QUOTES(") SURROUNDING THEM'); write('Press Enter to quit...'); readln(s); exitprocess(0); end; setlasterror(0); dwopt:=0; if strpos(getcommandline,' /E')<>nil then dwopt:=MOVEFILE_REPLACE_EXISTING; if StrPos(getcommandline,' /T')<>nil then begin if StrPos(getcommandline,' /D')<>nil then b:=deletefile(Pchar(paramstr(1)))else b:=movefileex(PChar(paramstr(1)),pchar(paramstr(2)),dwopt); writeln('Try:',syserrormessage(getlasterror)); if b then exitprocess(0); end; dwopt:=dwopt or MOVEFILE_DELAY_UNTIL_REBOOT; if strpos(getcommandline,' /D')=nil then MoveFileex(PChar(paramstr(1)),pchar(paramstr(2)),dwopt) else movefileex(pchar(paramstr(1)),nil,dwopt); writeln(syserrormessage(getlasterror)); exitprocess(getlasterror); end.