Platform SDK: Exchange Server

Removing a Server Application

The following procedure lists these steps to remove a server application:

To remove a server application

  1. Present a dialog box that lets the administrator select an application to remove. The ShowChooseServiceDlg function displays this type of dialog box.
  2. Determine whether the application's service is running by calling the FServiceRunning function. If it is running, attempt to stop the service.
  3. Remove the directory object. Call the HrRemoveGateway function to remove a gateway object and the HrRemoveMailboxAgent function to remove a mailbox agent from a given site. Both functions are defined in EXCHINST.C.
  4. Remove performance monitoring for the service by calling the HrRemoveServicePerfMon function. If the lpfUnloadCounters parameter returned from this function call is TRUE, continue with step 5. If it is FALSE, multiple instances of the application are installed. In this case, perform steps 7 and 8, and then begin again at step 1.
  5. Call the FUnloadCounters function to unload the counters used in performance monitoring.
  6. Remove the server application's keys from the Windows NT Registry. Do this by calling the HrRemoveRegistry function.
  7. Remove the service from service control manager of Windows NT. Do this by calling the HrRemoveService function.
  8. Delete the files belonging to the service using the EDKDeleteNode function.

The DoRemove function removes components from the local computer. Server components in the Microsoft Exchange Server directory must be removed in a separate step using directory access functions. For example, address types and Administrator extensions are not removed because they may be needed by other applications.