Can't install SQL Server from Visual Stuodio Installer's custom action
-
Saturday, December 10, 2011 3:06 AM
Hi,
We are designing a commercial application, which uses SQL Server 2008 R2 Express as backend. Here is how we install it:
- We have a msi installer using Visual Studio installer, which packages the SQL Server Express setup file "SQLEXPRWT_x86_EN.exe" inside.
- We wrote a small program using C# called "Database Installer", which uses System.Diagnostics.Process to extract SQLEXPRWT_x86_EN.exe (by passing "/x" as command-line parameter), then launch the setup.exe passing all the parameters such as "/QS" etc. to do a silent install.
- We used a manifest file in the Database Installer to declare that it needs admin right.
- We then launch this small program from within the msi installer as a "custom action".
Problem:
When the SQL Express goes to the "Setup Support Files" page, and when the progress bar go to 60%, and showing "ExecuteStandardTimingsWorkflow" stage, it got stuck there - it repeatedly pop up the "Please wait while SQL Server 2008 R2 Setup processes the current operation" window - again and again, infinitely.
What I already know:
- It is not the Database Installer - for if I launch it separately it installs the database and sets up everything beautifully;
- It is not how I added the custom action to the install project, for I did it in other projects and it works fine.
It must be the msi not calling the database installer correctly. Can someone shed some light please?
All Replies
-
Sunday, December 11, 2011 3:26 PMModerator
Hi silly_dude,
Please trouleshoot you problem as below:
1.Check if you have installed SQL Server in this machine. If so, please make previous SQL Server is uninstalled successfully, you can refer to: http://support.microsoft.com/kb/909967/
2.Try to run the setup file manually, see if this problem happen.
3.Make sure if your SQL Server's display language is the same as your operation system? If not, please unify them, and try install again.If the problem is not resolved, please post the error log. It is located at C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\YYYYMMDD_HHMMSS\Detail_ComponentUpdate.txt
More information about your machine environment details, such as your operation system version etc.
Best Regards,
Iric
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Edited by Iric WenModerator Sunday, December 11, 2011 3:27 PM
- Marked As Answer by silly_dude Sunday, July 29, 2012 11:19 AM
-
Monday, December 12, 2011 1:06 AM
Thank you Iric for your help!
As to your questions:
1. Do I have SQL Server already installed - No I don't. I uninstalled everything before I started the install.
2. Try to run setup manually - I did and it worked fine. I packed all installation and setup scrips inside a C# console executable, and it runs and installs SQL Server and configures it beautifully if I double-click it. It only hangs when it is launched from within the msi as a custom action.
3. Display language: I guess my question 2 answers this as well.
I will post the log you requested in a separate mssage - tried once and the page went frozen - maybe the log file is too big.
-
Monday, December 12, 2011 1:21 AM
It keeps freezing. I will just post the section of log around the time of freezing:
2011-12-12 11:48:41 Slp: Skipping Action: CachePatchPackage
2011-12-12 11:48:41 Slp: Action is being skipped due to the following restrictions:
2011-12-12 11:48:41 Slp: Condition "Is the datastore flag /Scenario/GlobalFlags/EnableSlipstream set" did not pass as it returned false and true was expected.
2011-12-12 11:48:41 Slp: ----------------------------------------------------------------------
2011-12-12 11:48:41 Slp: Running Action: InitializeMsiAction
2011-12-12 11:48:41 Slp: Sco: Attempting to create base registry key HKEY_LOCAL_MACHINE, machine
2011-12-12 11:48:41 Slp: Sco: Attempting to open registry subkey SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727
2011-12-12 11:48:41 Slp: Attempting to pause the 32 bit ngen queue for x86
2011-12-12 11:48:41 Slp: ngen command to be used from .Net Framework Directory: C:\Windows\Microsoft.Net\Framework\v2.0.50727
2011-12-12 11:48:43 Slp: Microsoft (R) CLR Native Image Generator - Version 2.0.50727.5420
2011-12-12 11:48:43 Slp: Copyright (c) Microsoft Corporation. All rights reserved.
2011-12-12 11:48:45 Slp: The .NET Runtime Optimization Service is started and paused.
2011-12-12 11:48:45 Slp: Completed Action: InitializeMsiAction, returned True
2011-12-12 11:48:45 Slp: ----------------------------------------------------------------------
2011-12-12 11:48:45 Slp: Running Action: MsiTimingAction
2011-12-12 11:48:45 Slp: ----------------------------------------------------------------------
2011-12-12 11:48:45 Slp: Running Action: Install_SqlSupport_Cpu32_Action
2011-12-12 11:48:45 Slp: Sco: Attempting to create base registry key HKEY_LOCAL_MACHINE, machine
2011-12-12 11:48:45 Slp: Sco: Attempting to open registry subkey
2011-12-12 11:48:45 Slp: Sco: Attempting to open registry subkey SOFTWARE\Microsoft\VisualStudio\9.0
2011-12-12 11:48:45 Slp: Sco: Attempting to get registry value InstallDir
2011-12-12 11:48:45 Slp: Target package: "C:\Program Files\New Age Consulting\RWC Register\SQL Server Express\1033_ENU_LP\x86\setup\sqlsupport_msi\SqlSupport.msi"
2011-12-12 11:48:49 Slp: InstallPackage: MsiInstallProduct returned the result code 1618.
2011-12-12 11:48:49 Slp: Watson Bucket 1
Original Parameter Values
2011-12-12 11:48:49 Slp: Parameter 0 : 10.50.1600.1
2011-12-12 11:48:49 Slp: Parameter 1 : 10.50.1600.1
2011-12-12 11:48:49 Slp: Parameter 2 : SqlSupport.msi
2011-12-12 11:48:49 Slp: Parameter 3 : 0x2D2816FE
2011-12-12 11:48:49 Slp: Parameter 4 : 0x1618
2011-12-12 11:48:49 Slp: Parameter 5 : Install_SqlSupport
2011-12-12 11:48:49 Slp:
Final Parameter Values
2011-12-12 11:48:49 Slp: Parameter 0 : 10.50.1600.1
2011-12-12 11:48:49 Slp: Parameter 1 : 10.50.1600.1
2011-12-12 11:48:49 Slp: Parameter 2 : SqlSupport.msi
2011-12-12 11:48:49 Slp: Parameter 3 : 0x2D2816FE
2011-12-12 11:48:49 Slp: Parameter 4 : 0x1618
2011-12-12 11:48:49 Slp: Parameter 5 : Install_SqlSupport
2011-12-12 11:48:50 Slp: Sco: Attempting to write hklm registry key SOFTWARE\Microsoft\Microsoft SQL Server to file C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20111212_114711\Registry_SOFTWARE_Microsoft_Microsoft SQL Server.reg_
2011-12-12 11:48:50 Slp: Watson Bucket 2
Original Parameter Values
2011-12-12 11:48:50 Slp: Parameter 0 : SQL Server 2008 R2@RTM@
2011-12-12 11:48:50 Slp: Parameter 2 : Microsoft.SqlServer.Configuration.Sco.AdjustTokenPrivilege.SetPrivilege
2011-12-12 11:48:50 Slp: Parameter 3 : Microsoft.SqlServer.Configuration.Sco.ScoException@1211@1
2011-12-12 11:48:50 Slp: Parameter 4 : System.ComponentModel.Win32Exception@-2147467259
2011-12-12 11:48:50 Slp: Parameter 5 : Install_SqlSupport
2011-12-12 11:48:50 Slp: Parameter 7 : SOFTWARE\Microsoft\Microsoft SQL Server
2011-12-12 11:48:50 Slp: Parameter 8 : SOFTWARE\Microsoft\Microsoft SQL Server
2011-12-12 11:48:50 Slp:
Final Parameter Values
2011-12-12 11:48:50 Slp: Parameter 0 : SQL Server 2008 R2@RTM@
2011-12-12 11:48:50 Slp: Parameter 2 : 0xFF16C34E
2011-12-12 11:48:50 Slp: Parameter 3 : 0x0A2FBD17@1211@1
2011-12-12 11:48:50 Slp: Parameter 4 : 0xC24842DB
2011-12-12 11:48:50 Slp: Parameter 5 : Install_SqlSupport
2011-12-12 11:48:50 Slp: Parameter 7 : 0xE8507517
2011-12-12 11:48:50 Slp: Parameter 8 : 0xE8507517
2011-12-12 11:48:50 Slp: Sco: Attempting to write hklm registry key SOFTWARE\Microsoft\Microsoft SQL Server to file C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20111212_114711\Registry_SOFTWARE_Microsoft_Microsoft SQL Server.reg_
2011-12-12 11:48:51 Slp: Watson Bucket 3
Original Parameter Values
The last bit repeated infinitely ...
- Edited by silly_dude Monday, December 12, 2011 1:22 AM
-
Monday, December 12, 2011 11:09 PMEric, I think it failed to write to a file under c:/program files. I read an article saying a msi installation process does not exactly get full admin privilege it gets less than that. I guess when it invoked that external DatabaseInstaller executable, it passed on this restriction to that executable, so it couldn't write to c:/program files.
-
Tuesday, December 13, 2011 2:21 AMModerator
Silly_dude,
For local install SQL Server by command prompt, you must run Setup as an administrator.
Please post your summary.txt. It is located at %programfiles%\Microsoft SQL Server\100\Setup Bootstrap\Log\You can also send it to my email: iricwen@hotmail.com
Best Regards,
Iric
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Marked As Answer by silly_dude Sunday, July 29, 2012 11:20 AM
-
Tuesday, December 13, 2011 2:26 AM
Eric, I launch setup.exe from within a C# console application, and there is an application manifest file containing following line:
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
When I launch this console directly it installs SQL Server express beautifully. It is only a problem if it is called from within a msi as custom action.
I will post the summary file straight-away.
-
Tuesday, December 13, 2011 2:28 AM
ComponentUpdate.text:
Overall summary:
Final result: Failed: see details below
Exit code (Decimal): -2068119551
Exit facility code: 1211
Exit error code: 1
Exit message: Failed: see details below
Start time: 2011-12-12 11:48:14
End time: 2011-12-12 11:50:56
Requested action: ComponentUpdate
Machine Properties:
Machine name: SILAN-X61
Machine processor count: 2
OS version: Windows 7
OS service pack: Service Pack 1
OS region: United States
OS language: English (United States)
OS architecture: x86
Process architecture: 32 Bit
OS clustered: No
Package properties:
Description: SQL Server Database Services 2008 R2
ProductName: SQL Server 2008 R2
Type: RTM
Version: 10
SPLevel: 0
Installation location: C:\Program Files\New Age Consulting\RWC Register\SQL Server Express\x86\setup\
Installation edition: EXPRESS_ADVANCED
User Input Settings:
ACTION: ComponentUpdate
CONFIGURATIONFILE:
ENU: True
FARMACCOUNT: <empty>
FARMADMINPORT: 0
FARMPASSWORD: *****
HELP: False
IACCEPTSQLSERVERLICENSETERMS: True
INDICATEPROGRESS: False
PASSPHRASE: *****
PID: *****
QUIET: False
QUIETSIMPLE: True
UIMODE: AutoAdvance
X86: False
Configuration file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20111212_114711\ConfigurationFile.ini
Detailed results:
Feature: SQL
Status: Skipped
MSI status: Passed
Configuration status: Passed
Feature: Analysis Services
Status: Skipped
MSI status: Passed
Configuration status: Passed
Feature: Reporting Services
Status: Skipped
MSI status: Passed
Configuration status: Passed
Feature: Integration Services
Status: Skipped
MSI status: Passed
Configuration status: Passed
Feature: Tools
Status: Skipped
MSI status: Passed
Configuration status: Passed
Rules with failures:
Global rules:
There are no scenario-specific rules.
Rules report file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20111212_114711\SystemConfigurationCheck_Report.htm
-
Tuesday, December 13, 2011 2:29 AMGlobalRules.txt:Overall summary:Final result: PassedExit code (Decimal): 0Exit message: PassedStart time: 2011-12-12 11:47:30End time: 2011-12-12 11:48:10Requested action: RunRulesMachine Properties:Machine name: SILAN-X61Machine processor count: 2OS version: Windows 7OS service pack: Service Pack 1OS region: United StatesOS language: English (United States)OS architecture: x86Process architecture: 32 BitOS clustered: NoProduct features discovered:Product Instance Instance ID Feature Language Edition Version ClusteredPackage properties:Description: SQL Server Database Services 2008 R2ProductName: SQL Server 2008 R2Type: RTMVersion: 10SPLevel: 0Installation location: C:\Program Files\New Age Consulting\RWC Register\SQL Server Express\x86\setup\Installation edition: EXPRESS_ADVANCEDUser Input Settings:ACTION: RunRulesCONFIGURATIONFILE:ENU: TrueFARMACCOUNT: <empty>FARMADMINPORT: 0FARMPASSWORD: *****FEATURES: SQL,AS,RS,IS,TOOLSHELP: FalseIACCEPTSQLSERVERLICENSETERMS: TrueINDICATEPROGRESS: FalseINSTANCENAME: SQLEXPRESS_RWCRPASSPHRASE: *****QUIET: FalseQUIETSIMPLE: TrueRULES: GlobalRulesUIMODE: AutoAdvanceX86: FalseConfiguration file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20111212_114711\ConfigurationFile.iniDetailed results:Rules with failures:Global rules:There are no scenario-specific rules.Rules report file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20111212_114711\SystemConfigurationCheck_Report.htm
-
Saturday, July 28, 2012 10:46 AM
Dear Silly
I meet the same problem.
Is this problem solved?
Thanks
-
Sunday, July 29, 2012 11:19 AM
Yes with the help of this forum I finally got it working. Just go download the "AdventureWorks 2008R2 OLTP.zip" file, then follow the following steps:
- Open the instawdb.sql file in SQL Server Management Studio (SSMS)
- Enable SQLCMD mode (Query / SQLCMD Mode)
- Uncomment the :setvar statements towards the beginning of the script file.
- Update the paths in the
:setvar statements to match the data directory of the instance you want and the installation directory for the installer and the scripts and data files.
- The SqlSamplesDatabasePath variable should contain the data directory where the instance you want to use stores database files (MDF/LDF files) by default. For example, "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\". Different instances have different data directories. Be sure to pick the correct path.
- The SqlSamplesSourceDataPath variable should contain the installation location displayed when you ran the installer. This is where the installer has copied the installer program, plus the subdirectories which contain the scripts and CSV files.
- Execute the script.
- Marked As Answer by Iric WenModerator Wednesday, August 01, 2012 6:13 AM
-
Wednesday, August 01, 2012 5:41 AM
Thank you very much, I will try it at once!Yes with the help of this forum I finally got it working. Just go download the "AdventureWorks 2008R2 OLTP.zip" file, then follow the following steps:
- Open the instawdb.sql file in SQL Server Management Studio (SSMS)
- Enable SQLCMD mode (Query / SQLCMD Mode)
- Uncomment the :setvar statements towards the beginning of the script file.
- Update the paths in the
:setvar statements to match the data directory of the instance you want and the installation directory for the installer and the scripts and data files.
- The SqlSamplesDatabasePath variable should contain the data directory where the instance you want to use stores database files (MDF/LDF files) by default. For example, "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\". Different instances have different data directories. Be sure to pick the correct path.
- The SqlSamplesSourceDataPath variable should contain the installation location displayed when you ran the installer. This is where the installer has copied the installer program, plus the subdirectories which contain the scripts and CSV files.
- Execute the script.
-
Thursday, August 02, 2012 2:10 AM
Yes with the help of this forum I finally got it working. Just go download the "AdventureWorks 2008R2 OLTP.zip" file, then follow the following steps:
- Open the instawdb.sql file in SQL Server Management Studio (SSMS)
- Enable SQLCMD mode (Query / SQLCMD Mode)
- Uncomment the :setvar statements towards the beginning of the script file.
- Update the paths in the
:setvar statements to match the data directory of the instance you want and the installation directory for the installer and the scripts and data files.
- The SqlSamplesDatabasePath variable should contain the data directory where the instance you want to use stores database files (MDF/LDF files) by default. For example, "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\". Different instances have different data directories. Be sure to pick the correct path.
- The SqlSamplesSourceDataPath variable should contain the installation location displayed when you ran the installer. This is where the installer has copied the installer program, plus the subdirectories which contain the scripts and CSV files.
- Execute the script.
Hi Silly,
I am not sure whether my problem is same as you now.
My problem is that I can not install the sql server 2008 R2 in custom action of vs.net setup project. The install log is very similar with the one you post above. But, your solution is executing the sample database script. How to install SQL Server 2008 R2 in custom action successfully first?
-
Friday, August 03, 2012 2:31 AMSorry I got confused with another question I've posted. That question was solved, but not this one. No I still don't know how it can be done, and I doubt anyone in this forum has tried that. No I just couldn't install the SQL Server DB using custom action. I end up creating another shortcut so user will have to click this sortcut to install the DB after installing the msi.
-
Monday, August 20, 2012 9:16 AMLooks like there is no solution so far,very disappointing regarding the fact that these are all MS technologies failing to work togather.I guess I will just have to use NSIS instead....
- Edited by dev_power Monday, August 20, 2012 9:17 AM

