<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PGDB: include into deployment package in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/pgdb-include-into-deployment-package/m-p/514215#M13856</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It depends on what you're using to create your installer.&amp;nbsp; Using the standard Visual Studio deployment project you just open the File System view and add the file to the correct folder.&amp;nbsp; You can create a registry entry on the Registry view and set its value using [TARGETDIR] plus the rest of the path to the database (i.e. [TARGETDIR]\Data\ourDatabase.mdb).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yep.&amp;nbsp; That's it! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Much appreciated!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Apr 2011 19:34:55 GMT</pubDate>
    <dc:creator>JamesCrandall</dc:creator>
    <dc:date>2011-04-27T19:34:55Z</dc:date>
    <item>
      <title>PGDB: include into deployment package</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/pgdb-include-into-deployment-package/m-p/514211#M13852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there a specific method or process to distribute a Personal Geodatabase with a Setup.exe or Installer.msi?&amp;nbsp; I'd like to distribute a PGDB that my extension uses with the .msi that is built for deploying the assembly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are there any specific suggestions on AppPath settings?&amp;nbsp; For example, I have some code that opens an IFeatureWorkspace of that PGDB:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;pWorkspaceFactory.OpenFromFile(db_path &amp;amp; "\Reporting.mdb", 0)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess my question on AppPath would be where exactly would the Installer set AppPath?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit: here is my current GetAppPath function:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;

Private Shared Function GetAppPath() As String
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim path As String

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return path
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Function
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2011 18:33:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/pgdb-include-into-deployment-package/m-p/514211#M13852</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2011-04-27T18:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: PGDB: include into deployment package</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/pgdb-include-into-deployment-package/m-p/514212#M13853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We do this all the time.&amp;nbsp; The installer copies the geodatabase and the application assembly to a specific location relative to the installation directory that the user chooses during the installation wizard.&amp;nbsp; For instance, the application assembly is copied to ...\GISi\OurApplication and the geodatabase is copied to ...\GISi\OurApplication\Data.&amp;nbsp; Our code uses System.Reflection.Assembly.GetExecutingAssembly.Location to get the location of the assembly then uses this path to build the path to the geodatabase.&amp;nbsp; In this case it would look like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dbasePath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location) &amp;amp; "\Data\ourDatabase.mdb"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The relative path of the database to the assembly is always the same.&amp;nbsp; The only thing that changes is the root directory where the user chooses to install the application.&amp;nbsp; You can also just have the installer create a registry entry that contains the path to the database and have your code read the path from that registry key.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2011 18:59:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/pgdb-include-into-deployment-package/m-p/514212#M13853</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2011-04-27T18:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: PGDB: include into deployment package</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/pgdb-include-into-deployment-package/m-p/514213#M13854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Neil, Thanks a bunch for the input.&amp;nbsp; I think I am heading down the right path here, but could you clarify how you include the PGDB in the .msi package?&amp;nbsp; That is, do I just add the PGDB (.mdb) file to the Project?&amp;nbsp; How do I tell it where to install/place this file?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;WeThe only thing that changes is the root directory where the user chooses to install the application.&amp;nbsp; You can also just have the installer create a registry entry that contains the path to the database and have your code read the path from that registry key.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have an example or walkthru on how to accomplish this?&amp;nbsp; How &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank You!!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2011 19:09:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/pgdb-include-into-deployment-package/m-p/514213#M13854</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2011-04-27T19:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: PGDB: include into deployment package</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/pgdb-include-into-deployment-package/m-p/514214#M13855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It depends on what you're using to create your installer.&amp;nbsp; Using the standard Visual Studio deployment project you just open the File System view and add the file to the correct folder.&amp;nbsp; You can create a registry entry on the Registry view and set its value using [TARGETDIR] plus the rest of the path to the database (i.e. [TARGETDIR]\Data\ourDatabase.mdb).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2011 19:20:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/pgdb-include-into-deployment-package/m-p/514214#M13855</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2011-04-27T19:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: PGDB: include into deployment package</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/pgdb-include-into-deployment-package/m-p/514215#M13856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It depends on what you're using to create your installer.&amp;nbsp; Using the standard Visual Studio deployment project you just open the File System view and add the file to the correct folder.&amp;nbsp; You can create a registry entry on the Registry view and set its value using [TARGETDIR] plus the rest of the path to the database (i.e. [TARGETDIR]\Data\ourDatabase.mdb).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yep.&amp;nbsp; That's it! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Much appreciated!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2011 19:34:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/pgdb-include-into-deployment-package/m-p/514215#M13856</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2011-04-27T19:34:55Z</dc:date>
    </item>
  </channel>
</rss>

