Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 1290
2 and higher
HOW-TO: Specify the installation directory for the files contained in the XFile cabinet file (SAXFile.cab)

The XFile DLLs are most commonly distributed to clients as a Cabinet (CAB) file. Before XFile can be used, the browser downloads the CAB file, extracts its content to a pre-set directory, then registers the DLLs. The XFile installation includes a CAB file, SAXFile.cab, which is digitally signed by SoftArtisans. If you use SAXFile.cab, the XFile DLLs will always be extracted to the directory \Windows\System32.

In some cases, it is not desirable or possible to extract files to the \Windows\System32 directory. For instance, on some environments, administrative policy restricts the ability to write to a system directory.

This article discusses how to specify a different directory for the installation of the XFile DLLs contained in a CAB file.


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:

  • 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
For more details, refer to the documentation page on creating and signing a CAB file for XFile.

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:

[Destination Dirs] 
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.

Related Links

Created : 4/23/2012 4:19:38 PM (last modified : 4/23/2012 4:19:38 PM)
Rate this article!

Copyright 2010 © SoftArtisans, Inc. All Rights Reserved.

Site Map     |     Privacy Policy     |     Contact Us