Unpin from start menu when source file no longer exists RRS feed

  • Question

  • Hi,

    I am trying to automate a way to remove a pinned item from the start menu when the source file no longer exists.

    I have found heaps of information about .lnk files or using the file verbs but as pinned icons don't work the same as simply deleting a .lnk file and the file verbs wont work as the source file no longer exists I am stuck for ideas.



    Zac Avramides

    Monday, January 11, 2016 11:31 PM

All replies

  • You would need to use the Task Scheduler to invoke a script once each day that performs these tasks:

    1. Examine each pinned item to check if the source file still exists.
    2. Delete the pinned item if it does not.

    This is not a trivial task!

    Tuesday, January 12, 2016 7:10 AM
  • Thanks Frederik,

    Calling a script is not where I had run into a wall. The steps you have listed is what I am trying to do, the thing is I have not been able to find any examples on how to do this. If you have any links you can direct me to that would be great.


    Zac Avramides

    Tuesday, January 12, 2016 8:13 AM
  • Sorry, I have no links. I would have to develop this from scratch.
    Tuesday, January 12, 2016 10:22 AM
  • Hi,

    It is not easy, I don’t think simple script/command can help you getting this goal. So you need compiled language such as VB script, since we are not familiar with this distinction, you might get more effective suggestion from MSDN forum. Your understanding is highly appreciated.

    Official scripting Guys forum


    Visual Studio Languages


    Some threads about this in other forum


    Please note: Since the websites are not hosted by Microsoft, the links may change without notice. Microsoft does not guarantee the accuracy of this information.   


    D. Wu

    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    • Proposed as answer by Michael_LS Monday, January 25, 2016 10:06 AM
    • Unproposed as answer by ZAC85 Monday, January 25, 2016 10:12 AM
    Wednesday, January 13, 2016 1:12 AM
  • It is not easy, I don’t think simple script/command can help you getting this goal. So you need compiled language such as VB script.
    VBScript is an interpreted, not a compiled language. And yes, it could do the job.
    Wednesday, January 13, 2016 6:53 AM