Install SQL Native Client on both 32 and 64 bit systems

Post specialized setup scripts you have created here.
MarkElder
Posts: 35
Joined: Mon Nov 07, 2005 5:41 pm

Install SQL Native Client on both 32 and 64 bit systems

Postby MarkElder » Fri Apr 10, 2009 11:10 am

Hello,

I am trying to get a script working to install the SQL Native Client provide on both 32 and 64 bit machines. What I have right now works for 32 bit machines but not 64 bit. I got this far by copying existing scripts, but I don't have one that seems to do what I need. Any advice? Here is my script right now.

The check function seems to work as the install does not try to install the native client if the user download the correct install from Microsoft's website and installs it first. However I'm not sure how that works. It seems to be my check script would be looking in the wrong directory for the dlls.

Here are the links from the Microsoft website I was using to get started:
Installing SQL Server Native Client
[url=http://msdn.microsoft.com/en-us/library/ms131334%28SQL.90%29.aspx]Deploying Applications with SQL Native Client
[/url]

Microsoft provides three different MSI files that I need to switch between. I just don't know how to make that check and switch. I am also using web media and would prefer if only the correct version is downloaded.


As a side note to InstallAware it would great if this were a standard application prerequisite along side of MDAC.

------- checksqlncli9 -----------

Code: Select all

Set Variable SQLNativeClient9Exists to TRUE
Get Common Folder Location System->System Directory into System32Dir
Check File Version $System32Dir$\\Sqlncli.dll into Variable SQLNativeClient9Exists
if Variable SQLNativeClient9Exists Equals FALSE
Set Variable PREREQ to TRUE
Set Variable PRELIST to $PRELIST$$NEWLINE$Microsoft SQL Server Native Client (9.0)
end


------- setupsqlncli9 -----------

Code: Select all

Set Variable SQLNativeClientInstallResult to SUCCESS
if Variable SQLNativeClient9Exists Equals FALSE
 Set Variable PROGRESSTEXT to Installing Microsoft SQL Server Native Client 9.0
 Set Variable PROGRESSMODE to MARQUEE
 Set Variable SQLNativeClientInstallResult to
 Set Variable SqlNativeClientLocation to
 Define File Bag : #PROJDIR#\\sqlncli.msi, get runtime location of files into variable SqlNativeClientLocation
 Install/Remove MSI Package $SqlNativeClientLocation$\\sqlncli.msi[ADDLOCAL=ALL] (get result into variable SQLNativeClientInstallResult)
 Set Variable PROGRESSMODE to
end
if Variable SQLNativeClientInstallResult Equals REBOOT
 MessageBox: $TITLE$ Setup, Your computer needs to be restarted before $TITLE$ Setup can continue.$NEWLINE$$NEWLINE$Please save your work in all running programs and click OK to restart your computer. Setup will resume once your computer restarts.$NEWLINE$$NEWLINE$If you click CANCEL, setup will exit. You will have to run setup again at a later time to install $TITLE$.
 if Variable REBOOTNOW Equals OK
   Reboot Computer and Resume Setup
   else
   Terminate Installation
 end
 else
 if Variable SQLNativeClientInstallResult not Equals SUCCESS
   MessageBox: $TITLE$ Setup, Microsoft SQL Server Native Client install failed.  You may be unable to use the Online folder features. 
 end
end

MarkElder
Posts: 35
Joined: Mon Nov 07, 2005 5:41 pm

Postby MarkElder » Wed Apr 15, 2009 11:13 am

OK here is what I ended up with. Hopefully this will be helpful to someone else or someone will reply and show me a better way.

I'm not sure about creating the Web Media blocks in a separate setup script instead of in the main script. That seems to confuse the GUI as it does not see these blocks. But this way I did not need to change the flow of my main script.

I also did not change the check scripts since it seems to be working. I'm still not sure how or why though.


-------- setupsqlncli9 ----------

Code: Select all

Set Variable SQLNativeClientInstallResult to SUCCESS
if Variable SQLNativeClient9Exists Equals FALSE
 Set Variable PROGRESSTEXT to Installing Microsoft SQL Server Native Client 9.0
 Set Variable PROGRESSMODE to MARQUEE
 Set Variable SQLNativeClientInstallResult to
 Set Variable SqlNativeClientLocation to
 
 Get System Setting Windows in 64 bit Mode into Is64Bit
 Get System Setting Processor Architecture into Processor
 
 [DEFINE WEB MEDIA SQL Native Client Version 9 - 32bit, Exclude from Build]
 if Variable Is64Bit Equals FALSE
   Define File Bag : #PROJDIR#\\sqlncli.msi, get runtime location of files into variable SqlNativeClientLocation
   Install/Remove MSI Package $SqlNativeClientLocation$\\sqlncli.msi[ADDLOCAL=ALL] (get result into variable SQLNativeClientInstallResult)
 end
 [DEFINE WEB MEDIA SQL Native Client Version 9 - IA64, Exclude from Build]
 if Variable Processor Equals IA64
   Define File Bag : #PROJDIR#\\sqlncli_ia64.msi, get runtime location of files into variable SqlNativeClientLocation
   Install/Remove MSI Package $SqlNativeClientLocation$\\sqlncli_ia64.msi[ADDLOCAL=ALL] (get result into variable SQLNativeClientInstallResult)
 end
 [DEFINE WEB MEDIA SQL Native Client Version 9 - x64, Exclude from Build]
 if Variable Processor Equals AMD64
   Define File Bag : #PROJDIR#\\sqlncli_x64.msi, get runtime location of files into variable SqlNativeClientLocation
   Install/Remove MSI Package $SqlNativeClientLocation$\\sqlncli_x64.msi[ADDLOCAL=ALL] (get result into variable SQLNativeClientInstallResult)
 end
 
 Set Variable PROGRESSMODE to
end
if Variable SQLNativeClientInstallResult Equals REBOOT
 MessageBox: $TITLE$ Setup, Your computer needs to be restarted before $TITLE$ Setup can continue.$NEWLINE$$NEWLINE$Please save your work in all running programs and click OK to restart your computer. Setup will resume once your computer restarts.$NEWLINE$$NEWLINE$If you click CANCEL, setup will exit. You will have to run setup again at a later time to install $TITLE$.
 if Variable REBOOTNOW Equals OK
   Reboot Computer and Resume Setup
   else
   Terminate Installation
 end
 else
 if Variable SQLNativeClientInstallResult not Equals SUCCESS
   MessageBox: $TITLE$ Setup, Microsoft SQL Server Native Client install failed.  You may be unable to use the Online folder features. 
 end
end

JohnGalt
Posts: 58
Joined: Mon Sep 08, 2008 2:14 pm

Re: Install SQL Native Client on both 32 and 64 bit systems

Postby JohnGalt » Tue Apr 27, 2010 4:30 pm

Is there an updated package that has these so that we can easily include the native client in our installers?

MarkElder
Posts: 35
Joined: Mon Nov 07, 2005 5:41 pm

Re: Install SQL Native Client on both 32 and 64 bit systems

Postby MarkElder » Tue Apr 27, 2010 4:35 pm

Not that I have ever found. InstallAware seems confused about this issue. They just told me to install SQL Server and the client would be installed with it. They did not seem to understand the need for the client drivers separate from the server.

JohnGalt
Posts: 58
Joined: Mon Sep 08, 2008 2:14 pm

Re: Install SQL Native Client on both 32 and 64 bit systems

Postby JohnGalt » Mon May 03, 2010 3:53 pm

Here's a request then!

DennisDawg
Posts: 8
Joined: Tue Nov 30, 2010 5:28 pm

Re: Install SQL Native Client on both 32 and 64 bit systems

Postby DennisDawg » Tue Nov 30, 2010 6:28 pm

Another request.

mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Install SQL Native Client on both 32 and 64 bit systems

Postby mills » Wed Dec 01, 2010 3:11 pm

I've taken note of this request. I'm not sure when we'll have a chance to implement it. It looks like the feature packs are required to implement this. Feel free to correct me if I'm wrong on that.

Feature packs:

2005:
http://www.microsoft.com/downloads/en/d ... 8b9d835cdc

2008:
http://www.microsoft.com/downloads/en/d ... laylang=en

2008 R2:
http://www.microsoft.com/downloads/en/d ... laylang=en
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.

MarkElder
Posts: 35
Joined: Mon Nov 07, 2005 5:41 pm

Re: Install SQL Native Client on both 32 and 64 bit systems

Postby MarkElder » Thu Dec 02, 2010 4:13 pm

The links you posted are to the entire list of available feature packs. My need and original post are just related to the SQL Server Native Client. When connecting to a remote SQL Server from a desktop application that is the current OLEDB Provider. I am actually still installing version 9, but I think there is now a version 10.

Microsoft® SQL Server® 2008 R2 Native Client
Microsoft SQL Server 2008 R2 Native Client (SQL Server Native Client) is a single dynamic-link library (DLL) containing both the SQL OLE DB provider and SQL ODBC driver. It contains run-time support for applications using native-code APIs (ODBC, OLE DB and ADO) to connect to Microsoft SQL Server 2000, 2005, or 2008. SQL Server Native Client should be used to create new applications or enhance existing applications that need to take advantage of new SQL Server 2008 R2 features. This redistributable installer for SQL Server Native Client installs the client components needed during run time to take advantage of new SQL Server 2008 R2 features, and optionally installs the header files needed to develop an application that uses the SQL Server Native Client API.


Here is the MSDN page on installing the Native Client
http://msdn.microsoft.com/en-us/library/ms131321.aspx.

mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Install SQL Native Client on both 32 and 64 bit systems

Postby mills » Thu Dec 02, 2010 11:13 pm

(Using InstallAware 10)

Include as a runtime Microsoft SQL Server Express 2008 R2 (x64).

With the Microsoft SQL Server Express 2008 R2 runtime selected, click the Options button.
Click OK on the check service prompt.
On (the second) Set Variable prompt, esure that /FEATURES includes Tools (it doesn't by default). Click OK

This was used for x64:

Code: Select all

/q /ACTION=Install /SECURITYMODE=SQL /SAPWD="Sq1S#rv$r" /INSTANCENAME="SQLEXPRESS" /FEATURES=SQLEngine,Replication,SDK,Tools /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /SQLSYSADMINACCOUNTS="$SQL_COMPUTER_NAME$\$SQL_USER_NAME$" /IAcceptSQLServerLicenseTerms=TRUE

How to install SQL Server from command prompt:
http://technet.microsoft.com/en-us/libr ... px#Feature


After SQL Server Express 2008 R2 (x64) install completes:

sqlncli.png
sqlncli.png (66.9 KiB) Viewed 46493 times
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.

MarkElder
Posts: 35
Joined: Mon Nov 07, 2005 5:41 pm

Re: Install SQL Native Client on both 32 and 64 bit systems

Postby MarkElder » Thu Dec 02, 2010 11:35 pm

Right - this has been part of the confusion from the beginning. I do not want to install SQL Server. Don't need it, don't want it. In fact for a large number of my users not allowed by their security policy.

This is a client application that simply connects to a central SQL Server. I only need the provider (i.e. SQL Server Native Client). This is the exact same concept as having MDAC available as a runtime separate from SQL Server. The provider installs are very small and there is no need to for the full SQL install to get them.

Microsoft specifically provides instructions and redistributable for installing the runtime. The install is a little more complicated as there is a separate msi depending on the cpu type. Not a huge deal (I've already solved it form my installs) but certainly something that I feel InstallAware should be supporting out of the box.

mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Install SQL Native Client on both 32 and 64 bit systems

Postby mills » Fri Dec 03, 2010 2:03 pm

OK, I got it. I think there's enough information here, then. I've added this to the runtime request list and we may add it to the runtimes view if there's enough demand for it.
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.

BobSchaefer
Posts: 47
Joined: Thu Sep 30, 2010 12:12 pm

Re: Install SQL Native Client on both 32 and 64 bit systems

Postby BobSchaefer » Fri Dec 03, 2010 2:32 pm

If its demand you're looking for, then add me to the list of people who would like this feature.

joakes
Posts: 33
Joined: Wed Feb 27, 2008 10:40 am

Re: Install SQL Native Client on both 32 and 64 bit systems

Postby joakes » Wed Dec 15, 2010 1:55 pm

Add me as well. This has been an ongoing problem for us with previous installs using IA8, then 9, and still IA10.

scholzr
Posts: 1
Joined: Thu Dec 09, 2010 8:57 am

Re: Install SQL Native Client on both 32 and 64 bit systems

Postby scholzr » Sat Mar 12, 2011 10:26 am

I too would like to voice my request for this prerequisite. Also, as a followup to the original post, the check script works on x64 platforms because the x64 installer installs both the x64 version and the x86 version. As a result, looking for the x86 version will find it either way.

DitroniX
Posts: 4
Joined: Wed May 14, 2008 8:22 am
Contact:

Re: Install SQL Native Client on both 32 and 64 bit systems

Postby DitroniX » Sun Jul 24, 2011 2:46 pm

Please can you update me too if this has been resolved as I could do with both 32 and64 bit versions.

It seems support for many day to day runtimes are available on other installer platforms but not for IA.

Many Thanks
Dave


Return to “Sample Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest