Mislim da ce vam pomoci ovaj primer iz Delphi-u.
implementation
uses SecondU;
{$R *.DFM}
function ExecuteFile(const FileName, Params, Dir: String;
ShowCmd: Integer): THandle;
begin
Result := ShellExecute(Application.MainForm.Handle, nil,
PChar(FileName), PChar(Params), PChar(Dir), ShowCmd);
end;
OVO GORE JE POSTAVKA FUNKCIJE A OVAKO SE KORISTI.
if executefile('explorer.exe', '', 'c:\windows', SW_SHOW) <= 32 then
messagedlg('Ne mogu otvoriti EXPLORER' , mtError, [mbok], 0)
else
application.Minimize;