21
Apr/10
2

Windows 7: Desktop Icons suddenly disappear

I love Windows 7! It’s robust, fast, looks great and command lines / power shell / wmi / scripting platforms are just awesome.
In other words: It kicks the hell out of a Banana (or some other proprietary fruit I can’t remember).
However, there still are some little things that cause headache: Why would anyone do this!?
This is what I thought after my desktop shortcuts disappeared for the 3rd time after a while being unused.

Turned out there is a maintenance Task that runs as a Scheduled task under Windows 7. It executes various powershell scripts including this:

%windir%\diagnostics\scheduled\Maintenance\
RS_RemoveUnusedDesktopIcons.ps1

If you comment out line 57, you should be good to go and your Desktop Icons won’t disappear anymore:

Replace “Remove-FileList $deleteList”
with “# Remove-FileList $deleteList”

Note: To edit the file you must first take ownership and grant you permissions to it!

Hope that helps…

Print This Post
(2 votes, average: 5.00 out of 5)
Loading ... Loading ...
470 views
Filed under: Windows 7
Comments (2) Trackbacks (0)
  1. Thanks for this.
    I figured out it was a scheduled task that was causing it, but no idea it was a PS script

    MS has a recommended fix, but it involves turning off ALL the maintenance tasks. (boo)
    See link here.

    http://support.microsoft.com/kb/978980/en-au?p=1

  2. Also something else I found
    the file “RS_RemoveShortcuts.ps1″ in the same directory contains the line (line 12)
    “Remove-FileList $brokenDesktopShortcuts”
    change this to “# Remove-FileList $brokenDesktopShortcuts”

    To stop killing links to network shares and usb devices when they go offline for a brief period.

Leave a comment


No trackbacks yet.