The MsiSourceListForceResolution function forces the installer to search the source list for a valid product source the next time a source is required. For example, when the installer performs an installation or reinstallation, or when it requires the path for a component that is set to run from source.
UINT MsiSourceListForceResolutionA( LPCSTR szProduct, LPCSTR szUserName, DWORD dwReserved );
The ProductCode of the product to modify.
The user name for a per-user installation. The user name should always be in the format of DOMAIN\USERNAME (or MACHINENAME\USERNAME for a local user).
An empty string or NULL for a per-machine installation.
Reserved for future use. This value must be set to 0.
The MsiSourceListForceResolution function returns the following values.
||The caller does not have sufficient access to force resolution for the product.|
||The configuration data is corrupt.|
||The specified user is not a valid user.|
||The function could not complete.|
||The installation service could not be accessed.|
||An invalid parameter was passed to the function.|
||The function succeeded.|
||The specified product is unknown.|
An administrator can modify per-machine installations, their own per-user non-managed installations, and the per-user managed installations for any user. A non-administrator can only modify per-machine installations and their own (managed or non-managed) per-user installations.
If the user name is an empty string or NULL, the function operates on the per-machine installation of the product. In this case, if the product is installed as per-user only, the function returns ERROR_UNKNOWN_PRODUCT.
If the user name is not an empty string or NULL, it specifies the name of the user whose product installation is modified. If the user name is the current user name, the function first attempts to modify a non-managed installation of the product. If no non-managed installation of the product can be found, the function then tries to modify a managed per-user installation of the product. If no managed or unmanaged per-user installations of the product can be found, the function returns ERROR_UNKNOWN_PRODUCT, even if the product is installed per-machine.
This function can not modify a non-managed installation for any user besides the current user. If the user name is not an empty string or NULL, but is not the current user, the function only checks for a managed per-user installation of the product for the specified user. If the product is not installed as managed per-user for the specified user, the function returns ERROR_UNKNOWN_PRODUCT, even if the product is installed per-machine.
|Minimum supported client||Windows Installer 5.0 on Windows Server 2012, Windows 8, Windows Server 2008 R2 or Windows 7. Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Installer on Windows Server 2003 or Windows XP. See the Windows Installer Run-Time Requirements for information about the minimum Windows service pack that is required by a Windows Installer version.|