Coffeehouse Post

Single Post Permalink

View Thread: Win7 deletes shortcuts on the desktop
  • User profile image

    , evildictaitor wrote

    Look, I'm not saying deleting shortcuts without a prompt is a good idea - I'm just saying that it's a valid action for the OS to take. The sole purpose of a shortcut is to take you to a target file. If that file isn't there then the only purpose of the shortcut has vanished, and hence leaving the shortcut around clutters up the folder. The reason will be that uninstalling programs often doesn't delete the shortcut files they inevitably dropped on the desktop during install, and this was an attempt to stop your desktop becoming a shortcut cemetery.

    And what about the effort I put into manually changing parameters to run my program? That's why I have all these shortcuts.

    So, deleting shortcuts to clean up after broken uninstallers is a 'valid action'. But that's not the only reason people have shortcuts on their desktop. Windows has just added more idiocy to fight idiocy and broken the general case: That the OS shouldn't delete user files without warning.

    @Craig_Mathews Thanks for the tip. I managed to edit the file you mentioned but I couldn't change it's owner back to TrustedInstaller as there is no user called that which is weird.

    @Dr.Herbie  This 'clean up'/'balls up' process only runs once a week (01:00 on Sunday night on my machine) - it might not have actually run during your experiment. As far I can tell from the PS script, it doesn't take any account of whether the drive the target is located on it available.

    # Function to check whether the shortcut is validfunction Test-ValidLink([Wmi]$wmiLinkFile = $(throw "No WMI link file is specified")){    if(($wmiLinkFile -eq $null) -or ([String]::IsNullOrEmpty($wmiLinkFile.Target)))    {        return $false    }    return Test-Path $wmiLinkFile.Target}