NewsArchive
03-15-2009, 03:20 AM
I'm trying to detect if MSSQL CE 3.5 is already installed on a local
computer before asking the user if they want to install it.
So I decided to get file information from the SQLCECOMPACT35.DLL if it
exist and then compare that against the current version information.
However the following code does not work as expected. What am I doing
wrong or how is a better way of handling this?
******** Code extracts (not complete) **********
<< code snipped >>
Set Variable %SQLCEINSTALLED% to "0"
<< code snipped >>
Set Variable %SQLCEINSTALLED% to FUNCTION:Get File Information(File
Version (Resource)) of file "%PROGRAMFILESDIR%\MICROSOFT SQL SERVER
COMPACT EDITION\V3.5\SQLCECOMPACT35.DLL"
If %SQLCEINSTALLED% Greater Than or Equal "3.5.5692.1" Then
Set Variable %INSTALL_SQL35% to "0"
Else
Set Variable %INSTALL_SQL35% to "1"
End
<< code snipped >>
************* End Code Extracts **************
I have stepped through with the debugger and the DLL file version is
"3.5.5692.0" but the IF test is treating it as TRUE instead of FALSE.
Since I am test against "3.5.5692.1", it should be LESS THEN and fall
to the code after the ELSE statement.
Thanks in advance!
Barton Whisler
Prosoft Inc.
Tampa, Florida
computer before asking the user if they want to install it.
So I decided to get file information from the SQLCECOMPACT35.DLL if it
exist and then compare that against the current version information.
However the following code does not work as expected. What am I doing
wrong or how is a better way of handling this?
******** Code extracts (not complete) **********
<< code snipped >>
Set Variable %SQLCEINSTALLED% to "0"
<< code snipped >>
Set Variable %SQLCEINSTALLED% to FUNCTION:Get File Information(File
Version (Resource)) of file "%PROGRAMFILESDIR%\MICROSOFT SQL SERVER
COMPACT EDITION\V3.5\SQLCECOMPACT35.DLL"
If %SQLCEINSTALLED% Greater Than or Equal "3.5.5692.1" Then
Set Variable %INSTALL_SQL35% to "0"
Else
Set Variable %INSTALL_SQL35% to "1"
End
<< code snipped >>
************* End Code Extracts **************
I have stepped through with the debugger and the DLL file version is
"3.5.5692.0" but the IF test is treating it as TRUE instead of FALSE.
Since I am test against "3.5.5692.1", it should be LESS THEN and fall
to the code after the ELSE statement.
Thanks in advance!
Barton Whisler
Prosoft Inc.
Tampa, Florida