[wix-users] Window application with access database(Wix msi)

Roopendra Gowlikar roopendra.gowlikar at gmail.com
Thu Aug 17 10:27:13 PDT 2017


Hello,

Context : After Msi installation, deployed application is throws error
saying can't find database "xyz.accdb" from "C:\Windows\System32" location.
Even though xyz.accdb is in same folder("C:\Program Files
(x86)\MyApplication") as exe.

For window application which uses access as its database, we created msi
and after installation its try to read from "C:\Windows\System32" which is
not defined in application nor in installation wax. Application suppose to
read from same location as install folder. when I debug actual application
its reading from parent level folder of project.

Is any better way to deploy access database ..? Any sample code would be
appreciated.


I used WiX setup editor to map the access(xyz.accdb).
------------------------------------------------------------
---------------------------------------------

<?define xyz_TargetDir=$(var.xyz.TargetDir)?>

    <Feature Id="ProductFeature" Title="xyz" Level="1">
      <ComponentGroupRef Id="ProductComponents" />
      <ComponentRef Id="ApplicationShortcut" />
      <ComponentRef Id="ApplicationShortcutDesktop" />
    </Feature>

  <Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="INSTALLFOLDER" Name="xyz" />
      </Directory>
      <Directory Id="ProgramMenuFolder">
        <Directory Id="ApplicationProgramsFolder" Name="xyz"></Directory>
      </Directory>
      <Directory Id="DesktopFolder" Name="Desktop"></Directory>
    </Directory>
  </Fragment>

<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
      <Component Id="xyz.accdb" Guid="GUID">
        <File Id="xyz.accdb" Name="xyz.accdb"
Source="$(var.xyz_TargetDir)xyz.accdb"
/>
      </Component>
</ComponentGroup>
</Fragment>


More information about the wix-users mailing list