Remove Shorcut issue

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Neural
    Indigo Rose Customer
    • Sep 2002
    • 1

    Remove Shorcut issue

    Hello,
    Some quick background:
    I've been working on a project and need to remove shortcuts from the start menu which were created with a previous installation. The new version installs it's own shortuts which are titled differently.

    For legal reasons which have to do with distributon of the new code, we can't have the user run uninstall to get rid of the previous release.

    The software will be installed on NT/2000/XM/98, possibly ME and 95 but doubtfully.

    The Problem:
    I'm having trouble deleting the old shortcuts. I've tried RemoveShortcuts and DeleteFile to no avail so I think I'm doing something wrong. I've used all of the system variables I can find, such as %StartMenu%, %StartMenuPrograms%, %Desktop%, as well as the NT versions.

    Using the "Error" control and a custom error message which dumps the contents of these variables, it looks like they're being set correctly i.e. "C:\Documents and Settings\All Users\Start Menu\Programs" or "C:\Documents and Settings\All Users\Start Menu" depending on the variable.
    The error I get when using Verbose is:
    MSG_ERR_REMOVE_SHORTCUT (#1, Line 7)

    Could not delete file(s).
    C:\Documents and Settings\UserName\Start Menu\Programs\Old_Version\*.*.lnk
    which looks wrong. Also, it appears the UserName is in the path instead of AllUsers. I've tried this on 2K& XP

    It's probably something simple I'm overlooking but I'm stuck.

    TIA
Working...
X