[This is preliminary documentation and subject to change.]
The MsiSetTargetPath function sets the full target path for a folder in the Directory table.
UINT MsiSetTargetPath(
MSIHANDLE hInstall, // installer handle
LPCTSTR szFolder, // folder identifier
LPCTSTR szFolderPath // full path for folder, ending in
// directory separator
);
The MsiSetTargetPath function changes the path specification for the target directory named in the in-memory Directory table. Also, the path specifications of all other path objects in the table that are either subordinate or equivalent to the changed path are updated to reflect the change. The properties for each affected path are also updated.
If an error occurs in this function, all updated paths and properties revert to their previous values. Therefore, it is safe to treat errors returned by this function as non-fatal.
Windows NT: Requires version 4.0 or later. Available as a redistributable for Windows NT 4.0.
Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Windows CE: Unsupported.
Header: Declared in msiquery.h.
Import Library: Use msi.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
Database Access Reference, Installer Location Functions