Community
Showing results for 
Search instead for 
Do you mean 
Reply

Location of Default Database Folder?

Nickel Super Contributor
Posts: 492
Country: United States

Location of Default Database Folder?

We are developing an installer to put a database on the end user's workstation.

 

Is there a way to direct the installer to the default location of the database based on the location in the Preferences for that workstation?

 

For ACT! 6, this info was store in the registry but we cannot find it in the registry for ACT! SQL.

 

We do not want to use the Preference file(s) since the information in these files changes based on version.

 

Thanks,

Scott A

Bronze Super Contributor
Posts: 1,231
Country: USA

Re: Location of Default Database Folder?

 

Scott

 

Do yuo mean  the folder "C:\Users\UERNAME\Documents\ACT\ACT for Windows 11\Databases"

 

In VB or C# you could use:

Environment.GetFolderPath(Environment.SpecialFolder.Personal)

 

What installer are you using? I use InstalShield and you can select <CommonAppDataFolder> from its UI.

Or using a VB script in Install Shield you could also read the registry keys like this:

 

Dim WshShell
Set WshShell = CreateObject("WScript.Shell")

Session.TargetPath("INSTALLDIR") =WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\ACT\Install\InstallPath")+"\Plugins"

 

Hope this helps

-- Jim Durkin

 

 

 

 

Nickel Super Contributor
Posts: 492
Country: United States

Re: Location of Default Database Folder?

Jim,

 

Thanks for your reply.

 

The default database folder is noted in the Tools>Preferences> General tab.  It does not have to be in the personal folder though in many cases it is.

 

The problem is that each version of ACT! creates its own database folder, i.e. Docs ...\ACT\Act for Windows [version]\Database. 

 

To complicate matters more, a user who upgrades from a previous version, will continue to have the default database location as it was originally set. i.e. upgrading to v11 from v9...installing ACT! 11 does not change the default location from ACT! 9 and the database preference is still located in the Act for Windows 9\Database folder.

 

I have no problem getting the environment variable and we get the plugins the same way you do.  The problem is the defaulted database folder.

 

It appears we will have to open ACT! during the install to find the default location.

 

What a pain.

 

 

Bronze Super Contributor
Posts: 1,231
Country: USA

Re: Location of Default Database Folder?

Have you looked at reading the USpreferences206.xml file?    "C:\Users\jim durkin\AppData\Roaming\ACT\ACT for Windows 11\Preferences"

 

In there is the default database location:

<FILETYPELOCATIONS><![CDATA[Documents|Layouts|Internet Links|Queries|Reports|Templates|Dictionaries]]>
      <DATABASE><![CDATA[Databases]]>
            <LOCATION><![CDATA[C:\Users\jim durkin\Documents\ACT\ACT For Windows 11\Databases]]></LOCATION>
      </DATABASE>

</FILETYPELOCATIONS> 

 

Hope this helps

-- Jim Durkin

Nickel Super Contributor
Posts: 492
Country: United States

Re: Location of Default Database Folder?

Jim,

 

As my original post had mentioned, this was the method we originally used.  We created a script to parse the database path out of the XML file.

 

We have found that this is now problematic with ACT! 10 and 11.  Something changed in the XML and we were looking for a better method to finding the defaulted database location.

 

It looks like we are going to have to fix our script or have different script for ACT! different versions of ACT!

 

Thanks for replying.  You're great!