Skip to content

Latest commit

 

History

History
94 lines (69 loc) · 4.84 KB

nf-appmgmt-uninstallapplication.md

File metadata and controls

94 lines (69 loc) · 4.84 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:appmgmt.UninstallApplication
UninstallApplication function (appmgmt.h)
The UninstallApplication function uninstalls a group policy application that handles setup and installation using Windows Installer .msi files.
UninstallApplication
UninstallApplication function [Group Policy]
appmgmt/UninstallApplication
policy.uninstallapplication
policy\uninstallapplication.htm
Policy
d45494e2-d86e-4d94-a158-4024eacf46a2
12/05/2018
UninstallApplication, UninstallApplication function [Group Policy], appmgmt/UninstallApplication, policy.uninstallapplication
appmgmt.h
Windows
Windows Vista
Windows Server 2008
Advapi32.lib
Advapi32.dll
Windows
19H1
UninstallApplication
appmgmt/UninstallApplication
c++
APIRef
kbSyntax
DllExport
Advapi32.dll
UninstallApplication

UninstallApplication function

-description

The UninstallApplication function uninstalls a group policy application that handles setup and installation using Windows Installer .msi files. The UninstallApplication function should only be called in the context of the user for whom the user group policy application has previously attempted an uninstall by calling the MsiConfigureProduct function. The InstallApplication function can install group policy applications.

Note  Failure to call UninstallApplication as part of the protocol for uninstalling a group policy-based application can cause the Resultant Set of Policy (RSoP) to indicate inaccurate information.
 

-parameters

-param ProductCode [in]

The Windows Installer product code of the product being uninstalled. The product code of the application should be provided in the form of a Windows Installer GUID as a string with braces.

-param dwStatus [in]

The status of the uninstall attempt. The dwStatus parameter is the Windows success code of the uninstall attempt returned by MsiConfigureProduct. The system can use this to ensure that the Resultant Set of Policy (RSoP) indicates whether the uninstall failed or succeeded.

-returns

If the function succeeds, the return value is ERROR_SUCCESS. Otherwise, the function returns one of the system error codes. For a complete list of error codes, see System Error Codes or the header file WinError.h.

-remarks

Remove a group policy application that uses .msi files by calling the Windows Installer function MsiConfigureProduct to uninstall the application. Then call UninstallApplication to inform the system that the application is no longer managed on the client by Group Policy. UninstallApplication should be called even if the uninstall fails because this enables the system to keep the Resultant Set of Policy (RSoP) accurate.

Remove applications installed using software installation settings (.zap files) by calling the uninstall function or command specific for the installation application. For information about using installation applications other than the Windows Installer see article 231747, "How to Publish non-MSI Programs with .zap Files," in the Microsoft Knowledge Base.

-see-also

Group Policy Functions

Group Policy Overview

InstallApplication

MsiConfigureProduct