Page 1 of 1

Portable Folder Icons For my applications

Posted: Tue Jan 13, 2009 3:40 pm
by donald
I would like to place folder icons in each of my portable applications folders and set it as the folder icon.

I know this should be possible but haven't been able to duplicate it yet.

My proof of the possibility is Mr. Haller's Launcher/Menu and the folder icons he uses for documents folders and the portable apps folder.

I have noted the presence of a desktop.ini file and have attempted to duplicate the effect.

Haller's Desktop.ini

Code: Select all

[.ShellClassInfo]
InfoTip=Contains videos files.
IconFile=..\..\PortableApps\PortableAppsMenu\Icons\folder-video.ico
IconIndex=0
My version modified for my folder structure and placed in my FirefoxPortable folder with an extracted icon labeled Icon

Code: Select all

[.ShellClassInfo]
InfoTip=Contains videos files.
IconFile=..\..\Apps\FirefoxPortable\Icon.ico
IconIndex=0 
Finally a version Jobby Toss sent after a PM conversation.

Code: Select all

[.ShellClassInfo]
InfoTip=Contains music and other audio files.
IconFile=.\icon.ico
IconIndex=0
This method has not proved to produce a portable folder icon for my portable apps.

I placed the Desktop.ini file and the Icon.ico file and then set the folder icon as the Icon inside the folder.

Next I test for portability to another computer.

So far No Joy.

Has anyone else found this problem?

Posted: Tue Jan 13, 2009 4:05 pm
by Queue
The folder needs to be flagged as a system folder. I think the following batch script could make that process easy for you:

Code: Select all

@echo off
attrib +S %CD%
cls
Put that text into a batch file, put the batch file inside the folder you want to set a special icon for, then run it. Then, a desktop.ini file inside that folder should work properly.

If the icon file is also inside the folder (along with the desktop.ini file) this is the simplest desktop.ini possible:

Code: Select all

[.ShellClassInfo]
IconFile=iconname.ico
IconIndex=0
No .\ etc. is needed. InfoTip is optional, and just gives the folder a description.

Queue

About the batch.

Posted: Tue Jan 13, 2009 4:11 pm
by donald
About the batch does it have to be run every time or is just once enough?

And will this be portable to other computers without running the batch?

Thanks for your help.

Re: About the batch.

Posted: Tue Jan 13, 2009 4:18 pm
by Queue
donald wrote:About the batch does it have to be run every time or is just once enough?
Just once; after a folder is flagged as a system folder, it will stay that way.
donald wrote:And will this be portable to other computers without running the batch?
Yes, the batch file (flagging the folder as a system folder) only needs to be done once and is saved in the folder's data, so isn't system specific.
donald wrote:Thanks for your help.
You're welcome!

Queue

NirExt

Posted: Wed Jan 14, 2009 3:19 am
by chezduong
Just use NirExt. It does that with a GUI. Relative paths are supported and you can even just use 'filename.ico' if the file is in the folder.

http://www.nirsoft.net/utils/nirext.html

Hope this helps.

Can it also be moved?

Posted: Wed Jan 14, 2009 4:47 am
by donald
Can it also be moved? (The changes in the folder Icons?) made with NirExt.?

Does it support the same sort of path Queue is using?

Code: Select all

IconFile=iconname.ico 
Or is it a longer string without a drive letter?

Code: Select all

.\Apps\FirefoxPortable\FirefoxPortable.ico
The reason I ask is that the method Queue is using should be portable from drive to drive as well even when the relative path changes.

Ie. when I copy these files to another launcher menu folder to upgrade launchers or if I decide to run them from C and it looks like this

Code: Select all

C:\Users\Don\Desktop\Apps\FirefoxPortable\FirefoxPortable.ico
Queue's method should support this, but will this app NirExt support it as well? or is it just a drive relative path?

In either case it looks like a great app I just haven't had the opportunity to test it with a second computer yet.

Thanks Queue and Chezduong.

Posted: Wed Jan 14, 2009 4:55 am
by Kranor
Folder does not need to be flagged as a Special folder just create the following .ini file:-

Code: Select all

[.ShellClassInfo]
ConfirmFileOp=0
IconIndex=-246
IconFile=C:\WINDOWS\system32\shell32.dll
InfoTip=
If the .ico is not within the Shell32.dll file then set IconIndex to 0 and IconFile to the path of the icon file.
If you want it portable place the icon file in the same folder as the desktop.ini file. and change the path to 'iconname.ico'

Posted: Wed Jan 14, 2009 8:27 am
by chezduong
@ donald, if your questions concern NirExt, the answer is yes,

• it can be moved,
• it supports iconname.ico as long as iconname.ico is in the folder itself
• it supports relative paths like(without .\Apps\FirefoxPortable…and \Apps\FirefoxPortable… (without the drive letter) but this is less flexible than the second point since if you move the folders, you change the path and you break the link.
• it supports absolute paths C:\Windows\system32\shell32.dll

You run it once to put the right click context menu in Explorer. You right click to change the folder icon. You run it again to disable the right click context menu. It's portable and green. And it has 2 other functions.

I use it all the time. Hope this helps. CD

Posted: Sun Jan 18, 2009 5:11 am
by joby_toss
Finally I found the time to test this ... Queue's method works great ... also changing the icon using folder's properties works if the icon's path is changed inside desktop.ini file ...

I have some questions though: what exactly is that "folder's data" Queue is talking about ? Are there any other settings ? Where can I find more info about this ?

Posted: Sun Jan 18, 2009 12:09 pm
by Queue
joby_toss wrote:I have some questions though: what exactly is that "folder's data" Queue is talking about ? Are there any other settings ? Where can I find more info about this ?
All I meant by ''folder data'' was ''file attributes'' in this case.

File attributes are part of the file system and, as far as I know, the attributes universal to all versions of Windows are Readonly, Archive, System, Hidden, Normal and Directory. All my batch file does is add the System attribute to the current folder, which is all that's needed to make Windows use desktop.ini for that folder.

Queue

Posted: Sun Jan 18, 2009 12:28 pm
by Local
Queue you're a lifesaver.
The only way I ever managed this was to change the icon with explorer and edit the ini file after, before that I noticed lockdir changed the folder icon so I used that before editing the ini.
Obviously both useless ideas for here (Although it it one good use for lockdir) but I never knew what attribute the folder needed so thank you for making a godawful task simple.

I'm now gonna change the cons for all my portable folders :)