/build/static/layout/Breadcrumb_cap_w.png

SHORTCUTDIR

hi all,

i have a MSI file for the distributor that i need to locate the shortcut to some other directory. i don't wish to create a MST file just for that.

is there a way to redirect the shortcut?

so far, i have tried;

msiexec /i TheMsiFile SHORTCUTDIR="[ProgramMenuFolder]\TheShortCutDir

but it's not working.

how can i do this?

thanks!

0 Comments   [ + ] Show comments

Answers (2)

Posted by: nheim 17 years ago
10th Degree Black Belt
0
Hi kardoc,
this isn't going to work in a 'normally' authored MSI because there is no public property for the shortcut directory.
In our environment, we alter the shortcut directory for all apps that we deploy. But this isn't just easy property setting, because you have to remember somehow, where you exactly pointed that link when people during the setup alter that path (which is the reason you want to do that). Otherwise, with a repair or reinstall, a (second) new directory with the path stored in the directory table will be created and the the links placed there too.

We do the following:
create a 'SHORTCUTDIR' property and alter the directory table accordingly.

This line goes to the Directory Table:
SHORTCUTDIR ProgramMenuFolder YOUR~1|Your App Dir

Shortcuts Table changes:
YourApp SHORTCUTDIR YOUR1~1|Your App yourapp.exe FeatureX Icon.exe 0 1


The remembering part goes as follows:

Add this line to the AppSearch table:
SHORTCUTDIR SC_Dir

Add this line to the RegLocator table:
SC_Dir 2 Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductCode] ShortcutDirectory 0

Add this line to the Registry Table:
RegHKLM1 2 Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductCode] ShortcutDirectory [SHORTCUTDIR] YourComponentX
(You need to alter the last part of the line, which has to be a valid component of your app. Normally, you can use the component, as the main .exe is associated with.)

To make this changes, use ORCA from the SDK.

With this you can set a property on the command line. If you need a dialog to set it, you have to author it by your self, but this need in deep knowledge of MSI-Files.

Hope this helps.
Regards, Nick
Posted by: kardock 17 years ago
Second Degree Green Belt
0
thanks, these are great info! i will keep them for future reference.

but just for 1 shortcut, it will be easier to only create the mst file.

thanks!
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ