MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: /FileMake[Next]: Guid
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Source Code->Commands->FolderIcon

The "FolderIcon" Command

This command can be used to create a "desktop.ini" file for a directory.

There is virtually no good information on creating the INI files but this command correctly creates them in "unicode" format and I used these plus other links to gather information:

  1. https://hwiegman.home.xs4all.nl/desktopini.html
  2. https://www.sevenforums.com/tutorials/15699-folder-template-default.html
  3. https://www.pcreview.co.uk/threads/how-keep-large-icons-after-renaming-a-folder.2543315/
  4. https://msdn.microsoft.com/en-us/library/windows/desktop/cc144102(v=vs.85).aspx

As all values the INI file are supplied as msi formatted strings, you will need to escape any square brackets they may contain.

After folder creation it can take some time for all attributes you apply to display correcly in Explorer.

The macro takes these parameters:

EXAMPLES

<$DirectoryTree Key="INSTALLDIR" Dir="c:\program files\TryMe">
<$FolderIcon DirKey="INSTALLDIR" IconFile="TryMe.ico" InfoTip="Some tootltip text to describe the folder">

;--- Some other variations ---
; <$FolderIcon DirKey="INSTALLDIR" IconFile="TryMe.ico"  InfoTip="[test infotip]">            ;;This will fail due to the unescaped square brackets!
; <$FolderIcon DirKey="INSTALLDIR" IconFile="TryMe.ico"  InfoTip="<$LSB>test infotip<$RSB>">  ;;This won't fail as the square brackets are escaped!
; <$FolderIcon DirKey="INSTALLDIR" IconResource="TryMe.ico,0" VIEW="TILES">

Main FolderIcon Related Options + Constants

Please see the "options for commands" section of the manual.

;--- Custom Action scheduling options ---
#define? FOLDERICON_SCHEDULE_INSTALL_SEQ          DuplicateFiles-               ;;After "CreateFolders" doesn't work!!!
#define? FOLDERICON_SCHEDULE_INSTALL_CONDITION    <$CONDITION_EXCEPT_UNINSTALL>
#define? FOLDERICON_SCHEDULE_INSTALL_TYPE         System                        ;;Allow it to work under program files...
#define? FOLDERICON_SCHEDULE_UNINSTALL_SEQ        <-DuplicateFiles              ;;"<-RemoveFolders" doesn't work!!!!  It leaves the folder behind
#define? FOLDERICON_SCHEDULE_UNINSTALL_CONDITION  <$CONDITION_UNINSTALL_ONLY>
#define? FOLDERICON_SCHEDULE_UNINSTALL_TYPE       System


;--- Define "[ViewState]->VID" options "(V)iew (ID)" and associated "mode" ---
#define? FOLDERICON_VIEW_ICONS      {0057D0E0-3573-11CF-AE69-08002B2E1262}
#define? FOLDERICON_VIEW_LIST       {0E1FA5E0-3573-11CF-AE69-08002B2E1262}
#define? FOLDERICON_VIEW_DETAILS    {137E7700-3573-11CF-AE69-08002B2E1262}
#define? FOLDERICON_VIEW_THUMBNAIL  {8BEBB290-52D0-11D0-B7F4-00C04FD706EC}
#define? FOLDERICON_VIEW_TILES      {65F125E5-7BE1-4810-BA9D-D271C8432CE3}
#define? FOLDERICON_VIEW_FILMSTRIP  {8EEFA624-D1E9-445B-94B7-74FBCE2EA11A}
#define? FOLDERICON_MODE_ICONS      1
#define? FOLDERICON_MODE_LIST       3
#define? FOLDERICON_MODE_DETAILS    4
#define? FOLDERICON_MODE_THUMBNAIL  5
#define? FOLDERICON_MODE_TILES      6
#define? FOLDERICON_MODE_FILMSTRIP  7


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: /FileMake[Next]: Guid


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Sunday August 13 2017 at 2:39pm
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.