Create a Shortcut that opens a Directory using InstallShield

How do I create a Desktop Shortcut that opens a Network Location, Folder or another Directory?

If you have ever run into a situation where all you wanted was a Desktop Shortcut that opens a file, another executable, a browser or even a Folder. It’s actually pretty straight forward, you can use InstallShield or you can just edit the MSI Shortcut Table.

Let’s start off with a Scenario; You have a Network location that is shared to everyone, yet you don’t want the users to Map the location as a Network Drive. Instead you decide to just place a Shortcut to the Network location but you’re sick of doing this manually…..

To begin, open your InstallShield Project and find the Shortcuts section to the left of the Installation Designer. You can also do this in Orca or InStedIt, I will briefly explain how to do this via the Shortcut Table at the end of this article.

Installshield Shortcuts Menu
InstallShield Shortcuts

Now we need to create our Shortcut. I’d like my Shortcut to reside within both the Desktop and Start Menu, for now I will simply Right Click Desktop & Select New Shortcut to Preexisting file.

Installshield Shortcuts Menu
Creating the Desktop Shortcut

Once you have created your Shortcut component, go ahead and give it an Icon if you wish. I personally used a Windows System Icon from C:\Windows\System32

Shortcut Parameters
Shortcut Icon

Enter the following values. Alternatively, if you’re creating a Shortcut to open a different executable or do something completely different, you may wish to change this.

For me, I will open explorer.exe and pass arguments through to this executable to open my Network Location.

Target: [WindowsFolder]explorer.exe
Arguments: “path to my network location”
Working Directory: Where explorer.exe resides

Translated to English: C:\Windows\explorer.exe “path to my network location”

Shortcut Parameters
Shortcut Parameters
Copy Shortcut to Start Menu

Before I forget, I’ll copy my Desktop Shortcut to Start Menu\Programs too. Right Click > Copy > Select Programs Menu > Paste

Once you’re happy with your Shortcuts, go ahead and compile your MSI, install and test that your Shortcut is created along with your Parameters, below is a copy of what mine looks like.

My Shortcut

Once you’re happy with your Shortcuts, go ahead and compile your MSI, install and test that your Shortcut is created along with your Parameters, below is a copy of what mine looks like.

My Shortcut Target Parameters
Shortcut Target Parameters

If you’re Super Advanced, or wish to know how to do the same via Orca, InStedIt or any other type of program that allows you access to MSI Tables.

First find your Shortcut Table.

In InstallShield you can find this within the Direct Editor section under Additional Tools.

Editing the Shortcut Table
InstallShield Direct Editor

You’ll see within the Shortcut Table I have two Shortcuts, my Desktop and Start Menu Shortcut. Again, the Target and Argument.

Target: [WindowsFolder]explorer.exe
Arguments: “path to my network location”

I can also see from the Reference Table below I have three associations.

  1. The component of the Shortcut itself
  2. The Directory this component references to where the Shortcut is to reside
  3. The Icon location that I am using to compile with my MSI.
Editing the Shortcut Table
Shortcut Table Component Reference
Editing the Shortcut Table
Shortcut Directory Table Reference
Editing the Shortcut Table
Shortcut Icon Table Reference

Facebook Comments

About: Dale


%d bloggers like this: