This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- What am I wrong with commandline argument and Basic MSI Project?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 26, 2008
11:10 AM
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.
--------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.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 29, 2008
10:27 AM
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)
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)