cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Poulsbo_Farmer
Level 2

Shortcuts point to compressed version of executable

There is an unexpected side effect of using the advertised shortcut with Installshield 2015.
Can you assist in a workaround?

In the Project Assistant ==> Application Shortcuts the "Create shortcut in Start Menu" and "Create shortcut on Desktop" are both checked.
The installation does APPEAR to install shortcuts, and for ALMOST all purposes they actually work.
They launch the product, and allow it to work, unless you are retrieving text files that are stored in the program files folder along with the actual executable.
These text files were installed along with the other files that are placed in the program files folder.

In that case, the program cannot not find the files, and does not display them.
I believe it is because the Installshield shortcut does not point to the installed exe, but rather to a compressed exe elsewhere.
An unexpected side-effect of using "advertised" shortcuts instead of the older Windows shortcuts.

If you launch the program by directly clicking on it, it finds and displays the text files that are stored in the same folder as the exe.
If you point at the executable and send a shortcut to desktop, then click on the desktop, the program finds and displays them just fine.
Only when you click on the InstallShield-created "shortcut" with the two blue "compressed file" arrows in the upper right corner does it fail to find them.

The standard msi creation tool that was bundled with Visual Studio 2010 did not show the problem.
Both that version, and the 2015 version, is installed for all users.

A real shortcut, made by rightclicking on the executable and sending it to desktop, launches the program, and displays the text files just fine.
Also, when you check the "launch the program" checkbox on the install wizard, it launches the program which can display the text files just fine.
It is only when using the InstallShield-created icons on the desktop or start menu that it becomes apparent something odd is happening, and the text files fail to be retrieved when requested by the program.

The "imitation" desktop shortcut created by InstallShield in Visual Studio 2015 has two blue arrows in the upper right, which indicate it points to compressed files.
It displays the arrow in the white box at the lower left, just as one finds on a real shortcut.
If you right mouseclick and ask for Properties of the imitation shortcut, the title of the properties window just says "xxx Properties" where xxx is the product name.
A true properties window of a shortcut gives the full name of the product exe and "- Shortcut Properties".
A shortcut properties window also displays the full path to the target, along with the name of the application and the "start in" path.
The properties window of the imitation shortcut does not display any of these.
In the Details tab of the shortcut properties window, the Name shows the full name of the executable file, plus " - Shortcut lnk".
The Details tab of the imitation shortcut window just shows the name of the product plus ".lnk".

The InstallShield-created desktop shortcut does NOT appear as a shortcut in File Explorer, unlike other shortcuts.

I have looked around inside the InstallShield assistant, and see it is creating advertised shortcuts.
The self-repairing aspect of an advertised shortcut is nice --- but how can I make sure it can find those text files?
It is using a C# dot NET library command "LoadRTFFile() that is passed the ExePath and the full filename.
Labels (1)
0 Kudos
(1) Reply
Poulsbo_Farmer
Level 2

Here is a workaround for the undocumented problem, using Visual Studio 2015 and the Solution Explorer window.


Either through the setup project ==> Project Assistant ==> Application Shortcuts ==> Other Places / Shortcuts (look in the first column on the left)

-- or --

setup project ==> 3. Configure the Target System ==> Shortcuts/Folders

Here you see the shortcuts you will be creating.
Click on one of them, say the one on the Desktop for example.
Under Behavior you see Target with the entry "Advertised shortcut to [INSTALLDIR]productname.Primary output"
Two fields below that is the "Working Directory" that is empty.
Click on that field, and an ellipsis button appears on the right.
Navigate to the folder you are expecting to find the executable and related files.
In my case, this is [INSTALLDIR].

This will add the path to the shortcut, allowing your program to access the other files stored in that folder.
This appears to give you both the benefits of the "Advertised" Shortcut and the older Windows Shortcut you are used to.
0 Kudos