PDA

View Full Version : How to refer to SUPPORTDIR in Custom Actions



Kenerry
06-09-2004, 04:05 AM
Hi.

I try to execute some EXEs in custom actions from the SUPPORTDIR, but fail to make them 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.

My only solution is to add the EXEs into INSTALLDIR and set the location in custom action as "Installed with the product". Then the EXEs can be selected and ran properly. I am really confused about the usage of SUPPORTDIR in custom actions and any help is appreciated.

Kenerry
06-09-2004, 05:58 AM
What's more, I find that if I try to uninstall the product which is installed by the INSTALLDIR solution mentioned above, the -1603 problem also occurs and the uninstallation is not completed correctly! What the hell is going wrong ??