cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jonathanqis
Level 6

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 ?
Labels (1)
0 Kudos
(4) Replies
RobertDickau
Flexera Alumni

What is the return value from MsiRecordSetInteger? Do Registry table records have a field 7?
0 Kudos
jonathanqis
Level 6

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 ?
0 Kudos
RobertDickau
Flexera Alumni

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.)
0 Kudos
jonathanqis
Level 6

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 ?
0 Kudos