1

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;
0

1 Answer 1

0

InstallShield User Guide 2013 says (page 11):
...You can use this function in your InstallScript code to set Windows Shell properties for a shortcut. The function lets you prevent end users from pinning a shortcut to the Windows 8 Start screen, prevent end users from pinning a shortcut to the taskbar or Start menu on Windows 7 or later systems, or prevent a shortcut on the Start menu from being highlighted as newly installed on Windows 7 or later systems. You can also use this function to specify additional Shell properties that are defined in propkey.h, which is part of the Windows SDK....
So, I think, you need refer to propkey.h to find out, which exactly property you need to use, if it really exists.

P.S. Answered as Answer, because of limitation on long comments.

1
  • I did refer to propkey.h, and tried all the fields that somehow resemble what I need - but with no success. Thanks for the reply though. Aug 20, 2014 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.