|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
|
#1 |
|
Junior Member
Join Date: Sep 2009
Posts: 7
|
Icon for a Start Menu item generated by CreateDirectory
I'm sure there is a simple answer to this...
I have an install that creates the following entries in the Start Menu MyApp Run MyApp Uninstall MyApp Both Run MyApp and Uninstall MyApp correctly show their icons. The parent 'MyApp' does not. I'm using the following definition CreateDirectory "$SMPROGRAMS\$StartMenuFolder" CreateShortCut "$SMPROGRAMS\$StartMenuFolder\MyApp.lnk" "$INSTDIR\System\MyApp.exe" \ " " "$INSTDIR\System\MyApp.ico" "" SW_SHOWMINIMIZED CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall MyApp.lnk" "$INSTDIR\Uninstall.exe" \ " " "$INSTDIR\System\MyApp.ico" "" How do I specify the missing icon? |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Since when did start menu folders have program specific icons (by default)?
Stu |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Aug 2007
Location: Paris, France
Posts: 304
|
It is possible by placing a desktop.ini file in your folder. Give the file the attributes "hidden" and "system".
Inside desktop.ini, write the following: (with your NSIS script, so you can use the $INSTDIR) code: (you can use an EXE, DLL or ICO file. See also http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx) Apparently, you must also set the attribute "Read-only" on your folder. (only, not on the files inside) And please make sure your custom folder icon still looks like a folder, otherwise the user would feel strange.. My NSIS plug-ins: http://wiz0u.free.fr/prog/nsis.php Last edited by Wizou; 27th October 2010 at 21:32. |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
I think the attributes you need to set can vary (IIRC there is a registry setting for it) and the page you link to tells you which documented function to call (Or just set system and read-only to be on the safe side)
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
|
Maybe he said that one of the shortcuts created in start menu folder by his installer doesn't have an icon, that likes an executable file without any icon resource. He wants to show the icon he set in script.
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Jan 2002
Location: Berlin
Posts: 172
|
Making Icons for folders is a nice thing especially in a corporate environment. This way users can distinguish between start menu entries provided by IT department from the rest.
I ues this construct fairly often, it even works with limited user rights: PHP Code:
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|