(Julio García)
procedure SalirYBorrarExe; var NombreBat : string; FicheroBat : TStringList; begin NombreBat := ExtractFilePath(Application.ExeName)+'Borrar.bat'; FicheroBat := TStringList.Create(); FicheroBat.Clear; FicheroBat.Add(':BorrarExe'); FicheroBat.Add('del "' + Application.ExeName + '"'); FicheroBat.Add('if exists ' + Application.ExeName + ' goto BorrarExe'); FicheroBat.Add('del "' + NombreBat + '"'); FicheroBat.SaveToFile(NombreBat); FicheroBat.Free; WinExec(PChar(NombreBat), SW_HIDE); Application.Terminate; end;
Ważne artykuły