Instructables

How to make an Autorun.inf File

Step 3: An Autorun file with extra Commands

The previous steps just messed with the name, icon, and actions of the USB drive. Now, I will show you how to add extra commands to the USB drive. These commands will show up when you right-click on the USB drive.

If you lose your USB drive often, you should 1) buy a keychain for it and 2) add this to your Autorun file:

shell\lost\command=Lost.bat
shell\lost=Help! I'm Lost

NOTE: This command is not only for a lost USB drive. You can make it anything you want.

shell\lost\command=: This is the file that will open when you click on the "Help! I'm Lost" command.

shell\lost=: This is what the name of the command is. Look at the picture for more information.

Also, the computer does not have a file called "Lost.bat" already on it (duh). You will have to make one. This is some good code for the batch file:

:top
@echo off
title Please Return Me!
cls
echo I have been lost! Please return me to my owner!
echo 1234 Second St. Small Town, America, 12345
echo 1-555-555-5555
echo return-me-please@gmail.com
pause
goto top

I have written this code so that if someone presses a key (like the file asks you to, see the screenshot), it will simply repeat itself! It will continue to do this untill the finder of the drive closes out of the CMD window.

PLEASE make sure that you replace the info with your actual address, phone number, and email (unless you happen to live at 1234 Second Street, Small Town, America, 12345).

There are countless possibilities that you can place here. Also, you can insert more than one, so you could have a "Help Me" option, a "Hello" option, and a "Destroy the Earth" option. Have fun with that (and be legal!).
 
Remove these adsRemove these ads by Signing Up
fahmad31 year ago
The problem is windows 7, I tried on win XP and it worked fine, it also works for vista
fahmad31 year ago
The icons are fine but this isnt working, please help
fahmad31 year ago
This isnt working
I created an autorun like this:
[autorun]
label=gta_san
icon=icon.ico
shell\lost\command=Autorun.exe
shell\lost=Install
bbonnema2 years ago
I can't seem to get this function to work. Does anyone know where these files are supposed to be placed?.
jvpernis3 years ago
can you remove a "shell" with notepad to remove e.g. format? (this is, so you can't erase the data of the USB if you have a program on it and no back-up or something) nice instructable anyway
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!