Create Shortcut to folder instead of file

Got a problem you cannot solve? Try here.
marcusi
Posts: 18
Joined: Mon Nov 24, 2014 8:37 am

Create Shortcut to folder instead of file

Postby marcusi » Thu Apr 06, 2017 11:10 am

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"?

FrancescoT
Site Admin
Posts: 4862
Joined: Sun Aug 22, 2010 4:28 am

Re: Create Shortcut to folder instead of file

Postby FrancescoT » Fri Apr 07, 2017 4:37 am

Dear Marcusi,

unfortunately you can only create a shortcut to a file.

Regards
Francesco Toscano
InstallAware Software Support

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

marcusi
Posts: 18
Joined: Mon Nov 24, 2014 8:37 am

Re: Create Shortcut to folder instead of file

Postby marcusi » Fri Apr 07, 2017 5:05 am

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?

FrancescoT
Site Admin
Posts: 4862
Joined: Sun Aug 22, 2010 4:28 am

Re: Create Shortcut to folder instead of file

Postby FrancescoT » Fri Apr 07, 2017 12:32 pm

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
Francesco Toscano
InstallAware Software Support

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

SteveDude
Posts: 250
Joined: Wed Apr 11, 2007 6:07 pm

Re: Create Shortcut to folder instead of file

Postby SteveDude » Mon Sep 25, 2017 4:53 pm

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


Return to “Technical Support”

Who is online

Users browsing this forum: Google [Bot] and 12 guests