卸载程序就是:
procedure TForm1.Button1Click(Sender: TObject);
var sysdir:array[0..255]of char;
del:tshfileopstruct;
frombuf:array[0..128] of char;
begin
getwindowsdirectory(sysdir,255);
fillchar(frombuf,sizeof(frombuf),0);
strpcopy(frombuf,pchar(sysdir+'/你的主文件'));
with deldo
begin
wnd:=handle;
wfunc:=fo_delete;
pfrom:=@frombuf;
pto:=nil;
fflags:=fof_noconfirmation or fof_noerrorui;
lpszprogresstitle:='正在卸载!';
end;
if shfileoperation(del)=0 then
showmessage('卸载成功!')
else
showmessage('现在不用卸载!');
end;