cancel
Showing results for 
Search instead for 
Did you mean: 
Amarjeet
Pilgrim

System search returning #379893 instead of 379893

Hi,

I am trying to search presence of the following key and value assigned to this key from system search. This key is installed when .net framework above version 4.5 is installed on the system.



The key value is 379893 but in installation log I get its value as #379893.Due to this issue I am not able to use this value in conditions. Condition builder does not accept # in the condition statement.

Not sure why I do not get the value as clean 379893

Regards,

Amarjeet
Labels (1)
0 Kudos
9 Replies
Amarjeet
Pilgrim

Re: System search returning #379893 instead of 379893

Hi

I found solution for above problem.

I still don't know why the string reports #.

For using in condition I created a new property called NETFRAMEWORK452TWO and assigned value #379893 from property manager.

Then used this property for comparing actual value returned by system search.( NETFRAMEWORK452)

So my condition looks like :

Not ( NETFRAMEWORK452=NETFRAMEWORK452TWO)

This works perfectly well.

Regards,

Amarjeet
0 Kudos
DLee65
Pilgrim

Re: System search returning #379893 instead of 379893

Hi Amarjeet,

The difference is between comparing string values and integer values. If you put a hash in front of the number, it is treated as an integer rather than a string, otherwise the installer assumes properties are all strings.
0 Kudos
Amarjeet
Pilgrim

Re: System search returning #379893 instead of 379893

Hi Dan,

I totally agree with you. Technically I should compare integers instead of strings.

But the issue I am facing with system search is I get the value appended with #. I don't know why install shield returns this weird string instead of integer value.

Have you ever tried obtaining registry value from system search ?

Regards,

Amarjeet
0 Kudos
Highlighted
DebbieL
Pilgrim

Re: System search returning #379893 instead of 379893

Amarjeet,

At run time, when Windows Installer is performing the registry-related system search, it sets the value of the property that you specified. When Windows Installer is setting that property, it adds a prefix to the property value to indicate the type of registry entry (such as REG_DWORD or REG_BINARY). If you then use the property to configure the registry, or if you create a condition that reads this property, you must understand the syntax that Windows Installer uses to set the property.

The following table lists each of the types of registry entries, along with the associated prefix that Windows Installer uses when setting the system search property.

[table="width: 500, class: grid, align: left"]

Prefix/Notation
Meaning



The property value contains a string value (REG_SZ).


#
#+
#-
The property value contains an integer value (REG_DWORD).


#x
The property value contains a hexadecimal value (REG_BINARY).

Windows Installer converts each hexadecimal digit as an ASCII character for this property value.


#%
The property value contains an expandable string value (REG_EXPAND_SZ).



The property value contains a list of strings (REG_MULTI_SZ). This value starts and ends with null.

[/table]

I hope that helps.
0 Kudos
Amarjeet
Pilgrim

Re: System search returning #379893 instead of 379893

Hi DebbiL,

Thanks for the table. My question is still un answered. How t use the property prefixed with # in condition table.

Amarjeet
0 Kudos
DebbieL
Pilgrim

Re: System search returning #379893 instead of 379893

Did you try to put the value, including #, within quotes when entering it in the Condition Builder? For example:
"#379893"
0 Kudos
Roman1
Flexera beginner

Re: System search returning #379893 instead of 379893

Set the Condition to:

FOUNDDOTNET452<"#379893" --> not found
FOUNDDOTNET452>="#379893" --> found or next Version
0 Kudos
Amarjeet
Pilgrim

Re: System search returning #379893 instead of 379893

Hi Roman,

Thanks for your suggestion.

Is it possible to convert this string into decimal in install shield ?

Regards,

Amarjeet
0 Kudos
Roman1
Flexera beginner

Re: System search returning #379893 instead of 379893

You can use ISScript string functions to convert string to number.
0 Kudos