Community Forums
Page 2 of 2 FirstFirst 12
Results 6 to 7 of 7

Thread: Basic MSI Project - Custom Action - unable to get installed path

  1. #6
    Join Date
    Jan 2017
    Location
    Hyderabad
    Posts
    3
    Hi Hidenori Yamanishi,

    please explain what is/are the meaning of commit & rollback in "In-script execution" in the custom action.

    I also tried with deferred and immediate execution in "In-script execution" in the custom action but it unable to get installed path.

    You said to me in the previous reply. (01-25-2017, 08:36 AM - Post Number - #3 )
    CustomAction Name and Property key both are same.
    I had applied to set same of CustomAction Name and Property key.
    Example:
    CustomActionName: "CustomActionForInstall"
    PropertyKey = "CustomActionForInstall".

    I also changed MSI DLL code.
    Code:
    UINT __stdcall Install( MSIHANDLE hInstall )
    {
       TCHAR customData[MAX_FILE_PATH * 3];
    
       DWORD len = sizeof( customData ) / sizeof( TCHAR );
       
       UINT gp = ::MsiGetProperty( hInstall,
                                   _T("CustomActionsForInstall"), 
                                   customData, 
                                   &len);
       ::MessageBox(NULL, customData, "Install", MB_OK);
       if (gp != ERROR_SUCCESS)
       {
          return ERROR_INSTALL_FAILURE;
    	  ::OutputDebugString("gp != ERROR_SUCCESS");
       }
    
    return ERROR_SUCCESS;
    }
    Please read my (01-27-2017, 01:35 PM Post Number - #4) and tell me
    what is/are wrong?
    Regards,
    Vijay Kumbhani

  2. #7
    Join Date
    Oct 2001
    Location
    Itasca, IL
    Posts
    2,393
    Deferred, commit, and rollback custom actions in Basic MSI and InstallScript MSI installations have access to only some of the built-in Windows Installer properties: CustomActionData, ProductCode, and UserSID. If you want a custom action to access any other properties during deferred, commit, or rollback execution, you can pass them as CustomActionData. You can do so by scheduling an immediate set-a-property type of custom action to set a property that matches the name of the custom action. The value of this property is then available in the CustomActionData property within the deferred, commit, or rollback custom action.
    Hidenori Yamanishi - Senior Software Engineer - Flexera Software: InstallShield Team

Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

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