Cannot create a 64bit odbc dsn from a 32bit installation script

Got a problem you cannot solve? Try here.
it@audimex.com
Posts: 1
Joined: Tue May 03, 2022 9:35 am

Cannot create a 64bit odbc dsn from a 32bit installation script

Postby it@audimex.com » Tue May 03, 2022 9:45 am

Hi,

according to resources in the internet, we try to do this with the following script:

Code: Select all

Set Variable ISWINDOWS64BIT to FALSE
Get System Setting Windows in 64 bit Mode into ISWINDOWS64BIT
if Variable ISWINDOWS64BIT Equals TRUE
  Comment: Check 64bit
  Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode
end
Comment: Check MSXML60
Comment: CreateOdbcConnection for Perl
Comment: no variables allowed in "Create ODBC DSN"
Check Registry Key HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\110\ into SUCCESS
if Variable SUCCESS not Equals NO$KEY
  if Variable SUCCESS Equals READ$ERROR
    MessageBox: Error, The registry key$NEWLINE$$NEWLINE$HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\110$NEWLINE$$NEWLINE$can not be read!
    Terminate Installation
  end
  Create ODBC DSN audimex_tengelmann (uses driver SQL Server Native Client 11.0)
else
  Check Registry Key HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\100\ into SUCCESS
  if Variable SUCCESS Equals NO$KEY
    Create ODBC DSN audimex_tengelmann (uses driver SQL Native Client)
  else
    if Variable SUCCESS Equals READ$ERROR
      MessageBox: Error, The registry key$NEWLINE$$NEWLINE$HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\100$NEWLINE$$NEWLINE$can not be read!
      Terminate Installation
    else
      Create ODBC DSN audimex_tengelmann (uses driver SQL Server Native Client 10.0)
    end
  end
end
if Variable ISWINDOWS64BIT Equals TRUE
  Comment: Check 64bit
  Set Win32 - Native 32 bit Windows and Windows 32 on Windows 64 (WOW64) - installation mode
end


This code should create a 32bit DSN on a 32bit Windows system, and a 64bit DSN on a 64bit system. But it creates a 32bit DSN, regardless on which system it runs.

What is our problem? How can we fix it?

Kind reagrds,
Markus

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Cannot create a 64bit odbc dsn from a 32bit installation script

Postby FrancescoT » Thu May 05, 2022 10:31 am

I don't know to which internet resources you are referring to, but here you can find a ready to use "ODBC sample" that demonstrates how to create 32/64 bit ODBC data sources.
https://www.installaware.com/forums/viewtopic.php?f=2&t=6772

Hope this helps you.
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 56 guests