Discussion:
[wpkg-users] Check is failing when it shouldn't on MS SQL Server 2012 Express LocalDB
Paul Griffith
2017-04-11 16:53:42 UTC
Permalink
Hi,

I am running into a strange case where a check is failing when it
shouldn't. I am trying to check the install of Microsoft SQL Server 2012
Express LocalDB and it keeps failing. In my package below if I have
only the "uninstall" check, the check fails, but the registry check
which should be the equivalent of the "uninstall" check is successful.
I have the same problem with Microsoft SQL Server 2012 Native Client
11.2.5058.0. Any idea?


<check type="uninstall" condition="versiongreaterorequal"
path="Microsoft SQL Server 2012 Express LocalDB" value="%PKG_VERSION%" />

<check type="registry" condition="equals"
path="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{E4A1FDA3-689D-44DA-9B39-86BD2270F522}\DisplayVersion"
value="11.2.5058.0" />



http://download.microsoft.com/download/3/A/6/3A632674-A016-4E31-A675-94BE390EA739/ENU/x64/SqlLocalDB.msi
http://download.microsoft.com/download/3/A/6/3A632674-A016-4E31-A675-94BE390EA739/ENU/x64/sqlncli.msi"


----snip-------
<?xml version="1.0" encoding="UTF-8"?>

<packages:packages
xmlns:packages="http://www.wpkg.org/packages"
xmlns:wpkg="http://www.wpkg.org/wpkg"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.wpkg.org/packages
../../xsd/packages.xsd" >

<!-- documentation of the Inno Setup command line switches can be
found at http://www.jrsoftware.org/ishelp/
Installer .....
http://www.jrsoftware.org/ishelp/index.php?topic=setupcmdline
and
Uninstaller ...
http://www.jrsoftware.org/ishelp/index.php?topic=uninstcmdline -->

<package id="sql2012-express-sp2-localdb"
name="SQL2012 Express LocalDB"
revision="%PKG_VERSION%"
reboot="false"
priority="17000">

<variable name="PKG_VERSION" value="11.2.5058.0" />
<variable name="PKG_NAME" value="sql2012-express-sp2-localdb" />
<variable name="PKG_SOURCE"
value="%SOFTWARE%\etap\16.1\prereq\x64\SqlLocalDB.msi"/>
<variable name="PKG_DESTINATION"
value="%ProgramFiles%\Microsoft SQL Server" architecture="x86"/>
<variable name="PKG_DESTINATION"
value="%ProgramFiles%\Microsoft SQL Server" architecture="x64"/>
<variable name="PKG_INSTALL_SWITCH"
value="IACCEPTSQLLOCALDBLICENSETERMS=YES ALLUSERS=1"/>
<variable name="PKG_REMOVE_SWITCH" value="ALLUSERS=1"/>

<!-- <check type="uninstall" condition="versiongreaterorequal"
path="Microsoft SQL Server 2012 Express LocalDB" value="%PKG_VERSION%"
/> -->
<check type="registry" condition="equals"
path="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{E4A1FDA3-689D-44DA-9B39-86BD2270F522}\DisplayVersion"
value="11.2.5058.0" />

<install cmd='MsiExec.exe /quiet /norestart /log
"%TMP%\%PKG_NAME%.log" /i "%PKG_SOURCE%" %PKG_INSTALL_SWITCH%' />
<upgrade include="install" />

<remove cmd='MsiExec.exe /quiet /norestart /log
"%TMP%\%PKG_NAME%.log" /x "%PKG_SOURCE%" %PKG_REMOVE_SWITCH%' />


</package>
</packages:packages>
-----snip-----

Thank you
Paul

---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Rainer Meier
2017-04-11 17:03:17 UTC
Permalink
Hi Paul,

There are several possibilities why your uninstall check might fail.
Post by Paul Griffith
<check type="uninstall" condition="versiongreaterorequal"
path="Microsoft SQL Server 2012 Express LocalDB" value="%PKG_VERSION%" />
What ist PKG_VERSION variable set to? Is it even defined in the package?

Make sure to run WPKG from 64-bit cscript.exe (else the check fails if
the uninstall entry is in 64-bit section of the Registry)


The uninstall name/path might contain some special characters. Perhaps
you can try to use a regular expression like ".*SQL Server 2012 Express.*".


best regards,
Rainer
---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Paul Griffith
2017-04-11 18:10:13 UTC
Permalink
Post by Rainer Meier
Hi Paul,
There are several possibilities why your uninstall check might fail.
Post by Paul Griffith
<check type="uninstall" condition="versiongreaterorequal"
path="Microsoft SQL Server 2012 Express LocalDB"
value="%PKG_VERSION%" />
What ist PKG_VERSION variable set to? Is it even defined in the package?
Make sure to run WPKG from 64-bit cscript.exe (else the check fails if
the uninstall entry is in 64-bit section of the Registry)
The uninstall name/path might contain some special characters. Perhaps
you can try to use a regular expression like ".*SQL Server 2012 Express.*".
best regards,
Rainer
Rainer,

Hat tip to you! The regular expression ".*SQL Server 2012
Express.*" did the trick.

Thanks,
Paul

---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Loading...