Jump to content

Remove Item from Start Menu


Recommended Posts

I am trying to right click an item on the start menu and select "Remove from list" programmatically via autoit to remove a particular item. I have a script that does the following:

- sends ctrl + esc (to open the start menu)

- sends ArrowDown 3 times (to select the item)

and I'm stuck here! :rolleyes:

When I try to send a right mouse click the start menu closes. I'm guessing this is because I need to move the mouse to the currently selected control BUT I can't find a way to 1) determine the current highlighted control and 2) tell the mouse to move there.

Any help would be appreciated!!!

Link to comment
Share on other sites

RegWrite("HKEY_CLASSES_ROOT\Applications\" & @ScriptName, "NoStartPage","REG_SZ","")

Will tell windows to never put @ScriptName it in the frequently used list.

(a logoff & logon may be needed if its already there)

Edited by Rick

Who needs puzzles when we have AutoIt!!

Link to comment
Share on other sites

I am trying to right click an item on the start menu and select "Remove from list" programmatically via autoit to remove a particular item. I have a script that does the following:

- sends ctrl + esc (to open the start menu)

- sends ArrowDown 3 times (to select the item)

and I'm stuck here! :rolleyes:

When I try to send a right mouse click the start menu closes. I'm guessing this is because I need to move the mouse to the currently selected control BUT I can't find a way to 1) determine the current highlighted control and 2) tell the mouse to move there.

Any help would be appreciated!!!

To do it this way, you'd need to use PaulIAs Auto3Lib UDFs (taskbar and menu). But there's an easier way (if you're running windows and know the name of the item you want to remove).

Start menu items are shortcut files stored under @StartMenuDir and/or @StartMenuCommonDir. Search for/delete the shortcut file (will be called "the menu item name.lnk"), and the item will be deleted from the start menu - without the user ever seeing the start menu being opened.

Link to comment
Share on other sites

To do it this way, you'd need to use PaulIAs Auto3Lib UDFs (taskbar and menu). But there's an easier way (if you're running windows and know the name of the item you want to remove).

Start menu items are shortcut files stored under @StartMenuDir and/or @StartMenuCommonDir. Search for/delete the shortcut file (will be called "the menu item name.lnk"), and the item will be deleted from the start menu - without the user ever seeing the start menu being opened.

Thanks for the Auto3Lib... I think that will help me. The "pinned" items do not show as a .lnk anywhere and I haven't been able to find them in the registry so as far as I can tell AutoIt (or something like it) is my only option for removing these items!!! :rolleyes:

Link to comment
Share on other sites

Thanks for the Auto3Lib... I think that will help me. The "pinned" items do not show as a .lnk anywhere and I haven't been able to find them in the registry so as far as I can tell AutoIt (or something like it) is my only option for removing these items!!! :rolleyes:

For pinning/unpinning items on the Start menu, take a look at Hey, Scripting Guy! Can I pin a file to the Start Menu by using a script?. After which you'll probably want to know how to create and manipulate objects in AutoIt - gafrost's excellent post on using the scripting.dictionary object should provide what you need.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...