This project is read-only.


Reads the provided XML node (following the installer schema) for information needed to remove an existing custom action menu item from the SCCM console.

Overview of the method
Removes the XML assigned to one or more ConfigMgr console nodes that currently display a right-click custom action.

ConfigMgr looks in the AdminUI\XmlStorage\Extensions\Actions directory for a folder named as the GUID of the node the user has just clicked on, and if the folder is found, looks for XML files in that folder for instructions on building a right-click menu for that node. If XML file(s) exist, they contain information that tells ConfigMgr what type of action it will be, and if necessary, the location of the additional XML file that loads a dialog or other action. To remove an existing right-click action, you just remove the XML and restart the SCCM console.

Program flow:
This code follows this general path:
  • Case 1: The console node does not currently have an XML file associated with this custom action in the GUID-based directory under "Actions"
    • Nothing is done
  • Case 2: The XML file exists for this node
    • The installer checks to see if the XML to be removed already exists in the current XML file
      • If the XML to be added does not exist, nothing is done
      • If the XML to be added already exists, it is removed from the XML. If this was the last item in the XML file, the XML file is deleted as well.

Note: The code checks not only for menu items, but for menu groups as well. So if the item to be removed is a menu item inside a group, the code checks for the existence of the group first, and if it is there, checks for the existence of the individual item. If the group exists but the item does not, nothing is done.

Related Topics

Last edited Jan 29, 2009 at 12:15 AM by rhearn, version 2


No comments yet.