Site hosted by Angelfire.com: Build your free website today!

About Me
Portfolio
Resume
Contact

Simple Flash Drive Swag Trick

Okay, this idea actually comes from work, but I figured I would write up a short tutorial on it as I probably will need to do this again in the future. This is create for making flash drives to give away at events, or even give them away at Open House events. What I am talking about is creating a small utility that will allow a user to open your webpage, document, or any application that you would like straight from a standard Usb Flash drive, just as if it was a CD. Some of these techniques I am discussing here on ways to customize the name, icon, etc for the flash drive can also be used for your hard drives, portable storage devices, and pretty much anything that a computer would read.

1st Step: We are going to create a simple logo to use when people go to open the USB drive. You can use several programs to accomplish this, for right now I am going to be using Photoshop CS3 with a .ico Save File plugin you can pick it up and read on installation instructions here.

I chose my family's crest for the logo for this tutorial, but you can use pretty much anything, just keep in mind the that more complicated the colors you mix into the logo, the harder for it to render properly it is going to be. Logo creation is arduous and difficult so take your time, be patient, and try to have some fun with it.

You can save these logos in two formats Windows Vista will accept .PNG files for logos, but older versions of windows will only accept the ICO format. Make sure to save your file as a psd too if you wish to come back and edit it later.

The next step is writing the autorun.inf file. You can find this file on almost every cdrom out there today and it is going to be the key to making this all work properly. You will also be needing a tool to open the webpage if thats what you plan on doing. You can use this simple .exe(browsercall) file to do it or if you want to run a program I will get into that a little bit later in this tutorial. You can visit the Wikipedia page on this file's structure here. For now this is that we are going to right:

[autorun] ~~MUST BE AT THE TOP OF EVERY AUTORUN.INF FILE
label=Chris McIntosh Designs Flash Drive ~~ This will set the label of your drive
icon=chrisMcintosh.ico ~~ This is the location of your icon to use for the drive
open=browsercall.exe http://chrismcintoshdesigns.angelfire.com
~~ change this to your url, it is called when your OS first recognizes the drive.

action=Chris Mcintosh Designs ~~ Describe to the user what actions they can take
shell=browsercall.exe http://chrismcintoshdesigns.angelfire.com
~~ this occurs when the user opens the device
shellexecute=browsercall.exe http://chrismcintoshdesigns.angelfire.com ~~ same as above, this is kind of a double check to make sure that windows will ask the user if they wish to see your page

That is all that there is to this little project. The next thing you will need to do is hide all of the files on the drive. In windows this is simple as selecting and right-clicking the file, going to properties and selecting hidden file type.

For macs you will need to write a .hidden file and this is a list of all the files you wish to hide in the Mac OS, it is depreciated, but still works for all versions of macs that i know of and I believe it also works in linux/unix as well. Make sure you hide this in windows too. And that is how you create your auto running flash drive. For more advanced things like running programs, games, flash movies it is only a matter of changing the open, shell, shellexecute files in the autorun.inf file. Enjoy and i hope it is useful to you. For any questions or if it sounds like to much work, you can email(c_mcintosh@hotmail.com) me.