command shortcut desktop

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • snaaps
    Forum Member
    • Jun 2005
    • 6

    command shortcut desktop

    Is it possible to make a command, that creates a shortcut on the desktop of the client's computer?

    I want give the option to install the cdrom on the local harddrive of the clients computer. This is no problem with 'copy folder to'.

    But now we want to create a shortcut on their desktops!
    The problem is: the location and name of the desktop are different on each system: 'desktop', 'bureaublad', documentsettings/user, map 'windows'

    How do I solve this problem?
  • longedge
    Indigo Rose Customer
    • Aug 2003
    • 2498

    #2
    Hello,

    I have done just this several times by doing the following.

    1. Create a shortcut on my own desktop. Obviously it has to be to a known folder/exe. My users have a lot of mapped drives (via network logon scripts) so when accessing network folders I have to be careful to use fully qualified UNC's.
    2. Copy the resultant .lnk file into the docs folder of your project.
    3. File.Copy that .lnk file to C:\Document and Settings\All Users\Desktop

    It works very well.

    Comment

    • leebos
      Indigo Rose Customer
      • Nov 2003
      • 141

      #3
      Here is the method I use to copy multiple shortcuts to the users desktop.
      When my shortcuts are created they are placed in C:\yoursourcefolder\ICONS.
      This way they only appear for the logged in user and not everyone.

      iFolder = "C:\\yoursourcefolder";
      DestFolder = Shell.GetFolder(SHF_DESKTOP);
      File.Copy(iFolder.."\\ICONS\\*.*", DestFolder.."", true, true, false, true, nil);

      Lee

      Comment

      • rhosk
        Indigo Rose Customer
        • Aug 2003
        • 1698

        #4
        Take a look at Shell.CreateShortcut
        Regards,

        -Ron

        Music | Video | Pictures

        Comment

        • leebos
          Indigo Rose Customer
          • Nov 2003
          • 141

          #5
          Ron, I do use Shell.CreateShortcut to create the shortcuts on the "master" machine. The program CD is created on the "master" and then distributed to multiple users/machines. Some of them have multiple users on their machines and only want the icon shortcuts to show up on the desktop for the logged in user when installed.

          Thanks,
          Lee

          Comment

          Working...
          X