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: Compare string with integer for conditional install.
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
Feb 18, 2011
03:01 AM
Compare string with integer for conditional install.
HI
I am trying to create a condition which will check installed version of SQL 2005 Express edition.
Following registry key has version information in integer form.
SOFTWARE\Microsoft\Microsoft SQL Server\SQLEXPRESS\MSSQLServer\CurrentVersion\Currentversion.
For current version its 9.00.5000.00
Now i want to make sure that new SQL server 2008 R2 ( version - 10.00.1600.1) should not overwrite my previous version.
When i try to compare 10.00.1600 with the version stored in registry it does not work.
I tried SQL2005VER<<"10.00.1600" so that first digit will be compared. But thid does not work as well ( since i am trying to copare a string with integer value in registry)
Any clue ?
Amarjeet
:eek:
I am trying to create a condition which will check installed version of SQL 2005 Express edition.
Following registry key has version information in integer form.
SOFTWARE\Microsoft\Microsoft SQL Server\SQLEXPRESS\MSSQLServer\CurrentVersion\Currentversion.
For current version its 9.00.5000.00
Now i want to make sure that new SQL server 2008 R2 ( version - 10.00.1600.1) should not overwrite my previous version.
When i try to compare 10.00.1600 with the version stored in registry it does not work.
I tried SQL2005VER<<"10.00.1600" so that first digit will be compared. But thid does not work as well ( since i am trying to copare a string with integer value in registry)
Any clue ?
Amarjeet
:eek:
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Feb 23, 2011
01:33 AM
Type cast the variable either to string or integer and later perform the comparison on same data type variables
![](/skins/images/3B39CE851FDD5528C393F146EB70A2D0/responsive_peak/images/icon_anonymous_message.png)