abidlen
Posts: 3
Joined: Wed Apr 12, 2006 9:02 pm

Shortcut Only

I'm attempting my first solution w/ AI and am trying to simply create a shortcut that will go in the Startup folder that points to a .exe that already exists on a network share.

I can create the shortcut if I include the .exe in the package and have it install to a local drive but can't find how to simply create the shortcut to an existing path.

Any suggestions will be appreciated.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
I can create the shortcut if I include the .exe in the package and have it install to a local drive but can't find how to simply create the shortcut to an existing path.
If you want to create an shortcut to an network share you could use the Advanced Installer's external shortcut feature.

Here is how it can be done:
First of all create a new property. Define it on "Install Parameters" page at "Properties" group with the value of your network path.

In "Files and Folders" page select the folder where you want to place the shortcut in our case "Start Menu->Startup".
In the right pane right click and select "New Shortcut to->External File".
In "New Shortcut" dialog at the "Shortcut Target" type the Property name defined in "Install Parameters" page. The Property name must be enclosed by square brackets because Windows Installer evaluate it as a Formatted string.

Hope this helps you.
All the best,
Gigi
_________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
abidlen
Posts: 3
Joined: Wed Apr 12, 2006 9:02 pm

Thank you for your instructions!

I believe that I am following them correctly but when I attempt to create the Shortcut to an external file I am getting a message that says:
Your project must contain at least one component (file, registry entry, etc.) before this operation can be performed.

Since all I really want is a shortcut placed in the Startup folder, I don't know what other component I should add to satisfy this requirement.

Thanks
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
I believe that I am following them correctly but when I attempt to create the Shortcut to an external file I am getting a message that says:
Your project must contain at least one component (file, registry entry, etc.) before this operation can be performed.
In order to build a msi package you must have at least one component in your project.
A shortcut refers to a component, that's why you need to add a component.

Microsoft Platform SDK states: "Windows Installer uses the installation state of the component specified to determine whether the shortcut is created or deleted. This component must have a valid key path for the shortcut to be installed."

You can create an empty registry value if you really want to create this shortcut with a msi package.

All the best,
Gigi
_________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
abidlen
Posts: 3
Joined: Wed Apr 12, 2006 9:02 pm

Thank you Gigi

Return to “Common Problems”