PDA

View Full Version : How to config custom action (exe)?



eafonsof
07-06-2005, 06:51 PM
Hey, I want to create a custom action to run an EXE bundled with the application being installed with the following characteristics:

The application is installed in the following location:
[ProgramFilesFolder]MyCompany\MyProd

My custom action will located in the following location after files installed:
[ProgramFilesFolder]MyCompany\MyProd\bin\MyCustomAction.exe

I want to run my custom action IN that specific location, I mean, the equivalent of opening a command prompt and running the following:

C:\> C:\Program Files\MyCompany\MyProd\bin\MyCustomAction.exe

I need the custom action to be run with the full path or from the bin directory so that when I look at argv[0], it contains "C:\Program Files\MyCompany\MyProd\bin\MyCustomAction.exe" or if I retrieve the directory where the program ran, I get "C:\Program Files\MyCompany\MyProd\bin\".

Any help will be appreciated. I already spent a lot of time trying to configure InstallShield to do that, but I did not figure out how it can be done.

Thanks in advance.
Eduardo.

RobertDickau
07-06-2005, 07:24 PM
After you add the EXE to a component with the appropriate destination, you can use the Launch EXE > Installed with the product action type; this type must be scheduled for deferred execution, somewhere after InstallFiles.

If you do this, what is the value of __argv[0]?

eafonsof
07-06-2005, 07:46 PM
Great. That worked.
The deferred execution info was missing in my configuration.
Thank you.