none
Duplicate Shortcuts

    Question

  • I’ve created a cab file that deploys my app and a shortcut on the device’s programs menu.  That all works fine, the problem is that when I update my application with a new version run the CAB file I get a duplicate shortcut.  Is there anyway from the cab/inf files to tell the installer not to duplicate the shortcut, or do I explicitly have to delete my previous shortcut through a setup.dll
    Friday, June 08, 2007 10:49 PM

Answers

  • Hi Petchey,

     

    Sorry for not making my idea clearly.

    Yes, when the install process of new version cab is launched, the previous version will uninstall first automatically. In this uninstall process of the previous version, all the files (including your shortcut) and registry (if exists) will be removed.

     

    Regards,

    Zero Dai - MSFT

    Tuesday, June 12, 2007 6:51 AM

All replies

  • I’ve created a cab file that deploys my app and a shortcut on the device’s programs menu.  That all works fine, the problem is that when I update my application with a new version run the CAB file I get a duplicate shortcut.  Is there anyway from the cab/inf files to tell the installer not to duplicate the shortcut, or do I explicitly have to delete my previous shortcut through a setup.dll

    Friday, June 08, 2007 10:48 PM
  • Hi Petchey,

     

    If the shortcut is added by CAB project itself, when uninstalling, the shortcut will be removed automatically. So, could you please try to check if the shortcut settings in the new version CAB project is correct? I may guess the shortcut and the executable file are put at the same place, which makes it look like duplicated shortcut.

     

    If this doesn't come to work, let's go on the further discussion.

    Thanks,

    Zero Dai - MSFT

    Monday, June 11, 2007 5:43 AM
  • Well I simply using the VS2005 wizzard, I right click in the 'Start Menu Folder' pane where is give me the option to create a short cut.  The short cut is being place in the right place.  I gather from you comment that we should be doing an uninstall before an fresh install.  This begs another question an that is can an uninstall be automatically initiated during an install process.  The updated cab files are being link through an SMS message.  I want the user to simply click the link and the files are updated or if the previous version did not exsit a fresh install in initiated.

     

    Petchey

    Monday, June 11, 2007 5:22 PM
  • Hi Petchey,

     

    Sorry for not making my idea clearly.

    Yes, when the install process of new version cab is launched, the previous version will uninstall first automatically. In this uninstall process of the previous version, all the files (including your shortcut) and registry (if exists) will be removed.

     

    Regards,

    Zero Dai - MSFT

    Tuesday, June 12, 2007 6:51 AM
  • I am having the same problem.  Did you ever get this to work, or is it a Microsoft bug?
    Thursday, April 10, 2008 12:08 PM
  • This is my problem also. Any solutions, or is this a bug?

    It only happens when installing to a WM5 device.
    Friday, June 20, 2008 4:36 PM
  • Should anybody else run into this problem, I solved it by using cabwiz.exe to package my application. It appears VS2k5's cab project doesn't manage shortcuts correctly on WM5 devices, but if you create your own .inf file, shortcuts are handled properly (assuming your .inf file is correct.)
    Monday, June 23, 2008 3:21 PM
  • Thanks for the suggestion.  I tried using cabwiz.exe and checking that my shortcut in the .inf file was correct.  Still have duplicate shortcut on reinstall.
    Monday, June 30, 2008 8:48 AM
  • Try using it again, replace my values with yours. Worth a shot, at least? I changed my app name to MyApp and such, the rest is the same.

    [Version]
    Signature   = "$Windows NT$"        ; required as-is
    Provider    = "Provider" ; maximum of 30 characters, full app name will be "<Provider> <AppName>"
    CESignature = "$Windows CE$"        ; required as-is
     
    [CEStrings]
    AppName     = "MyApp"        ; maximum of 40 characters, full app name will be "<Provider> <AppName>"
    InstallDir  = %CE1%\%AppName%       ; Program Files\Mine Sweeper
     
    [SourceDisksNames]                  ; directory that holds the application's files
    1 = , ".",,
     
    [SourceDisksFiles]                  ; list of files to be included in .cab
    MyApp.exe = 1
    VERSION.txt = 1
     
    [DefaultInstall]                    ; operations to be completed during install
    CopyFiles   = CopyToProgramFiles
    CEShortcuts = Shortcuts  
     
    [DestinationDirs]                   ; default destination directories for each operation section
    CopyToProgramFiles    = 0, %InstallDir%
    Shortcuts   = 0, %CE11%             ; \Windows\Start Menu\Programs
     
    [CopyToProgramFiles]                ; copy operation file list
    "MyApp.exe", MyApp.exe
    "VERSION.txt", VERSION.txt
     
    [Shortcuts]                         ; Shortcut created in destination dir, %CE14%
    %AppName%,0,MyApp.exe

    Monday, June 30, 2008 1:15 PM