Page 1 of 1

Create Shortcut to folder instead of file

Posted: Thu Apr 06, 2017 11:10 am
by marcusi
I have tried creating a shortcut to a folder instead of a file with the Create Shortcut command but it does not seem to work. This is how my shortcut looks like right now:

Code: Select all

~InstallAware Clipboard Data~
~Create Shortcut~
~{854C7120-62AB-4285-9198-35BE5CE6A594}~
~$ADMINDIR$\|FALSE~
~Client Installation Files~
~$SHORTCUTFOLDER$|FALSE~
~Folder with installation files for PAS administration~
~~
~$ADMINDIR$\|FALSE~
~$SYSTEM32$\imageres.dll|FALSE~
~6|~
~0|~

The shortcut is created and looks fine in the startmenu, but when I click on it i get the standard windows dialog that lets me choose which program I want to use to open the "file" with, which of course doesn't work since it is a folder and not a file.

When I look at the properties of the shortcut the type is "File" and not "Folder". Is there a way to set the type to "Folder"?

Re: Create Shortcut to folder instead of file

Posted: Fri Apr 07, 2017 4:37 am
by FrancescoT
Dear Marcusi,

unfortunately you can only create a shortcut to a file.

Regards

Re: Create Shortcut to folder instead of file

Posted: Fri Apr 07, 2017 5:05 am
by marcusi
Thanks for the reply, but is that the final answer? From what I understand Embarcadero use InstallAware to install Delphi (which I think you are familiar with since InstallAware was made using Delphi too?) and they manage to create a shortcut to a folder with sample projects on the start menu. So is there really not some other way you can use to create that kind of shortcut, like a DLL call or something? Is there no one else who has had this need before?

Re: Create Shortcut to folder instead of file

Posted: Fri Apr 07, 2017 12:32 pm
by FrancescoT
Dear Marcusi,

honestly, I don't know how Embarcadero released that specific sample. They probably used a custom DLL to manage such shortcut.
This is of course possible ...InstallAware is not a closed box.

As I said previously, the "Create Shortcut" command (which is a Windows Installer command) can be only used to create a shortcut to a file.

Hope this helps you.

Regards

Re: Create Shortcut to folder instead of file

Posted: Mon Sep 25, 2017 4:53 pm
by SteveDude
Sometimes I think I get things to work, because I'm not smart enough to know they shouldn't, but I've used this type of thing in multiple installers and never had an issue...

Create Shortcut $SHORTCUTFOLDER$\EPS Files Folder to $COMMONDOCUMENTS$\Clipart\Master Vector Clipart Collection\EPS Files