How to run Delphi 7 from an EXE file written in Delphi XE?

I am doing some build automation and would like to launch the Delphi 7 IDE from an application that I am writing using Delphi XE.

My Delphi 7 IDE is located at:

'C:\Program Files\Borland\Delphi7\Bin\delphi32.exe'

so far doing:

ShellExecute( Handle, 'Open', 'C:\Program Files\Borland\Delphi7\Bin\delphi32.exe', '', '', sw_ShowNormal );

eventually ends up in the Delphi 7 IDE, but only after many package errors.

Doing:

ShellExecute( Handle, 'Open', 'C:\windows\notepad.exe', '', '', sw_ShowNormal );

works with the Notepad file.

I also have a batch file called Delphi7IDE.bat that opens Delphi 7 when I click on the batch file, but I do:

ShellExecute( Handle, 'Open', 'C:\sys\batch\Delphi7IDE.bat', '', '', sw_ShowNormal );

produces the same errors as above.

I tried using directoy as indicated 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 example batch file above does not have a fixed directory and works great when pressed).

, - this one

?

+5
3

, . Delphi 7 - . Windows Vista ( 7) . delphi32.exe , , ? , delphi32.exe ( ), " " "". delphi32.exe , , , .

, ShellExecute delphi32.exe Delphi, delphi32.exe Delphi. - , delphi32.exe.

: Delphi (Project1.exe, ), "" " ".

+3

, . "Delphi 7" "" Ctrl + C . Directory ShellExecute.

- Delphi 7 , WIndows 95, Delphi 4, :

Delphi 4 shortcut properties in Windows 95

+2

All Articles