I'm doing some build automation and would like to run the Delphi 7 IDE from an Application that I'm writing using Delphi XE.
My Delphi 7 IDE is at:
'C:\Program Files\Borland\Delphi7\Bin\delphi32.exe'
yet doing:
ShellExecute( Handle, 'Open', 'C:\Program Files\Borland\Delphi7\Bin\delphi32.exe', '', '', sw_ShowNormal );
eventually gets into the Delphi 7 IDE but only after lots of missing package errors.
Doing:
ShellExecute( Handle, 'Open', 'C:\windows\notepad.exe', '', '', sw_ShowNormal );
works file opening Notepad.
I also have a batch file called 'Delphi7IDE.bat' which opens Delphi 7 when I click the batch file, but doing:
ShellExecute( Handle, 'Open', 'C:\sys\batch\Delphi7IDE.bat', '', '', sw_ShowNormal );
produces the same errors as above.
I've tried using the directoy as specified in my Delphi 7 menu shortcut (i.e calling:
ShellExecute( Handle, 'Open', 'C:\Program Files\Borland\Delphi7\Bin\delphi32.exe', '', 'C:\Program Files\Borland\Delphi7\Projects\', sw_ShowNormal );"
but this gives the same error (and this is to be expected because the batch file example above has no fixed directory and runs fine when clicked).
There are multiple errors, but an exampler of one is
What am I doing wrong please?
0
as the handle andnil
as the verb (first and second argument, respectively) toShellExecute
? – Andreas Rejbrand