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
- :
- Bump
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
‎Feb 23, 2008
06:00 AM
Help! SUPPORTDIR in license dialog in OnFirstUIBefore() for InstallScript MSI project
I'm trying to add text to a license dialog in an Installshield MSI project.
The dialog appears, but without the text.
I used Project Assistant to create a test MSI project, which automatically generated this working code, whci correctly displays the dialog and the text of the licence file:
Dlg_SdLicense2:
szTitle = "";
szOpt1 = "";
szOpt2 = "";
//{{IS_SCRIPT_TAG(License_File_Path)
szLicenseFile = SUPPORTDIR ^ "license.txt";
//}}IS_SCRIPT_TAG(License_File_Path)
//{{IS_SCRIPT_TAG(Dlg_SdLicense2)
nResult = SdLicense2Rtf( szTitle, szOpt1, szOpt2, szLicenseFile, bLicenseAccepted );
//}}IS_SCRIPT_TAG(Dlg_SdLicense2)
if (nResult = BACK) then
goto Dlg_SdWelcome;
else
bLicenseAccepted = TRUE;
endif;
But,
If I simply copy that code into OnFirstUIBefore() of an Installshield MSI project, the dialog appears, but the text of the licence does not.
I think it's becasue the value of SUPPORTDIR is not available in the OnFirstUIBefore() of an Installshield MSI project, becasue if I replace the line
szLicenseFile = SUPPORTDIR ^ "license.txt";
with
szLicenseFile = "C:\license.txt";
the licence text will appear.
So - I've read the helpnet documentation, and the stickies for this forum, and the migration notes, and I know how to get the SUPPORTDIR value by creating a custom action to hold the value [SUPPORTDIR], and then accessing that later from CustomActionData in a deferred action by calling something like:
export prototype DisplaySupportDir(HWND);
function DisplaySupportDir(hMSI)
STRING SupportDirPath;
NUMBER SupportDirPathBuffer;
begin
SupportDirPathBuffer = MAX_PATH;
if(MsiGetProperty(hMSI, "CustomActionData", SupportDirPath, SupportDirPathBuffer) == ERROR_SUCCESS) then
//I've now got the value of SUPPORTDIR in this function
endif;
end;
But .... what I cannot see at all is how/what I'm supposed to do to get the value of SUPPORTDIR inside Dlg_SdLicense2 in OnFirstUIBefore().
Any help would be very welcome.
Mike
The dialog appears, but without the text.
I used Project Assistant to create a test MSI project, which automatically generated this working code, whci correctly displays the dialog and the text of the licence file:
Dlg_SdLicense2:
szTitle = "";
szOpt1 = "";
szOpt2 = "";
//{{IS_SCRIPT_TAG(License_File_Path)
szLicenseFile = SUPPORTDIR ^ "license.txt";
//}}IS_SCRIPT_TAG(License_File_Path)
//{{IS_SCRIPT_TAG(Dlg_SdLicense2)
nResult = SdLicense2Rtf( szTitle, szOpt1, szOpt2, szLicenseFile, bLicenseAccepted );
//}}IS_SCRIPT_TAG(Dlg_SdLicense2)
if (nResult = BACK) then
goto Dlg_SdWelcome;
else
bLicenseAccepted = TRUE;
endif;
But,
If I simply copy that code into OnFirstUIBefore() of an Installshield MSI project, the dialog appears, but the text of the licence does not.
I think it's becasue the value of SUPPORTDIR is not available in the OnFirstUIBefore() of an Installshield MSI project, becasue if I replace the line
szLicenseFile = SUPPORTDIR ^ "license.txt";
with
szLicenseFile = "C:\license.txt";
the licence text will appear.
So - I've read the helpnet documentation, and the stickies for this forum, and the migration notes, and I know how to get the SUPPORTDIR value by creating a custom action to hold the value [SUPPORTDIR], and then accessing that later from CustomActionData in a deferred action by calling something like:
export prototype DisplaySupportDir(HWND);
function DisplaySupportDir(hMSI)
STRING SupportDirPath;
NUMBER SupportDirPathBuffer;
begin
SupportDirPathBuffer = MAX_PATH;
if(MsiGetProperty(hMSI, "CustomActionData", SupportDirPath, SupportDirPathBuffer) == ERROR_SUCCESS) then
//I've now got the value of SUPPORTDIR in this function
endif;
end;
But .... what I cannot see at all is how/what I'm supposed to do to get the value of SUPPORTDIR inside Dlg_SdLicense2 in OnFirstUIBefore().
Any help would be very welcome.
Mike
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 25, 2008
07:10 AM
Bump. Can anyone help?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 25, 2008
07:23 AM
I solved it in a different way, with valuable help from this post:
http://community.installshield.com/showthread.php?t=132056&highlight=customActionData+OnFirstUIBefore
http://community.installshield.com/showthread.php?t=132056&highlight=customActionData+OnFirstUIBefore
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 26, 2008
12:44 PM
I'm not sure how you generated that template code using an InstallScript MSI project and the project assistance. The Project Assistant doesn't provide any ability to customize or designate specific dialogs for an ISMSI project file. So I believe what you did was to open an InstallScript project, added the License Agreement Dialog to that project and then copied the resultant code from that OnFirstUIBefore to your InstallScript MSI project.
As just a starting point, this might work - I do not know. However, the code that InstallScript projects are allowed to use is not the same as the code that an InstallScript MSI project might want to use. Typically, InstallScript MSI projects are by far the most complicated project type to use (versus either MSI or InstallScript) due to the fact that you're working with two vastly different technologies at the same time. For a new user, you will probably find this project type to be very frustrating and confusing.
Additionally, I don't understand in what way CustomActionData assisted you with resolving your OnFirstUIBefore issue. Typically, if you have a line such as the following,
MessageBox(SUPPORTDIR, INFORMATION);
It will display the correct path where you could locate the file inside of OnFirstUIBefore. Keep in mind that this is not the correct path for MSI based custom actions.
If you have additional questions, evaluation of InstallShield includes 30 days of free support. You might give support a call at 847-413-2896 and we can provide additional assistance.
As just a starting point, this might work - I do not know. However, the code that InstallScript projects are allowed to use is not the same as the code that an InstallScript MSI project might want to use. Typically, InstallScript MSI projects are by far the most complicated project type to use (versus either MSI or InstallScript) due to the fact that you're working with two vastly different technologies at the same time. For a new user, you will probably find this project type to be very frustrating and confusing.
Additionally, I don't understand in what way CustomActionData assisted you with resolving your OnFirstUIBefore issue. Typically, if you have a line such as the following,
MessageBox(SUPPORTDIR, INFORMATION);
It will display the correct path where you could locate the file inside of OnFirstUIBefore. Keep in mind that this is not the correct path for MSI based custom actions.
If you have additional questions, evaluation of InstallShield includes 30 days of free support. You might give support a call at 847-413-2896 and we can provide additional assistance.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 26, 2008
01:14 PM
Thanks for your reply Bryan.
You're right on several points.
I used IS2008 to create an empty *InstallScript* project, then copied the template code it generated for item such as Dlg_SdLicence2 to make sure I was not making any basic mistakes.
Then, in my learning, I'd discovered about getting to the value of SUPPORTDIR in an InstallScript MSI project was probably necessry via CustomActionData - betwen Install Initialize / Installfinalize, but that method was a mistake - because what I had not realised from the documentation was that the licence file had to be placed under Support Files-_Language independent, not under Support Files -> Disk 1. It was this latter point which was made clear to me in the other post I referred to.
On another point you raised - you're right, I've found the introduction to InstallScript MSI to be extremely frustrating and confusing. The documentation is not very helpful. Puzzilingly, I did contact suport as you requested, and received a bolier plate email reply which told me Macrovision's support systems had no record of any valid support contact for me - but presumably did have a record of the very expensive payment I made to acquire the software. However, despite that, there have been some very helpful contributors to the forum who have provided assistance to me, and finally today, I have an Installer worrking just as I want.
Regards.
Mike
You're right on several points.
I used IS2008 to create an empty *InstallScript* project, then copied the template code it generated for item such as Dlg_SdLicence2 to make sure I was not making any basic mistakes.
Then, in my learning, I'd discovered about getting to the value of SUPPORTDIR in an InstallScript MSI project was probably necessry via CustomActionData - betwen Install Initialize / Installfinalize, but that method was a mistake - because what I had not realised from the documentation was that the licence file had to be placed under Support Files-_Language independent, not under Support Files -> Disk 1. It was this latter point which was made clear to me in the other post I referred to.
On another point you raised - you're right, I've found the introduction to InstallScript MSI to be extremely frustrating and confusing. The documentation is not very helpful. Puzzilingly, I did contact suport as you requested, and received a bolier plate email reply which told me Macrovision's support systems had no record of any valid support contact for me - but presumably did have a record of the very expensive payment I made to acquire the software. However, despite that, there have been some very helpful contributors to the forum who have provided assistance to me, and finally today, I have an Installer worrking just as I want.
Regards.
Mike
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 26, 2008
01:44 PM
Ah, ok that makes sense then. Generally speaking, the IDE is geared to try to point new users toward the Basic MSI or InstallScript projects as entry level points. Once a user has a grip on either project type, the shift from that to InstallScript MSI is more clean.
The location you put your files could be found in the property SETUPEXEDIR for future reference in case you might want to use that.
Support for InstallShield once the product is purchased requires a support agreement (this includes upgrades to new versions as well). I'm sure if you look in to it, you will find that it's worth the cost of ownership. More information on that can be found here:
http://www.macrovision.com/support/maintenance.htm
The location you put your files could be found in the property SETUPEXEDIR for future reference in case you might want to use that.
Support for InstallShield once the product is purchased requires a support agreement (this includes upgrades to new versions as well). I'm sure if you look in to it, you will find that it's worth the cost of ownership. More information on that can be found here:
http://www.macrovision.com/support/maintenance.htm