PDA

View Full Version : How to set the “comment” shortcut property with InstallScript



DeanRotem
08-20-2014, 06:50 AM
I'm using InstallShield 2014 pro'. I'm trying to create shortcuts at the end of the installation, with specific values in the "comment" property (the text that shows when you hover above the shortcut icon with your mouse). If I create the shortcut via the shortcut view, I can just write any text I want in the "Description" field, and my goal is achieved. BUT! I have no way of inserting "intelligent" text in there, meaning that If I want the comment to display "[ProductName] version [ProductVersion]" there's no way to do that. That's why I decided to create the shortcuts with InstallScript, and try to set it's properties manually (also I have to create the uninstall shortcut with installshield, because there's no other choise in the InstallScript MSI project). Thus far it all works, and the shortcuts are created, but I don't know how to set this specific property with the SetShortcutProperty function, I used the example code to check if it works, and it keeps failing. I'm suspecting that this is because I'm not sure what's the property name, I tried different names for this field, but with no success (seems like "Description" should've worked, but no...). This is my code:



szName=IFX_PRODUCT_NAME;
szRunComment=szName + " " + IFX_PRODUCT_VERSION;
if (SetShortcutProperty(FOLDER_DESKTOP, szName, "Description", szRunComment) < 0) then
MessageBox("SetShortcutProperty failed", SEVERE);
else
SprintfBox(INFORMATION, "SetShortcutProperty", "%s configured successfully.", szName);
endif;



Best regards,
Dean.