Ddes Posted June 23, 2009 Share Posted June 23, 2009 I got fed up with constantly re-flashing my drive, so I wrote this little batch script. Just set it up to be autorun in the usual way. If you want it to be silent, compile it with quickbfc as a ghost application. What it does is, provided you have a file named "u3id.txt" at the root of your flash drive, execute all files in the folder "e" on that drive. So, provided the files aren't deleted by an antivirus, it's extremely easy to change your working payload, even on a machine without the universal customizer - just change which exes or bats are in that folder. A few caveats: 1. Folders will try to execute and fail, and the program will continue. Still, you probably don't want to put folders in the "e" folder. 2. It'll open any files in the folder, so make sure all you have is programs. Execution will stop until the files are closed. 3. Execution will not continue until previous items have finished executing, so order file names with higher-priority items first and anything that takes a long time to execute last. On linux I'd use nohup to solve this; I know of no windows equivalent. If anyone does that'd be grand. 4. Batch scripts and command-line programs will run within the window, meaning if the script is silent the batch files will be too. 5. Nothing in subfolders will execute. 6. Spaces and semicolons in file names may or may not work. @echo off for %%i in (Z Y X W V U T S R Q P O N M L K J I H G F E D C B A) do ( if exist "%%i:\u3id.txt" ( set fd=%%i:\e\ goto drv ) ) goto end :drv for /f "delims=;" %%i in ('dir /B "%fd%"') do ( %fd%%%i ) :end Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.