Zoinkity Posted May 6, 2009 Share Posted May 6, 2009 This may be useful for those people who use stuff cross-platform, like USB stick drives. Folder icons have stuck around from the win9x era all the way to Vista, but it seems no two versions expect the same thing. Here's the sure-fire way to ensure that your icon will be visible on every version.+_+ First, set both the "system" and "read-only" flags for the folder you're changing the icon from. To set the system flag you'll need to open a command window and type in something like this:attrib "FOLDERNAME" +s The system flag is required by win9x, but read-only is required by NT versions. Next, create a file inside the folder called "desktop.ini", traditionally set as system and hidden although this is questionably required. Here's a sample of what one should look like:[.ShellClassInfo]IconFile=notepad++.exeIconIndex=0IconResource=notepad++.exe,0 "IconResource" is Vista's means of finding icons and doesn't work XP and below. They expect the "IconFile" + "IconIndex" lines. If there is only one icon in the file, you can use just the IconFile line. In both of these examples it is included anyway. You can also use relative paths. Remember the path is from the current folder, so if there was an icon PopEye.ico in the directory above, you would type this:[.ShellClassInfo]IconFile=..\PopEye.icoIconIndex=0IconResource=..\PopEye.ico,0=_= Like any desktop.ini, you can also tack in other features such as InfoTips, set shell extensions, and other such nonsense, with varying degrees of sucess depending on what version you're using. Link to comment Share on other sites More sharing options...
Fredledingue Posted May 6, 2009 Share Posted May 6, 2009 (edited) Thanks for these informations.However bear in mind that folders set as system folder won't be defragmented (at least on w98 ).So if you do that, temporarily reset the folder attribute to normal before defragmenting.Also doesn't read-only means that it's read-only? I mean that you can write in it? Edited May 6, 2009 by Fredledingue Link to comment Share on other sites More sharing options...
Queue Posted May 6, 2009 Share Posted May 6, 2009 @Fredledingue:A folder being set as read-only has no bearing to Windows (as far as write/delete-abiltiy goes). It probably means, under DOS, a rmdir won't work on that folder, but I'm not positive.In the case of Flash Drives, being able to defragment or not doesn't matter. There are likely third party defragmenters that don't care about the folder's attributes for defragmenting purposes.@Zoinkitty:Are you positive read-only needs to be set for the icon to work? When you say NT, do you mean literally Windows NT, or the NT line (2000, XP, Vista) in general? As far as I know I haven't been setting my folders as read-only (intentionally) on my Flash Drive, and have never seen the folder icons not work, but I've never used it on a Windows NT machine (only 98SE, ME, XP and Vista).Queue Link to comment Share on other sites More sharing options...
RetroOS Posted May 7, 2009 Share Posted May 7, 2009 ... The system flag is required by win9x, but read-only is required by NT versions. ......@Zoinkitty:...When you say NT, do you mean literally Windows NT, or the NT line (2000, XP, Vista) in general?...Zoinkity posted "NT versions" plural, so he means the NT line in general. Link to comment Share on other sites More sharing options...
marxo Posted May 7, 2009 Share Posted May 7, 2009 (edited) Or you can try something like this: Edited May 12, 2009 by marxo Link to comment Share on other sites More sharing options...
dencorso Posted May 9, 2009 Share Posted May 9, 2009 (edited) The system flag is required by win9x, but read-only is required by NT versions. I wasn't aware of this! Thanks a lot, Zoinkity! You rock! [.ShellClassInfo]IconFile=..\PopEye.icoIconIndex=0I wish to add that Win XP (and all NT family OSes) requires IconIndex even when the IconFile is a single-icon .ico file, whereas Win 9X/ME doesn't mind if it's not there, in this case. If the icon is in a file that contains multiple icons, of course, both families do require the IconIndex entry, so as to be able to find the intended icon. Edited May 9, 2009 by dencorso Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now