I have added a shortcut to Program Menu Folder. It gets created properly. Now I would like to show installation path as a tool-tip of this shortcut when user moves mouse pointer over it. I tried setting Description column in Shortcut table to TARGETDIR, [TARGETDIR], INSTALLDIR etc. but it is not showing the installed path.

Help needed!!!
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Milind its possible for non advertised shortcut .you can write property INSTALLDIR in Target column of shortcut table
Answered 06/17/2010 by: Hussi
Purple Belt

Please log in to comment
0
And how to you make it non-advertised?
Answered 06/17/2010 by: milindsm
Blue Belt

Please log in to comment
0
BTW, Are you sure its Target column. I think its Description column
Answered 06/17/2010 by: milindsm
Blue Belt

Please log in to comment
0
Description column is unable to resolve the property [INSTALLDIR].
Answered 06/17/2010 by: Hussi
Purple Belt

Please log in to comment
0
I tried adding INSTALLDIR & [INSTALLDIR] to Target column and it didn't even create Program Menu entry
Answered 06/17/2010 by: milindsm
Blue Belt

Please log in to comment
0
For a non-advertised shortcut, the installer evaluates this field as a Formatted string. The field should contain a property identifier enclosed by square brackets ([ ]), that is expanded into the file or a folder pointed to by the shortcut.

Source: http://msdn.microsoft.com/en-us/library/aa371847(VS.85).aspx


And make sure non-advertised shortcuts are really what you want. Think of user settings which might not be repaired because your MSI could simply miss a trigger for that to happen.
Answered 06/17/2010 by: Rheuvel
Brown Belt

Please log in to comment
0
Hello milindsm,

If you are having a non-advertised shortcut then you can define a Property such as SHORTCUT in the Property table and its value such as c:\program files\... i.e your INSTALLDIR which you want to display via tool-tip and place this property as [SHORTCUT] in the target column of shortcut table.
Answered 06/17/2010 by: mayur_mak
Senior Purple Belt

Please log in to comment
0
I dont think that you can provide such variables in description column. This field only accepts strings and does not resolves variables into values. You will have to give it as string only..properties will not resolve.

Rgds,MSI*
Answered 06/17/2010 by: MSI*
Senior Yellow Belt

Please log in to comment
0
Hello MSI*,

I got it what u said is correct.The target field will set the path.
Answered 06/18/2010 by: mayur_mak
Senior Purple Belt

Please log in to comment
0
I dont think that you can provide such variables in description column. This field only accepts strings and does not resolves variables into values. You will have to give it as string only..properties will not resolve.

Then how should I handle this case if I want to copy installation path (specified by the user at run time) in description column?

EDIT: I tried adding [INSTALLDIR] value in Target column, it didn't even create the shortcut.
Answered 06/23/2010 by: milindsm
Blue Belt

Please log in to comment
2
I don't normally recommend such things but this has gone on long enough. Desperate times call for desperate measures.

There are a gazillion scripts around for creating shortcuts. Use one of those in a Custom Action, suitably adapted to get the INSTALLDIR property(using the 'Session.Property'....er....property) to populate the Description field.
Answered 06/23/2010 by: VBScab
Red Belt

Please log in to comment
2
Milindsm,
Just add the following VBScript custom action before CreateShortcuts CA and just enter your desired description data on the "<------desired data" line.


Dim msinstaller
Dim database
const msiViewDelete = 6
const msiViewModifyInsertTemporary = 7

Set msinstaller = Session.Installer
Set database = Session.Database

Set view = database.OpenView("select * from `Shortcut` WHERE `Shortcut`='psexec.exe'")
View.Execute
Set record = View.Fetch
view.Modify msiViewDelete, record
Shortcut = record.StringData(1)
Directory = record.StringData(2)
Name = record.StringData(3)
Component = record.StringData(4)
Target = record.StringData(5)
Arguments = record.StringData(6)
Description = record.StringData(7)
HotKey = record.StringData(8)
Icon = record.StringData(9)
IconIndex = record.StringData(10)
ShowCmd = record.StringData(11)
WkDir = record.StringData(12)
View.Close

set view = database.OpenView("select * from `Shortcut`")
view.Execute
Set Record_new = msinstaller.CreateRecord(12)
Record_new.StringData(1) = Shortcut
Record_new.StringData(2) = Directory
Record_new.StringData(3) = Name
Record_new.StringData(4) = Component
Record_new.StringData(5) = Target
Record_new.StringData(6) = Arguments
Record_new.StringData(7) = session.property("INSTALLDIR") ' <------desired data
Record_new.StringData(8) = HotKey
Record_new.StringData(9) = Icon
Record_new.StringData(10) = IconIndex
Record_new.StringData(11) = ShowCmd
Record_new.StringData(12) = WkDir
view.Modify msiViewModifyInsertTemporary, Record_new
view.Close

set database = Nothing


Cheers
Answered 06/24/2010 by: package_aligator
Orange Belt

Please log in to comment
0
Forgot to mention: in the script above I modify a shortcut named "psexec.exe", in your case just modify the corresponding field with your shortcut name.
Answered 06/24/2010 by: package_aligator
Orange Belt

Please log in to comment
0
Hey Thanks a lot...!!!! It worked ...!!! :)
Answered 06/24/2010 by: milindsm
Blue Belt

Please log in to comment
0
Sorry guys.... starting it again... It'd worked long back... I don't remember the CA type... I tried 6, 1030 (1024+6), 3078 (3072+6) .... still no results...!!!
Answered 09/02/2010 by: milindsm
Blue Belt

Please log in to comment
0
Experts...!!!
Answered 09/06/2010 by: milindsm
Blue Belt

Please log in to comment
0
Milind,

the CA type depends on too many variables for us to just tell you what it is. Have a look here for a complete list of options (script type and location, execution option, return code processing) and break out your calculator...

PJ
Answered 09/07/2010 by: pjgeutjens
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity