Skip to content

Installation Prerequisite Check on Windows 7 #251

Open
@Leaf-Lin

Description

@Leaf-Lin

Failed Installations

Environment

Windows 7 32 bit

Expected Behaviour

Failed with unsupported OS

Actual Behaviour

Installer failed with

This installer requires the Visual 2017 C++ Redistributable (x86) 

from https://github.com/elastic/elasticsearch-sql-odbc/blob/6.8/installer/src/Installer/Program.cs#L154

It should have failed in https://github.com/elastic/elasticsearch-sql-odbc/blob/6.8/installer/src/Installer/Program.cs#L149 
but somehow windows 7 still passed?

Steps to reproduce the behaviour

Install ODBC driver 6.8.0 on a Windows 7

Activity

Leaf-Lin

Leaf-Lin commented on Jul 9, 2020

@Leaf-Lin
Author

Related reporting on windows 2012 R2 also passed the prerequisite check, but should have failed #146

droberts195

droberts195 commented on Jul 9, 2020

@droberts195
Contributor

I think the problem is this: https://support.microsoft.com/en-gb/help/3202260/versionnt-value-for-windows-10-and-windows-server-2016

Microsoft doesn't like it when people refuse to install on particular versions of Windows simply by checking the version rather than required capabilities. So Windows 10 reports itself to be Windows 8.1 in most APIs. (There are sneaky ways to find out like checking the version of kernel32.dll instead.)

Then this combines with a silly error in the formula Installed OR (NOT ((VersionNT64 = 1000 AND MsiNTProductType = 1) OR (VersionNT64 = 1000 AND MsiNTProductType <> 1))) where the NOT doesn't make sense. The formula is saying Windows 10 is not acceptable. All other versions are OK. But, per above, Windows 10 is pretending to be Windows 8.1 so it passes too.

droberts195

droberts195 commented on Jul 9, 2020

@droberts195
Contributor

A quick fix that would rule out the very oldest versions of Windows would be Installed OR VersionNT64 >= 603. That would allow installation on Windows 8.1, Windows Server 2012r2 (both Windows NT 6.3 under the hood), plus the more recent versions that pretend to be those versions. The documented supported versions could stay the same.

bpintea

bpintea commented on Jul 9, 2020

@bpintea
Collaborator

Thanks @Leaf-Lin for the report and @droberts195 for the quick check.
The installer didn't get a lot of attention past the release and there still are a few tasks pending around testing (see #37, Test4 might have caught this issue). It might get a redo after other stack components (provided @ygel will get to it).

However, besides the Windows version itself, we'd probably need to check the bitness too, since (according to some reports) the registry might not be correctly written on a 32 bit OS, even if the installation succeeds (passing the incorrect check) and the driver might still not work.

Note: the 32-bit installer is meant for 32-bit apps on a 64-bit OS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @bpintea@droberts195@Leaf-Lin

        Issue actions

          Installation Prerequisite Check on Windows 7 · Issue #251 · elastic/elasticsearch-sql-odbc