Windows Dev Center

IAppPublisher interface

Exposes methods for publishing applications through Add/Remove Programs in Control Panel. This is the principal interface implemented for this purpose.

Members

The IAppPublisher interface inherits from the IUnknown interface. IAppPublisher also has these types of members:

Methods

The IAppPublisher interface has these methods.

MethodDescription
EnumApps

Creates an enumerator for enumerating all applications published by an application publisher for a given category.

GetCategories

Retrieves a structure listing the categories provided by an application publisher.

GetNumberOfApps

Obsolete. Clients of Add/Remove Programs Control Panel Application can return E_NOTIMPL.

GetNumberOfCategories

Obsolete. Clients of the Add/Remove Programs Control Panel Application may return E_NOTIMPL.

 

Remarks

Add/Remove Programs in Control Panel creates a registered publisher object and requests its IAppPublisher interface. You can create published application objects using the application enumerator, which you create using IAppPublisher.

Add/Remove Programs gathers a list of published applications from publishers and then uses a publisher to display these applications with Microsoft Active Directory. When the user clicks Add New Programs in Add/Remove Programs, a list of published applications appears.

You can publish applications in Add/Remove Programs using the following Component Object Model (COM) interfaces.

When you implement these interfaces, you must register your COM object in the registry. To register your publisher, add your object's class identifier (CLSID) under the following registry key.

HKEY_LOCAL_MACHINE
   Software
      Microsoft
         Windows
            CurrentVersion
               AppManagement
                  Publishers

For example, if your publisher is named "My Publisher", you create a new key under "Publishers" named "My Publisher" with its default REG_SZ value as the publisher's CLSID:

HKEY_LOCAL_MACHINE
   Software
      Microsoft
         Windows
            CurrentVersion
               AppManagement
                  Publishers
                     My Publisher
                        (Default) = {4D05CD3D-FFED-46bb-B9F1-321C26BE6362}

You can also create the typical COM server registration entries as follows:

HKEY_CLASSES_ROOT
   CLSID
      {469EE8CE-1B86-4524-9042-AAA44FD9C8F2}
         (Default) = Sample Applications Publisher
         InProcServer32
            (Default) = pubdemo.dll
            ThreadingModel = Apartment

With the publisher registered in this way, Add/Remove Programs creates an instance of your object by calling CoCreateInstance for your object and requesting the approprite IAppPublisher interface when the Add New Programs view is populated. Using IAppPublisher, Add/Remove Programs retrieves the application enumerator (IEnumPublishedApps) and information that describes the published applications. Your implementation of IPublishedApp is responsible for installing the associated application in its IPublishedApp::Install method. Add/Remove Programs calls this method when the user clicks the Add or the Add Later button in the user interface.

Requirements

Minimum supported client

Windows XP, Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Shappmgr.h

IDL

Shappmgr.idl

See also

IEnumPublishedApps
IPublishedApp

 

 

Community Additions

ADD
Show:
© 2015 Microsoft