Delphi – How to rename exe file

delphilinkerrename

Say I've got a generic vertical market application and I want to package it as two separate programs aaa.exe and bbb.exe. Is there any way to use the Delphi linker to create an EXE/DLL file that doesn't have the same name as the DPR?

I can't just rename the file because I get this error

    bbb.exe - Unable to to locate component
      This application has failed to start because aaa.exe was not found. 
      Re-installing the application may fix this problem.
 

Now in general, I can rename an executable, but not this one. Thanks for the comments to point out my boneheadedness in this regard. There is a problem, just obviously not a normal one, maybe not even necessarily Delphi related.

I'm using Delphi 7 (if it is possible in 2007/2009 that would be awesome because I need more fodder for upgrade)

Best Answer

Delphi 2007 and Delphi 2009 both use MSbuild. You can use post-build events in MSbuild to do almost anything you want. You could, for example, use the Copy task to copy the EXE into a new filename.