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
- :
- Re: Returning wrong LONG value from Registry table
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Mar 26, 2013
12:33 PM
Returning wrong LONG value from Registry table
I'm writing a row to the Registry table with :
LONG nvISAttributes;
nvISAttributes = 1111111111;
MsiRecordSetInteger(hRecord, 7, nvISAttributes);
however, when I retrieve it as follows:
LONG nvISAttributes;
nvISAttributes = MsiRecordGetInteger(hRecord, 7);
it is not the value I set. All other fields are !
It is set to -2147483648
What am I doing wrong ?
LONG nvISAttributes;
nvISAttributes = 1111111111;
MsiRecordSetInteger(hRecord, 7, nvISAttributes);
however, when I retrieve it as follows:
LONG nvISAttributes;
nvISAttributes = MsiRecordGetInteger(hRecord, 7);
it is not the value I set. All other fields are !
It is set to -2147483648
What am I doing wrong ?
(4) Replies
‎Mar 26, 2013
01:51 PM
What is the return value from MsiRecordSetInteger? Do Registry table records have a field 7?
‎Mar 27, 2013
04:13 AM
MsiRecordSetInteger is set to -2147483648 when I try to set field 7.
N.B. I have done nothing to customize the Registry table, only trying to add rows of data to it.
In the Direct editor of InstallShield Spring it shows a field
ISAttributes(I4) straight after Component_(s72), the 6th field.
I noticed several other table have fields at the far right that begin 'IS'.
Q. Is this some form of internal accounting for InstallShield ?
Q. Should one not try to set values for these fields ?
It's amazing what you can find out when you read the help closely enough:
'InstallShield Columns in Standard Windows Installer Tables'
Registry - ISAttributes - This is used to store InstallShield custom properties of a registry item. Currently the only one is Automatic.
However, I don't understand what is meant by the description of the ISAttributes.
Q. Is 'Automatic' a property ?
Q. Is it a value that the field is automatically set to ?
Q or is it something entirely different ?
Last but not least:
I get an error ERROR_BAD_QUERY_SYNTAX (1615) and no hView from calling MsiDatabaseOpenView with a query to 'SELECT' when the table is empty.
To add data to the table I need the hView returned by MsiDatabaseOpenView. I get round this at present by leaving a dummy row in the table in the project, adding my data as I go through the UI and finally removing the dummy line before I go to the execute phase of the install.
The error returned does not seem to be appropriate.
Is there a correct way to do this ?
N.B. I have done nothing to customize the Registry table, only trying to add rows of data to it.
In the Direct editor of InstallShield Spring it shows a field
ISAttributes(I4) straight after Component_(s72), the 6th field.
I noticed several other table have fields at the far right that begin 'IS'.
Q. Is this some form of internal accounting for InstallShield ?
Q. Should one not try to set values for these fields ?
It's amazing what you can find out when you read the help closely enough:
'InstallShield Columns in Standard Windows Installer Tables'
Registry - ISAttributes - This is used to store InstallShield custom properties of a registry item. Currently the only one is Automatic.
However, I don't understand what is meant by the description of the ISAttributes.
Q. Is 'Automatic' a property ?
Q. Is it a value that the field is automatically set to ?
Q or is it something entirely different ?
Last but not least:
I get an error ERROR_BAD_QUERY_SYNTAX (1615) and no hView from calling MsiDatabaseOpenView with a query to 'SELECT' when the table is empty.
To add data to the table I need the hView returned by MsiDatabaseOpenView. I get round this at present by leaving a dummy row in the table in the project, adding my data as I go through the UI and finally removing the dummy line before I go to the execute phase of the install.
The error returned does not seem to be appropriate.
Is there a correct way to do this ?
‎Mar 27, 2013
09:04 AM
You might check your built MSI database to see if that column is there; it could just be part of the .ism project file used at build time, but not part of the completed release, which means there's no need to set it at run time.
For what it's worth, this ancient newsletter article says a bit about modifying the MSI tables at run time (PDF): http://www.flexerasoftware.com/webdocuments/PDF/msiaccess.pdf.
(And a word from our sponsors: The Advanced MSI course goes through several uses of the technique, too: http://www.flexerasoftware.com/services/education/installshield-advanced-msi.htm.)
For what it's worth, this ancient newsletter article says a bit about modifying the MSI tables at run time (PDF): http://www.flexerasoftware.com/webdocuments/PDF/msiaccess.pdf.
(And a word from our sponsors: The Advanced MSI course goes through several uses of the technique, too: http://www.flexerasoftware.com/services/education/installshield-advanced-msi.htm.)
‎Mar 27, 2013
11:43 AM
Last but not least:
I get an error ERROR_BAD_QUERY_SYNTAX (1615) and no hView from calling MsiDatabaseOpenView with a query to 'SELECT' when the table is empty.
To add data to the table I need the hView returned by MsiDatabaseOpenView. I get round this at present by leaving a dummy row in the table in the project, adding my data as I go through the UI and finally removing the dummy line before I go to the execute phase of the install.
The error returned does not seem to be appropriate.
Is there a correct way to do this ?
I get an error ERROR_BAD_QUERY_SYNTAX (1615) and no hView from calling MsiDatabaseOpenView with a query to 'SELECT' when the table is empty.
To add data to the table I need the hView returned by MsiDatabaseOpenView. I get round this at present by leaving a dummy row in the table in the project, adding my data as I go through the UI and finally removing the dummy line before I go to the execute phase of the install.
The error returned does not seem to be appropriate.
Is there a correct way to do this ?