cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
seungrye
Level 2

What am I wrong with commandline argument and Basic MSI Project?

I follow the step of the example.
--------example-----------------------------------
To access SUPPORTDIR through a deferred InstallScript custom action:

1. In the Custom Actions and Sequences view, create a set-a-property custom action (type 51) called GetSUPPORTDIR . Configure the Property Name, Property Value, and Install Exec Sequence settings for the custom action as follows, and leave all of the other settings blank.
* Property Name: DisplaySupportDir
* Property Value: [SUPPORTDIR]
* Install Exec Sequence: After InstallInitialize
2. In the InstallScript view, create a new function called DisplaySupportDir.
3. Add the following code to display a message box containing the value of SUPPORTDIR:
{{{
function DisplaySupportDir(hMSI)

STRING supportDirPath;

NUMBER supportDirPathBuffer;

begin

supportDirPathBuffer = MAX_PATH;

if(MsiGetProperty(hMSI, "CustomActionData", supportDirPath, supportDirPathBuffer) == ERROR_SUCCESS) then

SprintfBox(INFORMATION,"Deferred Execution","The value of SUPPORTDIR is %s",supportDirPath);

SprintfBox(INFORMATION,"Deferred Execution","The value of InstallScript's SUPPORTDIR is %s",SUPPORTDIR);

endif;

end;
}}}
4. In the Custom Actions and Sequences view, create an InstallScript custom action called DisplaySupportDir. Configure the Function Name, In-Script Execution, and Install Exec Sequence settings for the custom action as follows, and leave all of the other settings blank.
* Function Name: DisplaySupportDir
* In-Script Execution: Deferred Execution in System Context
* Install Exec Sequence: After GetSUPPORTDIR
--------example------end--------------------------

but, I cant see `supportDirPath` contents.
(I just see `SUPPROTDIR` property variable).

what should I check the above sequence? or that need ServicePack2 or some special options?

Plz help me.
Labels (1)
0 Kudos
(1) Reply
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Take a look at a verbose log file, searching for SUPPORTDIR and the names of your actions. This should help you diagnose if any of the following possible explanations apply:

  • There is no value for the SUPPORTDIR property (perhaps your project doesn't have any support files?)
  • There's a name mismatch, and your deferred action is not getting the CustomActionData specified correctly
  • Something's wrong with the action itself (although on quick inspection the code looked fine)
0 Kudos