I am now working with Developer 7, trying to execute in custom actions some EXEs stored in SUPPORTDIR . But they fail to run properly. The following are my steps:
1. Add "app1.exe" into SetupFiles/Billboards->Language Independent section.
2. Create a new custom action named "app1" manually(not with the wizard). Type in "SUPPORTDIR" as the source, "app1.exe" as the target.
3. Add the "app1" action into Sequences->Installation->Execute, after "InstallFiles".
4. Build the release. Everything is ok.
But when the setup runs into the position where the action takes place, I receive two errors. The first is "Internal error 2721. NewCustomAction1". The second is "Error: -1603 Fatal error during installation. Consult Windows Installer Help(Msi.chm) or MSDN for more information." I checked the -1603 error in the help but can't solve it.
Then I re-configure the "app1" action with the Custom Action Wizard. If I choose the location as "Installed with the product" and browze for the file "app1.exe", it is in the Component list but can't be added into the Files list. If I choose "Stored in the Directory table" and type "SUPPORTDIR" and "app1.exe" as source and target, the same error messages as above occur. No matter I change the execution mode as "Immediate execution" or "Deffered execution", or set the sequence of the action after "InstallFiles" or after "InstallFinalize" (under the direction of help), the problem still exists. Also I have tried to make a new component in the component view, put "app1.exe" into it, and selelct the component and the file by locating "Installed with the product". This passes the wizard dialog but still fail to avoid the error message.
My only solution is to add the EXEs into INSTALLDIR and locate "Installed with the product". Then the EXEs can be selected and ran properly in setup. -- But then I find that if I try to uninstall the product, the -1603 problem occurs again and the uninstallation is not completed correctly!
I am really confused about the usage of SUPPORTDIR in custom actions and any help is appreciated.
Edited by Kenerry, 10 June 2004 - 02:33.