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

Hoover, Jacob Jacob.Hoover at greenheck.com
Thu Aug 17 13:11:22 PDT 2017

Verify your  <Shortcut Id="ApplicationShortcut" WorkingDirectory="INSTALLFOLDER" ../>
Need to assign a working directory.

Also worth mentioning, your application isn't going to have Read/Write access to that database by default.  Best practices dictate you should instead place it in a Per-User location, or if it's to be shared among all the users of the PC, then put it in an app specific folder under common app data.

<Directory Id="CommonAppDataFolder">

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Roopendra Gowlikar
Sent: Thursday, August 17, 2017 12:27 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: [wix-users] Window application with access database(Wix msi)


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" />

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

<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
      <Component Id="xyz.accdb" Guid="GUID">
        <File Id="xyz.accdb" Name="xyz.accdb"

WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

More information about the wix-users mailing list