1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| { ===================================================================== }
procedure TF_Princ.Btn_Test2Click(Sender: TObject);
Var aHandle : THandle;
Prog : String ;
ExitCode : Int64 ;
OutputText, ErrorText : String ;
// Delay : Cardinal ;
begin
Prog := '"C:\Program Files (x86)\TOSHIBA\HDD Password Tool\TosExtMng.exe"' ;
// ShellExecute(Handle,'open',PChar(Prog),nil,nil,SW_SHOWNORMAL);
Delay := 1 ;
CallCmd('C:\Program Files (x86)\TOSHIBA\HDD Password Tool', 'TosExtMng.exe',
'', ExitCode, OutputText, ErrorText) ;
ShowMessage('Appli lancée'+Chr(13)+ OutputText+Chr(13)+ ErrorText) ;
aHandle := FindWindow('HDD Password Tool', Nil );
If aHandle > 0 Then
Begin
ShowMessage('Fenêtre HDD Password Tool trouvée') ;
SendMessage(aHandle, WM_CLOSE, 0, 0) ;
End
Else
ShowMessage('Fenêtre HDD Password Tool non trouvée') ;
End;
{ ===================================================================== } |
Partager