Community Forums
Results 1 to 5 of 5

Thread: Deferred CA reads blank CustomActionData

  1. #1
    Join Date
    Aug 2002
    Location
    Denmark
    Posts
    97

    Deferred CA reads blank CustomActionData

    I am trying to update deferred CA's in IS11.5 before upgrading to IS12.
    I set the CustomActionData in an immediate CA after InstallInitialiaze in the execute sequence. When the deferred CA is executed, I can find the CustomActionData in the log, but reading the CustomActionData from the deferred CA returns a blank (see below).

    Can somebody give me some advise how to solve the problem ?

    +++++++++ log ++++++++++++++++++++++++++++++++
    MSI (s) (EC4) [16:58:00:221]: Executing op: CustomActionSchedule(Action=SetupSecurity,ActionType=1025,Source=BinaryData,Target=f7,CustomActionData=MSSQL$PDM|SQLAgent$PDM)
    MSI (s) (EC:84) [16:58:00:231]: Invoking remote custom action. DLL: C:\WINNT\Installer\MSI413.tmp, Entrypoint: f7
    1: CustomActionData =

    +++++++++ installscript deferred CA +++++++++++++++++

    function ScriptSetupSecurity(hMSI)
    LIST listID;
    STRING szCustomActionData, SQLService, SQLAgentService;
    NUMBER nLen;
    begin
    MsiGetProperty( hMSI, "CustomActionData", szCustomActionData, nLen);
    SprintfMsiLog ( "CustomActionData = " + szCustomActionData);
    listID = ListCreate(STRINGLIST);
    StrGetTokens( listID, szCustomActionData, "|" );
    ListGetFirstString( listID, SQLService);
    ListGetNextString( listID, SQLAgentService);
    ListDestroy ( listID);

  2. #2
    Join Date
    Jul 2003
    Location
    Austin, TX
    Posts
    4,430
    The techniques described for use with InstallShield 12 are not compatible with previous versions of InstallShield. This is because previous versions use a DCOM/ROT singleton object to access the MSI handle from the client side msiexec not the server side msiexec that the custom action is running in.

    For an example, populate the Property table with CustomActionData = Hello

    You will see in your logfile the server side passing the CustomActionData to the property but then you will see the original data from the property table appear in your MsiGetProperty.

    If you replace the InstallScript with VBScript you will see the correct data since session.property uses the correct MSI handle.

    This is why InstallShield 12 is such a big deal in getting InstallScript to be truely MSI compliant.
    Christopher Painter
    ISWIX, LLC.
    Visit iswix.com for contact information

  3. #3
    Join Date
    Aug 2002
    Location
    Denmark
    Posts
    97
    Thanks for your prompt responese.

    Do I understand you correct that it will work when upgraded to IS12 ?

  4. #4
    Join Date
    Jul 2003
    Location
    Austin, TX
    Posts
    4,430
    Yes it will. You might also want to look at my blog for more information and a link to InstallSite for a simple InstallScript function that deserializes CustomActionData attributes.
    Christopher Painter
    ISWIX, LLC.
    Visit iswix.com for contact information

  5. #5
    Join Date
    Aug 2002
    Location
    Denmark
    Posts
    97
    That's good news - I will try it out as the first thing tomorrow morning.

    Thanks for your advice, Svend

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •