Código
var
liResult:Integer;
lsMsg:String;
n_file, bd_file: string;
begin
n_file:= arquivo_a_gravar;
if FileExists('C:Arquivos de programasNeroNero 7CoreNeroCmd.exe') then
liResult := WinExec(PAnsiChar('"C:Arquivos de programasNeroNero 7CoreNeroCmd.exe" --write --drivename ' + cbDrive.Text +
' --speed 8'+
' --real --iso Backup --detect_non_empty_cdrw --force_erase_cdrw --create_iso_fs "'
+n_file+'"'),SW_shownormal)
else
if FileExists('C:Arquivos de programasNeroNero 9Nero Burning ROMNeroCmd.exe') then
liResult := WinExec(PAnsiChar('"C:Arquivos de programasNeroNero 9Nero Burning ROMNeroCmd.exe" --write --drivename ' + cbDrive.Text +
' --speed 8'+
' --real --iso Backup --detect_non_empty_cdrw --force_erase_cdrw --create_iso_fs "'
+n_file+'"'),SW_shownormal);
//Verificando se houve algum ao executar o "Nerocmd.exe"
if liResult < 31 then
begin
case liResult of
0: lsMsg := 'O sistema esta sem memória ou recursos';
ERROR_BAD_FORMAT: lsMsg := 'O arquivo executavel é invalido (non-Win32 .EXE or error in .EXE image).';
ERROR_FILE_NOT_FOUND: lsMsg := 'Arquivo especificado não foi encontrado/gravado';
ERROR_PATH_NOT_FOUND: lsMsg := 'Caminho especificado não foi encontrado/gravado';
end;
Raise Exception.Create(lsMsg);
end;
end;
Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009