Portable Folder Icons For my applications

Discuss anything related to portable freeware here.
Post Reply
Message
Author
donald
Posts: 561
Joined: Wed Dec 19, 2007 4:14 am
Location: knoxville TN USA

Portable Folder Icons For my applications

#1 Post 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?

User avatar
Queue
Posts: 197
Joined: Mon Oct 08, 2007 2:41 am
Contact:

#2 Post 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

donald
Posts: 561
Joined: Wed Dec 19, 2007 4:14 am
Location: knoxville TN USA

About the batch.

#3 Post 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.

User avatar
Queue
Posts: 197
Joined: Mon Oct 08, 2007 2:41 am
Contact:

Re: About the batch.

#4 Post 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

chezduong
Posts: 67
Joined: Mon Jan 15, 2007 6:14 am

NirExt

#5 Post 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.

donald
Posts: 561
Joined: Wed Dec 19, 2007 4:14 am
Location: knoxville TN USA

Can it also be moved?

#6 Post 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.
Last edited by donald on Thu Jan 15, 2009 9:06 am, edited 1 time in total.

User avatar
Kranor
Posts: 120
Joined: Sun Jan 14, 2007 7:15 am
Location: uk

#7 Post 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'

chezduong
Posts: 67
Joined: Mon Jan 15, 2007 6:14 am

#8 Post 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

User avatar
joby_toss
Posts: 2970
Joined: Sat Feb 09, 2008 9:57 am
Location: Romania
Contact:

#9 Post 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 ?

User avatar
Queue
Posts: 197
Joined: Mon Oct 08, 2007 2:41 am
Contact:

#10 Post 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

User avatar
Local
Posts: 238
Joined: Fri Aug 03, 2007 3:48 am

#11 Post 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 :)

Post Reply