[wix-users] Deploying access database file with Wix
Carlos Sosa
carlos.sosa.us at outlook.com
Fri Aug 18 07:57:08 PDT 2017
Just because I know how hard it is sometimes, modify at will (enjoy):
******************************************************************************************************************
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<?define ProductName = "your app" ?>
<?define ProductManufacturer = "MANUFACTURER" ?>
<?define ShortcutDescription = "SC_DESCRIPTION" ?>
<?define UpgradeCode = "yOURgui" ?>
<Product Id="*"
Name="$(var.ProductName)"
Language="1033"
Version="2.2.1.0"
Manufacturer="$(var.ProductManufacturer)"
UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" InstallPrivileges="elevated" />
<MajorUpgrade AllowDowngrades="no"
AllowSameVersionUpgrades="no"
DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes"/>
<Icon Id="icon.ico" SourceFile="..\..\Lib\YOUR.ico"/>
<Property Id="ARPPRODUCTICON" Value="icon.ico" />
<UI>
<UIRef Id="WixUI_Minimal" />
</UI>
<Feature Id="ProductFeature" Title="yOURInstaller" Level="1">
<ComponentGroupRef Id="CMP_ProductComponents" />
<ComponentRef Id="CMP_StartMenuShortcut" />
<ComponentRef Id="CMP_DesktopShortcut" />
<ComponentRef Id="CMP_DB_IMPORT_EXPORT_DIR"/>
<ComponentRef Id="RegistryEntries"/>
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="DesktopFolder" SourceName="Desktop"/>
<Directory Id="DB">
<Directory Id="INSTALLFOLDER" Name="DB">
<Directory Id="DB_IMPORT_EXPORT_DIR" Name="IMPORT_EXPORT"/>
</Directory>
</Directory>
<Directory Id ="ProgramMenuFolder">
<Directory Id="StartMenu" Name="$(var.ProductName)"/>
</Directory>
<Component Id="RegistryEntries" Guid="yourgui">
<RegistryKey Root="HKCU"
Key="Software\Microsoft\Office\14.0\Access\Security\Trusted Locations\Location1"
Action="createAndRemoveOnUninstall">
<RegistryValue Type="integer" Name="AllowSubfolders" Value="1" KeyPath="yes"/>
<RegistryValue Type="string" Name="Description" Value="DB_FE.accdr"/>
<RegistryValue Type="string" Name="Path" Value="C:\DB\"/>
</RegistryKey>
</Component>
</Directory>
<DirectoryRef Id="DB_IMPORT_EXPORT_DIR">
<Component Id = "CMP_DB_IMPORT_EXPORT_DIR"
Guid = "YOURGUI"
KeyPath = "yes">
<CreateFolder/>
</Component>
</DirectoryRef>
</Fragment>
<!-- Start menu shortcut-->
<Fragment>
<Component Directory="StartMenu" Id ="CMP_StartMenuShortcut"
Guid ="YOURGUI">
<Shortcut Id ="ApplicationShortcut"
Name ="$(var.ProductName)"
Description ="MYDB"
Target ="[INSTALLFOLDER]DBFILE.accdr"
Icon="YOUR.ico" />
<RemoveFolder Id="RemoveStartMenuShortcut"
On="uninstall"/>
<RegistryValue Root ="HKCU"
Key="Software\Microsoft\DB"
Name="Installed"
Type="integer"
Value="1"
KeyPath="yes" />
</Component>
</Fragment>
<!-- Desktop shortcut-->
<Fragment>
<Component Directory="DesktopFolder"
Id="CMP_DesktopShortcut"
Guid="*">
<Shortcut Id="DesktopShortcut"
Name="$(var.ProductName)"
Target="[INSTALLFOLDER]DB.accdr"
Icon ="your.ico"
Directory="DesktopFolder"
WorkingDirectory="INSTALLFOLDER"/>
<RemoveFolder Id="RemoveDesktopShortcut"
On="uninstall"/>
<RegistryValue
Root="HKCU"
Key="Software\$(var.ProductName)\Settings"
Name="DesktopShortcut"
Type="integer"
Value="1"
KeyPath="yes" />
</Component>
</Fragment>
<Fragment>
<ComponentGroup Id="CMP_ProductComponents" Directory="INSTALLFOLDER">
<Component Id ="Application"
Guid="yOURGUI">
<File Id ="FILE_DB_Application"
Source ="..\..\Lib\DB.accdr"
KeyPath ="yes">
<util:PermissionEx User ="Users"
GenericAll="yes"/>
</File>
</Component>
<Component Id ="BackEnd"
Guid="YOURGUI"
Permanent="yes"
NeverOverwrite="yes">
<File Id ="FILE_DB_BackEnd"
Source ="..\..\Lib\DB.accdb"
KeyPath ="yes">
<util:PermissionEx User ="Users"
GenericAll="yes"/>
</File>
</Component>
<Component Id ="icon"
Guid="yOUR">
<File Id ="DB_icon"
Source ="..\..\Lib\your.ico"
KeyPath ="yes" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
******************************************************************************************************************
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Roopendra Gowlikar
Sent: Friday, August 18, 2017 6:17 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: [wix-users] Deploying access database file with Wix
Hello,
Does anyone know how to deploy access database file using wix.
Any pointer would be greatly appreciated.
Thanks
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list