Launch condition - string comparison
-
2012년 3월 5일 월요일 오전 10:16
Hi
I have inherited am install project that requires/installs SQL2008 R2 EXPRESS and includes a launch condition to ensure that the install will not proceed if it cannot find it. It retrieves the version from the registry key:
SOFTWARE\Microsoft\Microsoft SQL Server\SQLEXPRESS\MSSQLServer\CurrentVersion
then has a launch condition:
(SQL2008R2EXPRESSVERSION<>null) AND (SQL2008R2EXPRESSVERSION>="10.50.1600.1")
My concern is that, if an earlier version of the form 9.nn.nnnn.n is installed it will actually pass the above string comparison test when I do not want it to - i.e. string "9..." is > string "10...". Am I correct and, if so, can anyone suggest a workaround please?
Many thanks.
모든 응답
-
2012년 3월 7일 수요일 오전 6:02중재자
"9.50.1600.1" >= "10.501600.1" is right, here.
http://www.simple-talk.com/dotnet/visual-studio/getting-started-with-setup-projects/
It seems that the images in this article cannot display, I found another one referenced this article with images: http://blog.csdn.net/yefengmeander/article/details/7248578
I think the workaround would be using the Bootstrapper package which you can ref in the "prerequisites components" dialog and the package is here[C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\SqlExpress].
Another way is using the custom action code or the code in your application product to check and install this component, so that you can operate the string value as you expected.
Mike Zhang[MSFT]
MSDN Community Support | Feedback to us
- 답변으로 표시됨 Mike Dos ZhangMicrosoft Contingent Staff, Moderator 2012년 3월 13일 화요일 오전 9:29
-
2012년 3월 19일 월요일 오전 9:58Thank you. I realise that, as I already have SQL 2008 R2 as a pre-requisite of the install, the comparison I am trying to execute is effectively redundant. Would you agree?
-
2012년 3월 19일 월요일 오전 10:55중재자
I'm afraid so. Since the condition check will also in the bootstrapper manifest, so there's no need to add a launch condition.
Best wishes,
Mike Zhang[MSFT]
MSDN Community Support | Feedback to us
- 답변으로 표시됨 Mike Dos ZhangMicrosoft Contingent Staff, Moderator 2012년 3월 21일 수요일 오전 10:10

