If the SetPackageFileDirectory function
succeeds, it will return a non-zero value.
If the function fails, it will return a value of zero. To
get extended error information, call GetLastError.
The installation directory may include special strings
which are expanded when the package is applied. Any value enclosed in percent (%) symbols
is considered to be an environment variable and is replaced with the value of that
variable. For example, if the installation directory is the string "%TEMP%",
this would be replaced with the value of the TEMP environment variable, such as
"C:\TEMP".
Any value enclosed in brackets (either [] or <>) is
considered to be a folder macro, a value which represents a special folder on the local
system. The following values are defined:
COMMONFILES
The default directory in which shared program files are installed (i.e.: "C:\Program
Files\Common Files").
FOLDER_DESKTOP
The directory where files are stored that are located on the shell desktop.
FOLDER_STARTMENU
The directory where files are stored that are located in the current user's Start folder.
FOLDER_STARTUP
The directory where files are stored which are executed when the current user logs in to
the system.
INSTALLDIR
The default installation directory for this package as specified when the package is
applied.
INSTALLDISK
The disk on which the default installation directory is located. Note that this specifies
only the drive letter (i.e.: "C:") and does not include the directory.
PERSONALFILES
The default directory in which documents for the current user are created.
PROGRAMFILES
The default directory in which programs are installed (i.e.: "C:\Program
Files").
TEMPDIR
The directory in which temporary files are created. This directory is typically defined by
the TEMP or TMP environment variables.
TEMPDISK
The disk on which temporary files are created. Note that this specifies only the drive
letter (i.e.: "C:") and does not include the directory.
WINDIR
The directory in which the Windows operating system was installed (i.e.:
"C:\WINDOWS").
WINDISK
The disk on which the Windows operating system was installed. Note that this specifies
only the drive letter (i.e.: "C:") and does not include the directory.
WINSYSDIR
The directory in which the Windows libraries, drivers and other system files were
installed (i.e.: "C:\WINDOWS\SYSTEM" or "C:\WINNT\SYSTEM32").
WINSYSDIR16
The directory in which 16-bit Windows system files are
installed (i.e.: "C:\WINDOWS\SYSTEM" or "C:\WINNT\SYSTEM").
WINSYSDISK
The disk on which the Windows operating system system files were installed. Note that this
specifies only the drive letter (i.e.: "C:") and does not include the directory.
In addition to these predefined macros, the installation
directory may also use macros which reference a registry entry or a value in an
initialization file. As with folder macros, they are enclosed in brackets and have the
following formats:
[root:key] or [root:key,value]
This is used for registry values, where root may be one of
the following root key names: HKCR, HKCU, HKLM or HKCC. The key specifies the key under
the specified root, and the optional value specifies a value for that key. If no value is
provided then the default key value is used. An example would be
[HKLM:Software\Microsoft\Windows\CurrentVersion,MediaPath]
[filename:section,key]
This is used for initialization files, where filename is
the name of the file (if no path is provided, it will search for the file using the
standard Windows pathing rules; if no extension is specified, a default extension of
".ini" is used). The section and key values refer to the section and key name in
the file. An example would be [win.ini:msapps,msinfo]