cancel
Showing results for 
Search instead for 
Did you mean: 

How to use icon for folder shortcut ?

Hi All,

I am having following shortcuts for our product on windows using Installshield 11.5 :

Start-->Programs-->Savvion>SBM-->Start Server-->EJB Server
Start-->Programs-->Savvion>SBM-->Start Server-->Portal Server

For EJB Server and Portal Server shortcuts, I am able to specify the respective icon files. Would like to specify the icon file for Savvion shortcut also, basically want to overrite the the default icon for windows folder icon.

Is there way to do , If so how it can be done ?

Thanks and Regards,
Chetan
Labels (1)
0 Kudos
7 Replies
MarkEarle
Pilgrim

Re: How to use icon for folder shortcut ?

Chetan,

You can set up a file that Windows reads before displaying the folder. It is called Desktop.ini. The content you want follows:

[.ShellClassInfo]
IconFile=
IconIndex=0 // The index of the icon you wish to display.
InfoTip=


Cheers,

ME
0 Kudos

Re: How to use icon for folder shortcut ?

Hi MarkEarle,

Thanks for your reply. Can you please tell how to use this file and where to place this file in install directory.

Thanks and Regards,
Chetan
0 Kudos
MarkEarle
Pilgrim

Re: How to use icon for folder shortcut ?

Chetan,

You have to place the file in the folder you want to display the changed icon. In your case it should be in:

DRIVE:\Documents and Settings\All Users\Start Menu\Programs\Savvion

The Desktop.ini file should have the System and Hidden attributes set. Just remember you will have to delete this file before you remove the shortcuts since IS will not remove it because it contains a file it did not put there.

Cheers,

ME
0 Kudos

Re: How to use icon for folder shortcut ?

Hi MarkEarle,

Thanks for your reply. I am able to set the Hidden attributes for Desktop.in but how to set System attributes ? Can you help for same ?

Also do you any idea how to have tooltip for shortcute for Installshield 11.5 .
Say for example I want to put Tool Tip for EJB Server as " Start the EJB server"
Start-->Programs-->Savvion>SBM-->Start Server-->EJB Server

I tried to specify Description attribute of shortcut as per document but didn't worked. Any idea ? That will be really great.

Regards,
Chetan
0 Kudos
MarkEarle
Pilgrim

Re: How to use icon for folder shortcut ?

Hey Chetan,

I am not very familiar with IS11.5 however to make the desktop.ini a system file is as easy are running a DOS command 'attrib +s +h desktop.ini'. As for the tool tips, if the description field in IS11.5 corresponds to the comment field of the shortcut then you should not be seeing an issue. To check this, look up the properties of the shortcut you created. If the description you wrote, Start the EJB server, is there then click apply and test the tool tip on hover. I have seen some behaviour like this when IS sets the information correctly but is not able to refresh the UI to show it. It usually will show correctly after a restart of the system.

Cheers,

ME
0 Kudos
Highlighted

Changing folder icon

Thanks for the hint, but I still have a question.

In the Desktop.ini file, we cannot know in advance where the icon will be located. Can we change the text inside the file based on the installer variable? (using 2009 Express here).

I.e.:

[.ShellClassInfo]
IconFile=[INSTALLDIR]\icons\menu_folder.ico
IconIndex=0
InfoTip=My Product Inc.


Thanks,

GG
0 Kudos
MarkEarle
Pilgrim

Re: How to use icon for folder shortcut ?

Hey GG,

According to your example you have a Basic MSI or an InstallShield MSI project. If you do, then you should be able to set the properties using the INI File Changes View. I am not sure if that is available in IS2009 Express. If it is, then you will be able to set up your value to include the [INSTALLDIR] property. If that does not work, you will have to create a custom action to modify the Desktop.ini file. You can use the InstallScript function WriteProfString() to update the file to reflect the path correctly. Just remember to flush the cache after writing.


WriteProfString( "Path:\To\Desktop.ini", ".ShellClassInfo", "IconFile", INSTALLDIR ^ "icons\\menu_folder.ico" );

WriteProfString( "", "", "", "" ); // null string for all four parameters to clear the cache.


If you have an InstallScript project then the above code would work as well.

Hope this is helpful.

ME
0 Kudos