Where Do Your Files Need To Be Installed?

Once you have your software organized, you need to determine exactly where each file needs to go on the user's system. Although Setup Factory does a lot of this work for you by maintaining directory structures when you add files to your project, there are still some files that may need to be directed to different locations on the user's system.

Here are some guidelines to help you determine where you should install your files on the user's system. Once again, there are four basic types of files that you may need to distribute: program files, configuration files, operating system components, and shared application resources.

Installing Program Files

Program files should be installed in a directory that the user chooses during the installation process. Throughout this manual and in the Setup Factory program, this directory is referred to as the application directory. The path to the application directory is represented by the built-in variable %AppDir%.

It's okay to install program files in sub-folders within the application directory-in fact, organizing your program files into sub-folders is a very good idea. Your files don't all have to be in the application directory itself; the folder that the user chooses can be used as a common application directory, with sub-folders for all of your program files.

If the users aren't given an opportunity to choose an installation folder, the path that you provided as the default value for %AppDir% will be used. You can provide a default path for the application directory on the Settings tab of the General Design dialog.

Installing Configuration Files

In the past, configuration files such as initialization or "INI" files were often installed in the Windows directory (%WinDir%). This is definitely not necessary or even beneficial in all cases. Unless your application shares a configuration file with other programs, it's best to install the file in the application directory along with your program files.

You should avoid installing any files in the Windows directory, or in any other folders where critical operating system files are stored, unless it is absolutely required by your application.

Installing Operating System Components

Operating system components, such as DLL or OCX files, are traditionally installed in the WINDOWS\SYSTEM directory (%SysDir%). If your application doesn't need to share these files with other applications, it's best to install them in your application directory (%AppDir%) instead.

Installing Shared Application Resources

Shared application resources, such as some ActiveX controls or DLL files, are generally installed in the WINDOWS\SYSTEM directory (%SysDir%). Keep in mind that many DLL and OCX files are COM servers, also known as "OLE components" and "ActiveX controls." As such, they will need to be registered with the operating system before they will be available for use by your application.

Setup Factory will automatically try to detect files that require registration when you add them to your project. You can also manually indicate files that you want Setup Factory to register by using the options on the Advanced tab of the File Properties dialog. And, you can use a Register File action to register a file manually at run time.

Keep in mind that some DLL and OCX files have dependency files themselves, and these dependency files need to be distributed and possibly also registered before the DLL or OCX files can be used. You should consult the documentation for your components to determine what dependencies they have.

NOTE

 

Many OCX and DLL controls ship with a dependency file. The dependency file typically has the same filename as the control with a .DEP extension, e.g., Control.ocx would have a dependency file named Control.dep. These dependency files can be opened and viewed with a text editor (such as Notepad) and can tell you a lot about what, if any, dependencies the control may have.

You can also use Setup Factory's built-in dependency scanner to identify any dependency files your components may have.

 

See Also: Getting Started, What System Changes Need To Be Made?