When I used my USB stick to install Ubuntu, the USB appears with an Ubuntu icon in My Computer.

Is it possible to customize this icon to something I want?

  • PriestVallon, is there a reason why you accepted and then revoked your decision? If my answer did not answer your question, please leave a comment so the community or I can address any related issues. Thank you. :) – iglvzx Jul 10 '12 at 16:55
  • I accepted but then I thought I better check to make sure it works before I accept it. I haven't had time to check. So there's nothing wrong with your answer I just have to try it. – PriestVallon Jul 10 '12 at 18:25
  • Okay. That makes sense. Let me know if you run into any problems with this solution. – iglvzx Jul 10 '12 at 18:35
  • Side question, will this method work for Ubuntu and OSX? – PriestVallon Jul 10 '12 at 21:45
  • 1
    I don't know. Autorun.inf is a Windows convention. However, it would not be difficult for other OS's to read only parts of the Autorun.inf file, such as icon and label, and then work with that information. – iglvzx Jul 10 '12 at 21:51

Yes. You can customize the icon and label as shown by Windows Explorer by editing (or creating) the Autorun.inf file in the root folder of the removable drive.

The path for the icon is relative:

Label=My Drive

Note: After making changes to (or creating) the Autorun.inf file, you may have to eject the drive and reconnect it for changes to reflect.

See also:

| improve this answer | |
  • 1
    and don't forget to put my_icon.ico file at drive root if you use above code for autorun.inf – tumchaaditya Jul 10 '12 at 4:40

Another way to accomplish this is to use desktop.ini. (Actually, on USB drives, I use both autorun.inf and desktop.ini). This technique has the virtue that it also works for individual folders. Simply create your desktop.ini file with contents similar to:

InfoTip=Some descriptive text here

Where I have a folder called "icons" which contains an assortment of icon files. I can then customize this (and autorun.inf if needed) as the need arises to display an appropriate icon. Also, when you mouse over the folder icon, your descriptive text will be displayed.

You'll also want to set the "system" and "hidden" attributes on the file (desktop.ini) to make sure that Windows gives it the special treatment that it deserves. You can do this in the GUI or with the command:

attrib +s +h +r desktop.ini

For more information on desktop.ini, see this MSDN article.

| improve this answer | |
  • 1
    I would suggest this method and creating autorun.inf as folder instead of a file to protect the usb drive from some malware/virus. This way they can't create an autorun.inf file to do their dirty stuff. – Mavromatis Lozay Jul 10 '12 at 21:24
  • 1
    Actually precisely by security reasons I have chosen to take no action when an usb is inserted, so autorun.inf would not work – მამუკა ჯიბლაძე Feb 3 '15 at 17:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.