the best method I use is using features:
http://www.bjw.co.nz/developer/sharepoint-2010/102-adding-items-to-the-userwelcome-menu-in-sharepoint-2010
in the elements.xml
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction Id="myCustomAction" GroupId="PersonalActions" Location="Microsoft.SharePoint.StandardMenu" Sequence="1000" Title="Google" Description="Search away">
<UrlAction Url="http://www.google.com"/>
</CustomAction>
</Elements>
the location determins where you want to put the feature, so for you Microsoft.SharePoint.StandardMenu
this will display in the welcome menu
the Sequence determins the position of the item within the list(menu)
as for ID's they are the following:
Menu ID name || Menu || Menu text
ID_PersonalInformation, The Welcome menu, My Settings
ID_LoginAsDifferentUser, The Welcome menu, Sign in as Different User
ID_RequestAccess, The Welcome menu, Request Access
ID_Logout, The Welcome menu, Sign Out
EDIT
the id's were taken from (f12 developer).
what your trying to do is not easy! In sharepoint 2007 I made my own feature that calls a .cs file, in that file im creating items and hiding items!
create a feature with the elements.xml referencing the .cs file; debug with no code within the .cs to make sure that its being called. within the .cs you need to use MenuItemTemplate
so within the createchildcontrols to hide the controls use:
HideControls(new List<string>(new string[]{
"ID_PersonalInformation",
"ID_RequestAccess",
"ID_PersonalizePage"}));
and to add menu items do:
MenuItemTemplate schemeMenuItem = new MenuItemTemplate();
schemeMenuItem.Text = userScheme.SchemeName;
schemeMenuItem.ImageUrl = c_ImageUrl;
schemeMenuItem.ClientOnClickNavigateUrl = userScheme.SchemeHome;
schemeMenuItem.Sequence = i;
this.Controls.Add(schemeMenuItem);
for a seperator use:
MenuSeparatorTemplate displaySchemesMenuSeparator = new MenuSeparatorTemplate();
MenuItemTemplate displaySchemesMenuItem = new MenuItemTemplate();
displaySchemesMenuSeparator.Sequence = 1000;
this.Controls.Add(displaySchemesMenuSeparator);
the last part is calling the method to hide the controls:
/// <summary>
/// hide controls
/// </summary>
/// <param name="controlsToHide"></param>
private void HideControls(List<string> controlsToHide)
{
foreach (string controlToHide in controlsToHide)
{
Control control = this.FindControl(controlToHide);
if (control != null)
{
control.Visible = false;
}
}
}
with the method above you can change it slightly to ammend the control name to your liking :)
this is what i have made myself and works perfectly all the time :)
hope it helps :)