Hi Ravi,
I can at least solve your installing SQL Server Express...
I would use burn (bootstrapper) to chain the SQL Server Express installs and
your MSI
I do this to install SQL Server Express 2012
In Burn:
<Chain>
<ExePackage Id="SQLExpressx64"
DisplayName="Microsoft(r) SQL Server(r) 2012 - Express
Edition x64"
SourceFile="..\PreReqs\SQLEXPR_x64_ENU.exe"
Name="RedistEnt\SQLEXPR_x64_ENU.exe"
InstallCommand="/ACTION=Install /INSTANCENAME=SQLEXPRESS
/FEATURES=SQLENGINE /Q /HIDECONSOLE /SkipRules=RebootRequiredCheck
/IAcceptSQLServerLicenseTerms /SQLSVCSTARTUPTYPE=Automatic
/SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /AGTSVCACCOUNT="NT
AUTHORITY\NETWORK SERVICE" /ASSYSADMINACCOUNTS=BUILTIN\Administrators
/SQLSYSADMINACCOUNTS=BUILTIN\Administrators /BROWSERSVCSTARTUPTYPE=Disabled
/ADDCURRENTUSERASSQLADMIN=true /TCPENABLED=1"
InstallCondition="Not SqlInstanceFoundx64 AND Not
SqlInstanceFoundx64Express AND Not SqlInstanceFound AND Not
SqlInstanceFoundExpress AND VersionNT64"
DetectCondition="SqlInstanceFoundx64"
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="yes"/>
<ExePackage Id="SQLExpressx86"
DisplayName="Microsoft(r) SQL Server(r) 2012 - Express
Edition x86"
SourceFile="..\PreReqs\SQLEXPR_x86_ENU.exe"
Name="RedistEnt\SQLEXPR_x86_ENU.exe"
InstallCommand="/ACTION=Install /INSTANCENAME=SQLEXPRESS
/FEATURES=SQLENGINE /Q /HIDECONSOLE /SkipRules=RebootRequiredCheck
/IAcceptSQLServerLicenseTerms /SQLSVCSTARTUPTYPE=Automatic
/SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /AGTSVCACCOUNT="NT
AUTHORITY\NETWORK SERVICE" /ASSYSADMINACCOUNTS=BUILTIN\Administrators
/SQLSYSADMINACCOUNTS=BUILTIN\Administrators /BROWSERSVCSTARTUPTYPE=Disabled
/ADDCURRENTUSERASSQLADMIN=true /TCPENABLED=1"
InstallCondition="Not SqlInstanceFound AND Not
SqlInstanceFoundExpress AND Not VersionNT64"
DetectCondition="SqlInstanceFound"
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="yes"/>
<MsiPackage Id="YourMSI>
Blah
</MsiPackage>
</Chain>
</Bundle>
<Fragment Id="InstallConditionChecks">
<!-- Check for SQL Server Express -->
<?define InstanceName = "MSSQLSERVER" ?>
<?define InstanceNameExpress = "SQLEXPRESS" ?>
<!-- Read SQL Server keys to find current instance and version -->
<!-- 32 bit OS search -->
<util:RegistrySearch
Id="SqlInstanceFound"
Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance
Names\SQL" Value="$(var.InstanceName)"
Result="exists" Variable="SqlInstanceFound" />
<util:RegistrySearch
Id="SqlInstanceFoundExpress"
Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance
Names\SQL" Value="$(var.InstanceNameExpress)"
Result="exists" Variable="SqlInstanceFoundExpress" />
<!-- 64 bit OS search -->
<util:RegistrySearch
Id="SqlInstanceFoundx64"
Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance
Names\SQL" Value="$(var.InstanceName)" Win64="yes"
Result="exists" Variable="SqlInstanceFoundx64" />
<util:RegistrySearch
Id="SqlInstanceFoundx64Express"
Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance
Names\SQL" Value="$(var.InstanceNameExpress)" Win64="yes"
Result="exists" Variable="SqlInstanceFoundx64Express" />
-----Original Message-----
From: Ravishankar [mailto:[email protected]]
Sent: March-28-13 8:44 AM
To: [email protected]
Cc: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Attaching mdf file
Hi Rob,
Please find below my requirement and am new to WiX...
The installer should perform the below activities
1.Install MS SQL Server 2005 Express
2.Create Database and attach a *.mdf file 3.present installer files are
developed in VB 6, so the installation should create the necesary folder
structure,registry entries
Kindly let me know how to approach
Thanks and Regards
Ravi
On 3/28/2013 6:01 PM, Rob Mensching wrote:
> Yes, a SqlString can do that. Connect to the "master" database then
> use the SQL string to attach the file. Sorry,I don't have time to
> write up a full example.
>
>
> On Thu, Mar 28, 2013 at 1:33 AM, Ravishankar <
> [email protected]> wrote:
>
>> Hi,
>> Is it possible to attach the SQL Server mdf to the database instance?
>>
>> Please send me a sample code.
>>
>> Thanks and Regards
>> Ravi Shankar
>>
>>
>>
>> ---------------------------------------------------------------------
>> --------- Own the Future-Intel® Level Up Game Demo Contest 2013
>> Rise to greatness in Intel's independent game demo contest.
>> Compete for recognition, cash, and the chance to get your game on
>> Steam. $5K grand prize plus 10 genre and skill prizes.
>> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
>> _______________________________________________
>> WiX-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>>
> ----------------------------------------------------------------------
> -------- Own the Future-Intel® Level Up Game Demo Contest 2013
> Rise to greatness in Intel's independent game demo contest.
> Compete for recognition, cash, and the chance to get your game on
> Steam. $5K grand prize plus 10 genre and skill prizes.
> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
> _______________________________________________
> WiX-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013 Rise to greatness in
Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game on Steam. $5K
grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users