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!
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)
Please log in to answer
Posted by:
nheim
17 years ago
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
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.