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
- :
- Problem with MSISetProperty not keeping values
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 17, 2014
02:31 AM
Problem with MSISetProperty not keeping values
I am having a problem setting a property in an "Installscript MSI" type project. I have a custom dialog that allows the user to enter some values that overwrite default values for the properties. After the custom dialog is done, it sets the properties using the MSISetProperty function. However, when that property is later used, it is using the default value that was overwritten, and not the value that the user entered. Here is the code:
property = [WebServicesHttp] with default value of: 93
At the start of the custom dialog, I perform this:
MsiGetProperty(ISMSI_HANDLE, "WebServicesHttp", sDummy, nBuffer);
nWebServicesHttpPort = GetNumber(sDummy);
This retrieves the default value of 93 correctly.
After the user presses the "Next" button, the following code runs:
case BUTTON_NEXT:
// user clicked Next
....
bSuccess = TRUE;
....
if (bSuccess) then
//all appears ok, so we update the property manager with the values for later use. These values are used in "XML File Changes"
MsiSetProperty(ISMSI_HANDLE, "WebServicesHttp", GetString(nWebServicesHttpPort));
Later, I use the [WebServicesHttp] for the tcp port number in the IIS properties of the website that is being installed.
Now, I have checked using both the debugger and a series of message boxes to ensure that the property is getting set....and it is. I can press back to get to my custom dialog again and have it throw up a messagebox with the user entered value. Dialog modified like this:
MsiGetProperty(ISMSI_HANDLE, "WebServicesHttp", sDummy, nBuffer);
nWebServicesHttpPort = GetNumber(sDummy);
MessageBox(GetString(nWebServicesHttpPort), INFORMATION);
This works and shows the previously entered user value.
HOWEVER....when the install actually runs, it does not keep the user entered value but instead uses the default that was originally set in the property manager. When I check the log at the end of the installation (where it dumps the properties) it shows the default value there too.
Property(S): ReportingServer = ReportingServer
Property(S): DatabaseServer = DatabaseServer
Property(S): WebServicesHttps = 493
Property(S): WebServicesHttp = 93 (this is the default value...not the user set value)
Property(S): WebServicesTcp = 893
Property(S): ServicesClientSame = 0
Property(S): useAppPoolCredentials = false
Property(S): SETUPEXENAME = setup.exe
I am absolutely certain that the value is getting set in the UI and that it is available later, but it doesn't persist (or make it to the underlying MSI maybe??). There are no custom dialogs or actions that run after my custom dialog (which is in "Before Move Data --> OnFirstUIBefore").
I am so frustrated I am pulling my hair out over this and looking at other install solutions. I need someone smarter than me to help me figure this out so I don't waste all the time I spent with Installshield by throwing it away and starting over.
Thank you in advance...
property = [WebServicesHttp] with default value of: 93
At the start of the custom dialog, I perform this:
MsiGetProperty(ISMSI_HANDLE, "WebServicesHttp", sDummy, nBuffer);
nWebServicesHttpPort = GetNumber(sDummy);
This retrieves the default value of 93 correctly.
After the user presses the "Next" button, the following code runs:
case BUTTON_NEXT:
// user clicked Next
....
bSuccess = TRUE;
....
if (bSuccess) then
//all appears ok, so we update the property manager with the values for later use. These values are used in "XML File Changes"
MsiSetProperty(ISMSI_HANDLE, "WebServicesHttp", GetString(nWebServicesHttpPort));
Later, I use the [WebServicesHttp] for the tcp port number in the IIS properties of the website that is being installed.
Now, I have checked using both the debugger and a series of message boxes to ensure that the property is getting set....and it is. I can press back to get to my custom dialog again and have it throw up a messagebox with the user entered value. Dialog modified like this:
MsiGetProperty(ISMSI_HANDLE, "WebServicesHttp", sDummy, nBuffer);
nWebServicesHttpPort = GetNumber(sDummy);
MessageBox(GetString(nWebServicesHttpPort), INFORMATION);
This works and shows the previously entered user value.
HOWEVER....when the install actually runs, it does not keep the user entered value but instead uses the default that was originally set in the property manager. When I check the log at the end of the installation (where it dumps the properties) it shows the default value there too.
Property(S): ReportingServer = ReportingServer
Property(S): DatabaseServer = DatabaseServer
Property(S): WebServicesHttps = 493
Property(S): WebServicesHttp = 93 (this is the default value...not the user set value)
Property(S): WebServicesTcp = 893
Property(S): ServicesClientSame = 0
Property(S): useAppPoolCredentials = false
Property(S): SETUPEXENAME = setup.exe
I am absolutely certain that the value is getting set in the UI and that it is available later, but it doesn't persist (or make it to the underlying MSI maybe??). There are no custom dialogs or actions that run after my custom dialog (which is in "Before Move Data --> OnFirstUIBefore").
I am so frustrated I am pulling my hair out over this and looking at other install solutions. I need someone smarter than me to help me figure this out so I don't waste all the time I spent with Installshield by throwing it away and starting over.
Thank you in advance...
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 17, 2014
09:32 AM
Properties that can be configured by a user should be public; that is, their name should not contain any lower case letters. Note that you may also want to list them in the SecureCustomProperties property.