Integrating Truxton

From truxwiki.com
Jump to navigation Jump to search

Here's what you need to know to add Truxton to your system.

Scenario

You have a program that allows user's to navigate a collection of files. You want to give them the ability to send these files to Truxton.

Finding Truxton

The first step in the process is to determine if your user has Truxton installed on their system. Truxton installs several packages. Instead of searching for them, the easiest way to tell if a user has Truxton is to query the registry. If Truxton is installed, a key named HKEY_LOCAL_MACHINE\SOFTWARE\Truxton will be created. The InstallDirectory value will give you that path to the root of Truxton's files.

Spawning Truxton

Get the path to Truxton's loader by grabbing the value of the InstallDirectory above and appending Loader\Load.exe to construct the full path to the loader. In almost all instances, it will be C:\Program Files\Truxton\Loader\Load.exe but there's always that one customer who installs elsewhere...

After you have the path to the loader, test to see if the Load.exe file exists. This will tell you if the user has a client-only install or a full installation of Truxton. If the loader exists, you can construct a command line, add command line options followed by the path to the file or folder you want Truxton to process. Spawning the loader with your command line will send the files to Truxton.

Sample

Let's say the user has selected a folder to have Truxton process. After determining that they have a loader, you would spawn it with the required arguments:

"C:\Program Files\Truxton\Loader\Load.exe" "X:\Incoming\Field Data\Site A\20220930-77904-cp-404.7\usr\home\pictures\bobby"

If you wanted to add something to let the user know it came from your program, you can add your own media name and description.

"C:\Program Files\Truxton\Loader\Load.exe" -mn "CP Case 77904 'bobby' folder" -md "Sent from MyFileNavigatorProgram" "X:\Incoming\Field Data\Site A\20220930-77904-cp-404.7\usr\home\pictures\bobby"