Jump to content

This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

Shortcut to directory

4 replies to this topic


  • Full Members
  • 10 posts

Posted 17 August 2011 - 01:21


I am creating an msi with Orca and want to create a shortcut to my documentation directory in the start menu group. All my other shortcuts point to executables and are created correctly. Only the documentation directory shortcut does not appear. Validation does not report any warning or error, except for ICE66:

"Complete functionality of the Shortcut table is only available with Windows Installer version 4.0. Your schema is 200"

My entries look like this:

Directory table:

DOCUMENTATIONDIR | APPDIR | Docume~1|Documentation:Docume~1|Documentation

Component table:

DocumentationComponent | {B15BBC84-5AF0-47AB-B2F1-8D605DA9CFD7} | DOCUMENTATIONDIR | 0

Feature table:

DocumentationFeature | Documentation | Docs.. | 5 | 1 | 8

FeatureComponents table:

DocumentationFeature | DocumentationComponent

Shortcut table:

DocumentationDirShortcut | ShortCutFolder | Docume~1|Documentation | DocumentationComponent | DocumentationFeature

This all was motivated by the following excerpt from the MSI documentation for the KeyPath in the Component table:
" If KeyPath is null, then the folder of the Directory_ column is used as the key path."

Any idea what could be wrong?

Nicolas Reinschmidt


  • Full Members
  • 90 posts

Posted 19 August 2011 - 06:49

I do not think KEYPATH or KEYFILE has anything to do with the shortcuts that we create. KEYPATH or KEYFILE is basically a mechanism used to identify binaries or resources that are critical for application functioning. If any of the KEYPATH or KEYFILE is found missing the Windows Installer engine initiates a repair. Only a KEYPATH or KEYFILE is repaired and replaced and nothing else during a repair.

I too have been facing issues creating shortcuts to folders using another approach. I tried using an Installscript function AddFolderIcon to create a shortcut to a directory but have not succeeded till now. It was an INstallscript Project but somehow I feel there is something missing in the whole scheme of things.

Shortcuts to executables are always fine but shorcuts to directories have some issues. It could be the APIs or the improper use of them.

I have been seeing stuff on the net that says that we need to create a shortcut that points to explorer.exe with arguments such that it opens the required folder. Is that the only solution?

Edited by MSIYER, 19 August 2011 - 06:53.


  • Full Members
  • 436 posts

Posted 19 August 2011 - 09:20

QUOTE (MSIYER @ 2011-08-19 06:49)
Only a KEYPATH or KEYFILE is repaired and replaced and nothing else during a repair.

Oops! Not quite. A missing keypath causes the feature containing that keypath to be repaired.
- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.


  • Full Members
  • 10 posts

Posted 19 August 2011 - 13:53

thanks for your replies.
I think I found a solution:

- create a new component f.e. DocumentationShortcutComponent, set its directory to the Documentation directory, set the registry flag in the attribute field and set the KeyPath to a key in the registry table

- associate the new component with the Documentation feature in FeatureComponents table

- in the Registry table create a dummy registry entry in HKCU\Software\Company\Product

- create the shortcut and set component to DocumentationShortcutComponent and target to [$DocumentationShortcutComponent]

The extra component is necessary in my case because otherwise I get ICEs because of mixing per-machine and per-user files/registry keys.



  • Full Members
  • 90 posts

Posted 14 September 2011 - 15:11

Thanks VBScab for pointing out the folly in my post.

What I wanted to say was:
Only a missing KEYPATH or KEYFILE can trigger a repair. Other files in the component, if missing, will not be repaired. This was to highlight the point that one file per component is always the ideal approach(but not always practical).

Somehow the error crept in due to my lack of concentration.

Edited by MSIYER, 20 September 2011 - 09:46.