[wix-users] DB not getting created in Program Files (x86) folder

Ven H venh.123 at gmail.com
Wed Aug 15 04:58:10 PDT 2018


Please find the Product.wxs below.

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="
http://schemas.microsoft.com/wix/UtilExtension" xmlns:sql="
http://schemas.microsoft.com/wix/SqlExtension">
<Product Id="8EFD525A-303F-4836-8D64-2A0EEB982AA2" Name="DBPathSample"
Language="1033" Version="1.0.0.0" Manufacturer="DB_PATH_SAMPLE"
UpgradeCode="ebd87ab3-1834-4b6e-a473-86d61d3d5334">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine"
/>

<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is
already installed." />
<MediaTemplate EmbedCab="yes" />

    <Property Id="MSIUSEREALADMINDETECTION" Value="1" />
    <Property Id="MSIFASTINSTALL" Value="1"/>
    <Property Id="MsiLogging" Value="v" />
    <Property Id="MSIENFORCEUPGRADECOMPONENTRULES" Value="1" />

    <Property Id="SQL_SERVER_INSTANCE" Value="MySQLServer"/>
    <Property Id="SQL_LOGIN_NAME" Value="Admin"/>
    <Property Id="SQL_LOGIN_PASSWORD" Value="AdminPwd"/>

<Feature Id="ProductFeature" Title="DBPathSample" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>

<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="DBPathSample" />
</Directory>
</Directory>
</Fragment>

<Fragment>
    <util:User Id="SQLUser" Name="[SQL_LOGIN_NAME]"
Password="[SQL_LOGIN_PASSWORD]" />
<ComponentGroup Id="ProductComponents">
<Component Id="dbComp1" Guid="2D846C0A-BD4C-47C8-9D67-3B749DD32180"
Directory="INSTALLFOLDER" KeyPath="yes">
        <sql:SqlDatabase Id="msiTestDB1" Database="Test_Path_DB"
Server="[SQL_SERVER_INSTANCE]" CreateOnInstall="yes" User="SQLUser" >

          <sql:SqlFileSpec Id="tpDataFile"
Filename="[INSTALLFOLDER]tpData.mdf" Name="tpData.mdf" Size="3072KB"
MaxSize="10MB" GrowthSize="10%"/>
          <sql:SqlLogFileSpec Id="tpLogFile"
Filename="[INSTALLFOLDER]tpLog.ldf" Name="tpLog.mdf" Size="2048KB"
MaxSize="10MB" GrowthSize="10%"/>
        </sql:SqlDatabase>
      </Component>
</ComponentGroup>
</Fragment>
</Wix>

Error in the Log below.

Line 502: CreateDatabase:  Error 0x80004005: failed to create to database:
'Test_Path_DB', error: unknown error
Line 505: Error 26201. Error -2147467259: failed to create SQL database:
Test_Path_DB, error detail: unknown error.
Line 506: MSI (s) (E4!2C) [04:42:40:308]: Product: DBPathSample -- Error
26201. Error -2147467259: failed to create SQL database: Test_Path_DB,
error detail: unknown error.

This won't be due to space since there is more than 2 GB space in that
drive. I have other similar samples where DB gets created in other folders,
which also rules out the possibility of issues with SQL settings. Hence I
came to the conclusion that it may be a permission issue.




On Tue, Aug 14, 2018 at 12:03 AM, Edwin Castro <egcastr at gmail.com> wrote:

> Let's begin with:
>
> what is your wix authoring for this?
> what is the actual error in log?
> what specifically leads you to believe it is a permission issue?
> what have you tried to resolve the suspected permission issue?
>
> --
> Edwin G. Castro
>
>
> On Mon, Aug 13, 2018 at 9:45 AM, Ven H via wix-users <
> wix-users at lists.wixtoolset.org> wrote:
>
>> When I give the path for creating the DB (data and log files) in Program
>> Files (x86) folder in my MSI, I always get an error in the log, which is
>> not so helpful for troubleshooting. Initially, I thought, this could be
>> due
>> to space, but tried on a server with lots of space, but there also, I get
>> the same issue. Upon some searching I found that it is because of
>> permission, but I am not sure how to fix it. Can anyone please help?
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant
>> http://www.firegiant.com/
>>
>
>



More information about the wix-users mailing list