# Working shortcuts being treated as 'Broken Shortcuts' and getting deleted.

### Question

• Windows 7 has a built in program that runs automatically at 1.00 AM every week.
It is a maintanance program that among other tasks, automatically delets any broken Desktop Shortcuts.

In my case it is deleting perfectly good and correctly linked shortcuts to viable programs and apps.
6 get deleted and 15 remain. So my question. Does anyone know how I can create a shortcut that will NOT get deleted.
Something in the shortcut is triggering this.

Monday, February 15, 2010 3:57 PM

### All replies

• Could it be possible that those shortcuts were pointing to a network location or removable drive, and the target path was inaccessible at that time?
Ramesh Srinivasan, Microsoft MVP [Windows Desktop Experience]
Monday, February 15, 2010 4:07 PM
• No.........The shortcuts that got deleted were to ,Computer,Device Manager,Uninstall, and 'Sounds'. Plus one link to a .doc
Also one was to a removable Thumbdrive' that was not plugged in at the time.

So I can understand if that one was deleted as it was 'Broken' but the others were very alive and
should IMHO not have been deleted.
Monday, February 15, 2010 4:29 PM
• Can some kind MVP or MS employee please let me know how I can simply send in this as a possible bug?

Wednesday, February 17, 2010 1:03 AM
• I'd like to try to reproduce your issue.  Can you tell me where these shortcuts were (desktop, folder) and which ones were deleted vs which remained?

If this was helpful, please vote by clicking the green triangle. If it solves the issue, click Propose as Answer. Thanks!
Wednesday, February 17, 2010 3:04 AM
• Win 7 Home Premium edition.
Virgin install.
Aero on.
Solid colour desktop background.

The folders/shortcuts on the desktop that never get deleted are Recycle bin,Downloads,Users***,My Documents,
Music,Videos,Windows Explorer,Folder options,Control Panel.

The shortcuts that get deleted every time are Computer,Device Manager,Uninstall, Sounds.
Also 2 broken shortcut links. One to my DVD drive and another to a USB Thumbdrive.

The program that does this is is in the 'Task Scheduler' under the heading 'Diagnosis' and called simply 'Scheduled'.

It is run at 1.00am every Sunday morning. It is designed to remove broken shortcut links from the desktop. IMHO it should
NOT delete working, active shortcuts.

The temp fix that works is to disable the task. I have talked to users that have the same sort of problem, most on Networks.

Wednesday, February 17, 2010 4:00 PM
• Just to add a bit of clarity:

The System Maintenance tool not only deletes broken shortcuts, but also removes "unused shortcuts" (that're still valid)
Ramesh Srinivasan, Microsoft MVP [Windows Desktop Experience]
Wednesday, February 17, 2010 5:45 PM
• Ramesh,
I can not find any documentation that says ....removes "unused shortcuts"

Anyway in my case the shortcuts being removed are active and used every day.

Wednesday, February 17, 2010 8:30 PM
• Ramesh,
I can not find any documentation that says ....removes "unused shortcuts"

See the last screenshot in this post:

Which Files Does the Windows 7 System Maintenance Troubleshooter Delete? - The Winhelponline Blog:
http://www.winhelponline.com/blog/which-files-does-w7-system-maintenance-delete/

>> Anyway in my case the shortcuts being removed are active and used every day.

I don't have a clue. The troubleshooter is supposed to remove shortcuts that haven't been used in the last 3 months.

Until MS fixes this problem, I'd keep this feature disabled.
Ramesh Srinivasan, Microsoft MVP [Windows Desktop Experience]
Thursday, February 18, 2010 3:41 AM
• I've been trying to reproduce this issue but I can't get it to happen.  Have you perhaps set any special permission security settings on your desktop folder or user folders?  I doubt that could cause it though, but I think it's worth asking.
If this was helpful, please vote by clicking the green triangle. If it solves the issue, click Propose as Answer. Thanks!
Thursday, February 18, 2010 3:44 AM
• The only odd thing I can find is a 'Padlock" on my user account. C:\Users\****
However when opened all subs work and there are no more padlocks.
The desktop folder has default permissions ( SYSTEM)

I have looked carefully at the shortcut properties of shortcuts that are deleted and the ones not touched. As far as I can see they are identical. Now there is obviously an explanation but at this point in time, I have not been successful in finding out what it is.

EDIT: Added later. I have just noted that the shortuts that get deleted all have 5 tabs in 'Properties'
and the shortcuts not deleted have 6 tabs, the extra one being 'compatability'
Thursday, February 18, 2010 3:48 PM
• This is some known issue that it appears NOBODY will address or fix.  This maintenance program deletes any drive, INCLUDING my CD drives that it feels re not needed. Plus any shortcuts to some control options.

Simply, there should be an EASY way to adjust the maintenance program so it works but does NOT delete "broken" shortcuts.  How hard is this?

I understand in Vista everything was extremely Keep It Simple Stupid.. but I am hoping someone in Redmond learned from it being TOO simple (like with the backup program) and will at least put away to adjust the maintenace program for those users who need to.

This is my one big caveat with Win 7.. Please fix.!
Monday, March 08, 2010 6:22 AM
• Simply, there should be an EASY way to adjust the maintenance program so it works but does NOT delete "broken" shortcuts.  How hard is this?

I understand in Vista everything was extremely Keep It Simple Stupid.. but I am hoping someone in Redmond learned from it being TOO simple (like with the backup program) and will at least put away to adjust the maintenace program for those users who need to.

Agreed! The maintenance program seems to delete Games Explorer shortcuts, and shortcuts to any shell folder in general (as observed by Daniel Martin).
Ramesh Srinivasan, Microsoft MVP [Windows Desktop Experience]
Monday, March 08, 2010 9:06 AM
• Win 7 Home Premium edition.
Virgin install.
Aero on.
Solid colour desktop background.

The folders/shortcuts on the desktop that never get deleted are Recycle bin,Downloads,Users***,My Documents,
Music,Videos,Windows Explorer,Folder options,Control Panel.

The shortcuts that get deleted every time are Computer,Device Manager,Uninstall, Sounds.
Also 2 broken shortcut links. One to my DVD drive and another to a USB Thumbdrive.

The program that does this is is in the 'Task Scheduler' under the heading 'Diagnosis' and called simply 'Scheduled'.

It is run at 1.00am every Sunday morning. It is designed to remove broken shortcut links from the desktop. IMHO it should
NOT delete working, active shortcuts.

The temp fix that works is to disable the task. I have talked to users that have the same sort of problem, most on Networks.

It's a limitation of the WMI class that the System Maintenance tool uses to determine if a shortcut is broken or not. You can see it for yourself running this simple WMI script:

strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery _
("Select * From Win32_ShortcutFile Where Name = 'c:\\users\\UserName\\desktop\\Shortcut.lnk'")

For Each objItem in colItems
WScript.Echo objItem.Target
Next

If you change 'c:\\users\\UserName\\desktop\\Shortcut.lnk' with the path to a shell folder shortcut placed on your desktop (for example, a Control Panel shortcut) and run the script, you'll see that a dialog box appears with the text "null". This means that the System Maintenance tool will determine that this shortcut is not pointing to a valid file and it will be eventually deleted if you happen to have more than 4 broken shortcuts on your desktop. Windows Installer shortcuts are not affected by this issue.

Microsoft MVP Windows Desktop Experience
Wednesday, March 10, 2010 12:45 PM
• Thank you for the explanation. Would be most grateful if you could pass this 'bug' on to the appropriate dept.
Thank you

Thursday, March 11, 2010 4:22 PM
• Could someone please acknowledge that this problem has been reported to the proper people within Microsoft.

There are other threads on this same problem, and someone in one finally pointed to this thread.  It would be downright silly if the root cause never finds its way to the proper people.

Regarding the original poster's question:

Does anyone know how I can create a shortcut that will NOT get deleted.
Something in the shortcut is triggering this.

There's a bit of a roundabout way, and I'm pretty sure you'll end up with a shortcut that works and not have it deleted by the System Maintenance tool...  I've just tested that the shortcut actually works.

Move the "broken" shortcuts to a folder somewhere safe, e.g., a subfolder in your My Documents area.

Now create shortcuts on your desktop to those shortcuts, each of which has a target like this:

explorer.exe "path\to\shortcut\ShortCutName.lnk"

-Noel

Tuesday, March 23, 2010 12:02 PM
• Could someone please acknowledge that this problem has been reported to the proper people within Microsoft.

Yes, I reported the problem a few days ago to MSFT engineers to review internally.
Microsoft MVP Windows Desktop Experience
Tuesday, March 23, 2010 10:52 PM
• Has a patch for this been released?
Thursday, November 25, 2010 9:33 AM
• take ownership of this file:

C:\ Windows\ Diagnostics\ Scheduled\ Maintenance\ TS_BrokenShortcuts.ps1

and replace the 4 in line 44 (-gt 4) with a higher value.

André

"A programmer is just a tool which converts caffeine into code" CLIP- Stellvertreter http://www.winvistaside.de/
• Proposed as answer by Thursday, November 25, 2010 1:51 PM
Thursday, November 25, 2010 1:51 PM
• Thanks!

It is a workaround. I wonder why it is taking so long for a fix

Friday, November 26, 2010 11:48 AM
• Another way to restore the shortcuts is to go to the C:\Users\UserName\ foler and right click on the desktop icon.

You will see a tab that says 'Previous versions'. Click on the tab and wait for it to populate. Then select a date and choose Restore.

Friday, September 09, 2011 5:04 PM
• It seems they have a fix to turn off the "broken" shortcut removal: http://support.microsoft.com/kb/978980/en-us

I'm just baffled by their Method 1. That seems like a complete cop-out to me. Also, is their Method 2 the only way to do this? All or nothing on maintenance? It seems like there is a much more targeted way to stop just the routine of deleting shortcuts and not have to eliminate all maintenance.

Tuesday, November 29, 2011 4:50 AM
• LOL, both methods seem pretty lame...  "Doc, it hurts when I do this"...  "Well, then, DON'T DO THAT!"  :)

And "If you *must* have broken shortcuts on your desktop..."  What kind of Microsoft people can't imagine a shortcut being "broken" on purpose (and thus not "broken" at all)?

But more fundamentally:

Why does anyone at Microsoft think it's properly in their purview to arbitrarily delete things from any parts of our computers?

-Noel

Tuesday, November 29, 2011 9:18 PM
• I  also have had this problem. Obviously Microsoft have programmed this Maintenance Service wrongly. I have lost working shortcuts on several occasions and find it very annoying. I now keep a folder on my desktop with copies of the "lost shortcuts" for quick replacement when needed.

Tony

Saturday, December 03, 2011 10:17 PM
• I tried this and changed the 4 to 6 in line 44 but it did not work. The problem still occurs.

So I just keep copies of the affected shortcuts in a folder in My Documents and replace them when needed.

Monday, December 19, 2011 12:29 PM
• Why leave it at 6?  Try changing it to a much larger number than even the total number of icons you have on the desktop.  If that doesn't fix it, it may not be your background maintenance task doing the deed.

-Noel

Monday, December 19, 2011 1:09 PM
• MS released a hotfix to disable the deletion of broken links:

## Broken shortcuts are deleted from the desktop in Windows 7

"A programmer is just a tool which converts caffeine into code"

• Proposed as answer by Wednesday, January 11, 2012 6:24 PM
Wednesday, January 11, 2012 6:24 PM
• This hotfix is a crap. Not working, the problem still live.
Friday, November 23, 2012 11:08 AM
• Amen.....Microsoft should not take it upon themselves to determine what is broken and to only allow 4 shortcuts

Wednesday, February 26, 2014 6:27 PM
• I took my Microsoft car into maintenance at the Microsoft car dealer.  They removed all the knobs from my center console because I wasn't using them at the moment.  Also the Turn signal indicator.  Having used Windows 7 for the better part of a decade, this all seemed perfectly normal and rational.
Wednesday, December 20, 2017 3:10 PM