You are here

Icons on USB-Drive

8 posts / 0 new
Last post
jakov
Offline
Last seen: 17 years 4 months ago
Joined: 2006-11-30 12:27
Icons on USB-Drive

Hello!

I was wondering how the PortableAppsSuiteBase manages to display the .ico-files for the folder icon on my USB.

While F is my USB:
F:\PortableAppsSuiteBase\Documents\Desktop.ini
contains:

[.ShellClassInfo]
InfoTip=Contains letters, reports, and other documents and files.
IconFile=..\PortableApps\PortableAppsMenu\Icons\folder-documents.ico
IconIndex=0

Even when using the .ico-files inside the PortableAppsSuiteBase folder it doesnt work for my folders. The same thing when adressing even to the PortableAppsSuiteBase folder.

Nevertheless everything works fine (just alike if it was on the hrad disk) as long as I' working inside the PortableAppsSuiteBase folder and use copies or renames of the predefined folders.

What's different about those folders?
Are they somehow magic?
Or is their a script running to provide the icons?

thanks for any responses,

Jakob

cavedeamon
Offline
Last seen: 15 years 11 months ago
Joined: 2006-05-20 21:58
system folder

I came into the same problem when trying to customize folders on my flash drive. I found that in order for the folders to work they need to be a system folder.

To do this open up command prompt by typing run cmd in the command prompt you need to run this line of code.

attrib +S f:/folder
where f:/folder is the path to the folder you want to change and if any of the folders has a space in their name in case the whole path in ""
After all that put the desktop.ini file in the folder and hit refresh

Windows does this automatically on the hard drive by right-clicking, properties and selecting the customize tab. But this does not work on a removable drive.

----
eagle scout
Technology can solve all our problems, like using a laptop for a space heater in a cold tent in the middle of winter.

Wikipedia
----

pfeerick
pfeerick's picture
Offline
Last seen: 7 years 11 months ago
Joined: 2005-12-13 19:21
My solution

To display icons on my flash drive, I have a folder in the root of the drive all zRes (nothing special about the name, just a z so it's the last folder, and res as an abbreviation for resources) in which I place all my icons. I then use a shell extensions called NirExt (http://www.nirsoft.net/utils/nirext.html) which allows you to customize your folder icons and tooltips. I just choose my icon (eg. R:\zRes\music.ico), and remove the drive letter from the path (eg. \zRes\music.ico). The folder now displays a custom icon where-ever I go.

The major thing you need to remember is relative paths are required - otherwise if (and when) your drive letter changes, you custom icon(s) won't be found. NirExt allows me to change the path to a relative path without having to edit the hidden desktop.ini file in each folder.

jakov
Offline
Last seen: 17 years 4 months ago
Joined: 2006-11-30 12:27
thank you, but

what is your solution to this?
Do you use any batch file to do the job?
Will it leave traces on the PC used?

thx, Jakob

pfeerick
pfeerick's picture
Offline
Last seen: 7 years 11 months ago
Joined: 2005-12-13 19:21
manual, folder by folder

I use the NirExt program I mentioned before instead of manually editing/creating the desktop.ini file in each folder which allows you to customise the folder icon, tooltip and other system flags. It NirExt gets installed on your own pc, so you can customise the folder icons only, it doesn't need to run on any other pc.

Changing the desktop.ini file does not leave any traces on the PC used (as far as I know). It simply tells Windows to display a custom icon instead of the generic folder icon provided by Windows. If you want to see what I mean, and you've got the portable apps suite installed, at the Start -> Run dialog, type ":\PortableApps\desktop.ini" to view the file in notepad. The desktop.ini file is not usually visible if you have the "protect system files" option sslected in windows explorer.

When NirExt is installed, you simply right-click on a folder, choose "folder properties", and click something else (think it's browse), and then navigate to the icon you want to use. It's best to have the icons somewhere on your drive, so that they don't change from system to system (if you use icons from shell32.dll, etc).

Edit: Just re-read the original post...
Try this:

  • make a new folder in the root of your usb drive, call it whatever you like,
  • put some icon (*.ico) files in it.
  • in the folder you want to customise, create a desktop.ini that contains the following
[.ShellClassInfo]
InfoTip=[whatever-comment-you-want]
IconFile=\[folder-with-icons]\[icon-filename].ico
IconIndex=0
  • replace the comments (between the square brackets with the appropriate information and save the file.
  • you may need to restart the computer before windows realises there are custom icons to be used, but try removing the drive once or twice first to see if windows wakes up.
  • That should do the trick.

    In regards to the contents of the desktop.ini file from the original post, I hope this example is of some use.

    Example drive folder structure:

    R:\
     |- PortableApps
     |  |- PortableAppsMenu
     |     |- Icons
     |- FolderWithCustomIcon
        |- AnotherCustomIconFolder
    

    For that IconFile line to work, you would have had to be customising a folder in the root of your flash drive (ie FolderWithCustomIcon). However, if you wanted to customise the icon of AnotherCustomIconFolder, you would have too add another "..\" to the start of the path to the icon.

    Hank7
    Offline
    Last seen: 4 years 7 months ago
    Joined: 2006-09-27 07:39
    folder icon tools

    There are two other tools that I remember that could be of help when creating folders with individual icons.

    Both create the desktop.ini, make the folder a system folder and let you choose an icon easily. You only have to manually edit the paths to relative ones.

    FolderIcons 1.27
    http://www.cylog.org/utils_7.asp
    Displays a nice explorer-like window to browse for icons "in DLLs, EXEs, ICLs and literaly any file that contains icons."

    FolderTweaker 1.1
    http://www.321download.com/LastFreeware/page23.html
    Also allows you to determine a folder background. Installs itself on first use and can be uninstalled with the parameter -byebye (which makes it a nice combination with PStart's on start/on exit autorun feature).

    All work well from my usb drive, but I never checked the registry.

    pfeerick
    pfeerick's picture
    Offline
    Last seen: 7 years 11 months ago
    Joined: 2005-12-13 19:21
    If I get the chance/time

    If I get the time, I'll write something to automate that. I'm currently writing one or two complete "programs" in AutoIt, and I think it would be easy enough to do something that would allow you to customize the folder icon, and apply a few tweaks for portable usage.

    cavedeamon
    Offline
    Last seen: 15 years 11 months ago
    Joined: 2006-05-20 21:58
    bat file

    I recently created a bat file that can easily create the desktop.ini file and include the infoTip and icon.
    just put this code in a .bat file and run it.
    @Echo off
    set /p folder="What folder do you want to costomize, use full path? "
    set /p icon="What is the path to the icon file? "
    set /p info="What do you want the infoTip to say? "
    attrib +S %folder%
    Echo [.ShellClassInfo] > "%folder%\desktop.ini"
    Echo IconFile="%icon%" >> "%folder%\desktop.ini"
    Echo InfoTip="%info%" >> "%folder%\desktop.ini"
    Echo IconIndex=0 >> "%folder%\desktop.ini"

    the icon file has to be a .ico and the folder should change after a refresh or two.

    ----
    eagle scout

    Technology can solve all our problems, like using a laptop for a space heater in a cold tent in the middle of winter.
    ----

    Topic locked