Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Use Custom Action return value


3 replies to this topic

tgebbie

tgebbie
  • Members
  • 26 posts

Posted 20 August 2001 - 21:57

Is it possible to use a custom action return value and set a public property within the property table with that return value?

Thanks for any help.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 August 2001 - 22:06

You can set a property from your CA, e.g. by calling MsiSetProeprty. Depends on what your CA is (script,  dll, ...)
You can use the return value of a DLL call in the way you want if you call this DLL as "standard DLL" (not "Windows Installer DLL") in InstallShield Windows Installer Edition.

tgebbie

tgebbie
  • Members
  • 26 posts

Posted 20 August 2001 - 22:13

The custom action is as follows:

Type: 34
Source: DATA <-- Directory path parent INSTALLDIR
Target: "[DATA]CSI.exe" PAR1=?? PAR2=XXX

This custom action is launched based on if the Database feature has been selected to be installed and is launched with a Button Control in the SetupCompleteSuccess dialog.  The file is a standard VB EXE file. Would I have to add code to the actual VB Source Code for this project or can I get the return value of the custom action in a different way?

Thanks.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 21 August 2001 - 07:43

In MSI exit codes are used to indicate success or failure of the custom action, so they can only be predefined values like ERROR_SUCCESS, ERROR_INSTALLFAILURE or ERROR_INSTALLUSEREXIT. If you want to get the exit code from an EXE and store it in a property, you need to wrap the exe (e.g. a DLL that calls the exe, gets the exit ocde and stores it in a property). You could do this in a script based custom action, too.