Hello,
I'm trying to define a new SQL database using Wix, that has its files (MDF
and LDF) in a specific folder (ideally in the user's documents and settings,
but this is another story)
The thing is when I use the snippet :
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.PlatformProgramFilesFolder)">
<Directory Id="MANUFACTURERFOLDER" Name="MyCompany" >
<Directory Id="INSTALLDIR" Name="MyApp">
.
<Component Id='SqlComponent'
Guid='1324BB67-2DAE-4676-9066-B87326299BE5' Win64="$(var.Win64)" KeyPath
='yes'>
<util:User Id='SQLUser' Name='[ACCOUNT]' Password
='[PASSWORD]' />
<sql:SqlDatabase Id='SqlDatabase' Database='MyDatabase'
ConfirmOverwrite='yes' Server='.'
CreateOnInstall='yes' DropOnUninstall='no'
ContinueOnError='no' Instance='SQLEXPRESS' >
<sql:SqlFileSpec Id="Mdf" Name="MyDatabase"
Filename="[INSTALLDIR]MyDatabase.mdf" Size="4MB" GrowthSize="2MB"/>
<sql:SqlLogFileSpec Id="Ldf" Name="MyDatabase_log"
Filename="[INSTALLDIR]MyDatabase_log.ldf" />
<sql:SqlScript Id='CreateTable' BinaryKey='CreateTable'
ExecuteOnInstall='yes' />
</sql:SqlDatabase>
</Component>
I get the following error when launching the MSI file
CreateDatabase: Error 0x80040e14: failed to create to database:
'MyDatabase', error: CREATE FILE encountered operating system error 5(Access
denied.) while attempting to open or create the physical file 'C:\Program
Files (x86)\MyCompany\MyApp\MyDatabase.mdf'.
I'm using Vista 64 bits and the MSI file is a 32bits one (but I've got the
same when using the 64bits one)
I wonder if there is a way to create theses files (mdf and ldf) in a folder
that is not the default one (C:\Program Files (x86)\Microsoft SQL
Server\MSSQL.1\MSSQL\Data)
Thank you
Crusty Applesniffer
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users