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

Automation Interface, shortcut display name

Hello,

I have some problems when I'm trying to create a new shortcut with the automation interface.
Actually, the creation is working, but I'm not able to set the DisplayName property to an already set string ID.

Set oShortcut = oFolder.AddShortcut("SHORTCUT_" & stringID)
With oShortcut
.Arguments = args
.DisplayName = "MY_ShortcutName"
.target = destination & Mid(fileName, InStrRev(fileName, "\") + 1)
End With


In this code DisplayName property will create a new string ID (for ex ID_STRING38 = "MY_ShortcutName". But I want to set the DisplayName to string ID "My_ShortcutName" which already exists for multiple languages.

I've tried "##MY_ShortcutName##", "{MY_ShortcutName}", "[MY_ShortcutName]" but none is working.


Do you know any way to set DisplayName to a known string ID?

Please Help!

Thank you
Labels (1)
0 Kudos

(1) Reply
hidenori
Level 17

At this time, you need to use Windows Installer API instead of Automation Interface in order to accomplish it. Please refer to this thread for a sample code.
0 Kudos