In order to specify a different directory for the installation of the XFile DLLs, you cannot use the SAXFile.cab file provided with XFile. Instead, you must create and digitally sign your own CAB file. There are other benefits to building your own CAB file, specifically:
For more details, refer to the documentation page on creating and signing a CAB file for XFile.
- You can select which XFile DLLs to include in the CAB file
- You can use the XFile DLLs which do not display a confirmation message when performing a non-visual transfer
- Your company, rather than SoftArtisans, appears in the digital signature and is displayed in the browser's security prompt
Each CAB file typically contains an INF file, which is a text file describing how to install the content of the CAB file. For SAXFile.cab, the INF file is saxfile.inf. You should modify the existing saxfile.inf file for use with your own CAB file.
An INF file identifies a directory using a numeric value known as a directory identifier (dirid). Each dirid maps to a specific directory on the file system. Applications have access to a large number of pre-set dirids.
In the saxfile.inf file, the default dirid is 11. For example, the saxfile.inf file contains the following sections:
CopyDlls = 11, SoftArtisans\SAXFile
The string "%[dirid]%" expands to a string representation of the directory corresponding to the specified dirid. A dirid of 11 happens to map to the \Windows\System32 directory on NT-based systems. Because of the setting in the [Destination Dirs] section, the XFile DLLs will be installed into the \Windows\System32\SoftArtisans\SAXFile directory.
In order to specify a different directory to install the XFile DLLs, you must replace all instances of the existing dirid, 11, with the desired dirid. The dirid range of 16384 to 32767 is reserved for special shell folders. This range is sufficient to fulfill most needs. For your convenience, a list of the dirids in this range and the corresponding directories is included as an attachment.
For example, if you want the XFile DLLs to be installed into the \Document and Settings\[username]\Application Data directory, you should use the dirid of 16410.
It is also possible to create a user-defined dirid so that an arbitrary directory can be specified in the INF file. However, this approach is beyond the scope of this article.