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
- :
- Help with MsiSetProperty
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
Jan 14, 2009
01:01 PM
Help with MsiSetProperty
Hello,
I'm using IS2009 InstallScript MSI project. I have added the following code to the script:
Dlg_ITC:
bITC = FeatureIsItemSelected(MEDIA,"\Applications");
if (bITC) then
szTitle = "Interactive Teller Settings";
szMsg = "";
szAWVP = "";
szField1 = "Administration Web Virtual Path:";
nResult = SdShowDlgEdit1(szTitle, szMsg, szField1, szAWVP);
CtrlGetText(DLG_ITC, AdminWebPath, szAWVP);
MsiSetProperty(ISMSI_HANDLE, "AdminWebPath", szAWVP);
endif;
if (nResult = BACK) goto Dlg_SdFeatureTree;
This will first check to see if a feature called applications is selected. Then it will show the dialog sdShowDlgEdit1. After showing this dialog, I do a CtrlGetText to get the text from the textbox that the user enters. This all works perfectly.
Next I want to set this value in the property I have created called "AdminWebPath". After this, I run a custom action and look at the value of the property. This is always null.
This line doesn't seem to work:
MsiSetProperty(ISMSI_HANDLE, "AdminWebPath", szAWVP);
Help please
I'm using IS2009 InstallScript MSI project. I have added the following code to the script:
Dlg_ITC:
bITC = FeatureIsItemSelected(MEDIA,"\Applications");
if (bITC) then
szTitle = "Interactive Teller Settings";
szMsg = "";
szAWVP = "";
szField1 = "Administration Web Virtual Path:";
nResult = SdShowDlgEdit1(szTitle, szMsg, szField1, szAWVP);
CtrlGetText(DLG_ITC, AdminWebPath, szAWVP);
MsiSetProperty(ISMSI_HANDLE, "AdminWebPath", szAWVP);
endif;
if (nResult = BACK) goto Dlg_SdFeatureTree;
This will first check to see if a feature called applications is selected. Then it will show the dialog sdShowDlgEdit1. After showing this dialog, I do a CtrlGetText to get the text from the textbox that the user enters. This all works perfectly.
Next I want to set this value in the property I have created called "AdminWebPath". After this, I run a custom action and look at the value of the property. This is always null.
This line doesn't seem to work:
MsiSetProperty(ISMSI_HANDLE, "AdminWebPath", szAWVP);
Help please
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 15, 2009
09:57 AM
How are you looking at the property? If you're calling MsiGetProperty, you'll want to make sure to set the buffer-size variable to a large value before calling MsiGetProperty; the InstallShield help topic "Getting and Setting Properties" has an example.
Depending on when you're setting and getting the property, you might want to use a public property: "ADMINWEBPATH" instead of "AdminWebPath".
If you create an MSI log file, is the property being set at all?
Depending on when you're setting and getting the property, you might want to use a public property: "ADMINWEBPATH" instead of "AdminWebPath".
If you create an MSI log file, is the property being set at all?