Creating an Icon, Shortcuts, and Auto Execute Commands for a USB Flash Memory Device
by kirk.cieszkiewicz in Circuits > Microsoft
5783 Views, 8 Favorites, 0 Comments
Creating an Icon, Shortcuts, and Auto Execute Commands for a USB Flash Memory Device
The fairly easy way to amaze people with your fancy flash drive! (for Windows)
Alright, first: You need some form of removable storage (not necessarily USB, but it's nice)
Now, insert the removable storage, and open a text editor (ie. notepad++ or notepad)
Type:
07EF:0001:0001:0001
[autorun]
Creating a Custom Label
Now, to create a custom label, type:
label="Your Label Here"
label="Your Label Here"
Creating an Icon
Note: I highly suggest you save the Icon to the device, otherwise there is a large chance this will not work on other machines (unless you are using Windows native Icons)
Type:
icon="Your icon file here.ico"
Note: You can use icons embedded in a *.dll file by placing the dll file under the icon tag, and then icon index
ie. icon="shell32.dll, 5"
(random number)
Bitmap (*.bmp) files are also supported for this action (but not recommended)
Type:
icon="Your icon file here.ico"
Note: You can use icons embedded in a *.dll file by placing the dll file under the icon tag, and then icon index
ie. icon="shell32.dll, 5"
(random number)
Bitmap (*.bmp) files are also supported for this action (but not recommended)
Creating an Auto Execute Command
Now, this is not necessary, unless you wish to have some app open.
type:
action="Message to be displayed to describe app being run"
NOW, there are a couple options.
You could have the app only show up in Autoplay, or run when the device is opened from "My Computer"
Autoplay option:
open="App to be opened.exe"
Run on open from "My Computer":
shellexecute="App to be opened.exe"
Creating Shell Commands
Alright, Shell Commands are little shortcuts that will pop up when you right click on the device in "My Computer"
type:
shell\exampleshortcut=Description of app
shell\exampleshortcut\command=App.exe
You can use as many of these as you want, as long as the identifier is unique in each case (the "exampleshortcut" part)
Note: You can place and ampersand (&) before the desired character if you wish to have a keyboard shortcut for the command
SAVE
Save the file you just created as "autorun.inf" to the parent directory of the desired device
Note: changes will not take effect until you eject, and then re-insert the device into the computer
Also: There is much more you can do with autorun files, but that's more advanced stuff about identifiers and misc stuff (not really that important)
Note: changes will not take effect until you eject, and then re-insert the device into the computer
Also: There is much more you can do with autorun files, but that's more advanced stuff about identifiers and misc stuff (not really that important)