Лог SQL Server'a:
Дата,Источник,Серьезность,Сообщение
12/26/2015 23:30:44,spid57,Неизвестно,CREATE FILE encountered operating system error 5(Отказано в доступе.) while attempting to open or create the physical file 'C:\Program Files (x86)\Aleksey\Demo Application\WixTestDb.mdf'.
12/26/2015 23:30:44,spid57,Неизвестно,Ошибка: 5123 серьезность: 16 состояние: 1.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:sql="http://schemas.microsoft.com/wix/SqlExtension">
<!--<?define RootFolder="..\bin\Release\DemoApplication"?>-->
<?define RootFolder="..\bin\Debug\DemoApplication"?>
<?define DbScriptsFolder="..\DB"?>
<?define DemoAppExeFileName="DemoApplication.exe"?>
<?define ServiceExeFileName="WixWindowsServiceTest.exe"?>
<?define UtilsLibFileName="UtilsLibrary.dll"?>
<?define DemoApplicationExeConfigFileName="DemoApplication.exe.config"?>
<?define DemoApplicationPdbFileName="DemoApplication.pdb"?>
<!-- Для работы с базой данных -->
<?define DatabaseName="WixTestDb"?>
<?define DatabaseSever="(local)"?>
<?define DatabaseUser="sa"?>
<?define DatabasePassword="12345"?>
<Product Id="????????-cca8-4f6d-8eaf-dc2d6e43388e"
Name="GeneralSetup"
Language="1049"
Codepage="1251"
Version="1.0.0.0"
Manufacturer="Aleksey"
UpgradeCode="????????-e045-4889-a778-8fdbd5de3515">
<Package SummaryCodepage="1251"
Description="Программа установки Demo Application"
Comments="Пакет установки демонстрационного приложения"
InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<Media Id="1" Cabinet="demoApp1.cab" EmbedCab="yes" />
<Property Id="FeatureStateDisabled" Value="1" />
<!-- Атрибут Absent может принимать два значения: allow и disallow. В первом случае пользователь получит возможность
не устанавливать набор совсем; во втором – набор будет устанавливаться в любом случае – так следует помечать необходимые для работы компоненты -->
<!-- Наборы компонентов -->
<Feature Id="Complete"
Title="Demo Application"
Description="Полная установка"
Display="expand" Level="1"
ConfigurableDirectory="INSTALLLOCATION"
AllowAdvertise="no" Absent="disallow" InstallDefault="local">
<Feature Id="RequiredComponents"
Title="Необходимые компоненты"
Description="Важные компоненты" Level="1" AllowAdvertise="no" Absent="disallow" InstallDefault="local">
<ComponentRef Id="SqlDatabaseCreate"/>
</Feature>
</Feature>
</Product>
<Fragment>
<!-- Виртуальный каталог -->
<Directory Id="TARGETDIR" Name="SourceDir">
<!-- Подкаталог Program Files\Aleksey\Demo Application -->
<Directory Id="ProgramFilesFolder">
<Directory Id="ManufacturerFolder" Name="Aleksey">
<Directory Id="INSTALLLOCATION" Name="Demo Application" >
<!-- Подкаталог Doc -->
<Directory Id="HelpFilesFolder" Name="Doc" />
</Directory>
</Directory>
</Directory>
<!-- Пуск\Программы\Demo Application -->
<Directory Id="ProgramMenuFolder">
<Directory Id="ProgramMenuDir" Name="Demo Application" />
</Directory>
<!-- Рабочий стол -->
<Directory Id="DesktopFolder" />
</Directory>
</Fragment>
<Fragment>
<Binary Id="CreateDbSqlScriptPart1"
SourceFile="$(var.DbScriptsFolder)\CreatePart1.sql" />
<Binary Id="CreateDbSqlScriptPart2"
SourceFile="$(var.DbScriptsFolder)\CreatePart2.sql" />
<DirectoryRef Id="INSTALLLOCATION" >
<Component Id="SqlDatabaseCreate"
Guid="????????-026D-42d5-9F65-7375318D1328">
<CreateFolder Directory="INSTALLLOCATION" />
<util:User Id="ServiceAdministratorId"
Name="$(var.DatabaseUser)"
Password="$(var.DatabasePassword)"
CreateUser="no"
FailIfExists="no"/>
<sql:SqlDatabase Id="MainDatabase"
Database="$(var.DatabaseName)"
Server="$(var.DatabaseSever)"
User="ServiceAdministratorId"
CreateOnInstall="yes"
CreateOnUninstall="no"
DropOnUninstall="no">
<sql:SqlFileSpec Id="dbFileSpecification"
Name="$(var.DatabaseName)"
Filename="[INSTALLLOCATION]\$(var.DatabaseName).mdf"
GrowthSize="10"/>
<sql:SqlLogFileSpec Id="SqlLogFile"
Filename="[INSTALLLOCATION]\$(var.DatabaseName).ldf"
Name="$(var.DatabaseName)Log" />
<sql:SqlScript Id="CreateDbSqlScript1"
Sequence="1"
ContinueOnError="no"
ExecuteOnReinstall="yes"
ExecuteOnInstall="yes"
BinaryKey="CreateDbSqlScriptPart1" />
<sql:SqlScript Id="CreateDbSqlScript2"
Sequence="2"
ContinueOnError="no"
ExecuteOnReinstall="yes"
ExecuteOnInstall="yes"
BinaryKey="CreateDbSqlScriptPart2" />
</sql:SqlDatabase>
</Component>
</Fragment>