IAppVClient::PublishPackage method

Publishes, or modifies the publishing configuration of, an existing package.

[This API is deprecated and may unsupported or unavailable in future versions of Windows.]

Syntax

HRESULT PublishPackage(
    [in] BSTR packageGUID, 
    [in] BSTR packageVersionGUID,
    [in] BSTR userSID, 
    [in] VARIANT_BOOL global, 
    [in] BSTR policy, 
    [in] VARIANT policyTime,
    [out, retval] ULONGLONG* appvret);


Parameters

packageGUID [in]

Required. The ID of the package to publish.

packageVersionGUID [in]

Required. The package version ID.

userSID [in]

Optional. The SID of the user to publish to. If NULL or empty will publish to current user.

global [in]

If VARIANT_TRUE, publishes the package to the shared profile (“All Users" or “Public”) so that it is visible to and usable by everyone

policy [in]

The path to a new UserConfiguration document file.

Accepts a special, case-insensitive value of "<USERCONFIG>" to indicate that the App-V-defined default UserConfiguration policy for the package should be applied.

Accepts a special, case-insensitive value of "<DEPLOYMENTCONFIG>" to indicate that the UserConfiguration in the current DeploymentConfiguration for the package should apply.

This value is optional (NULL or empty string) only if the publishing request is global, in which case this value must NOT be provided, or if the package version is already published for the user, in which case the policy selected is based on the current state of the user's policy:

  • If the user has a UserConfiguration policy, it remains in effect.
  • If the user published with the DeploymentConfiguration policy, this publishing attempt will update to the latest DeploymentConfiguration.

This parameter is required when newly publishing a package version to a user.

policyTime [in]

A VT_DATE representing the UDT last modification time of the given policy. If not provided, “now” (UDT) will be used. If policy is not provided, policyTime is ignored.

appvret [out]

An App-V return code.

Return value

An HRESULT.

Remarks

This is not a privileged operation, unless the request is global, in which case it requires administrative rights or membership in the appropriate security group.

Requirements

Requirement Value
Header N/A

See also