Over the past few years, USB thumb drives have become very popular. They transfer files relatively fast (compared to CD’s), happen to be extremely small and unobtrusive, and plug into almost any computer with a USB port.
Personally, I have two flash drives on my keychain right now, and I can’t imagine how I ever got by without them. Thanks to the convenience of the modern thumb drive, I can copy documents or other important files onto a small drive that fits in a change pocket, and transfer them to another computer. This is in fact, what most people do with thumb drives–nothing special so far.
Using your flash drive as a backup and transfer device is great–but you haven’t really unlocked the potential of the USB until you’ve installed some programs on it.
Sites like PortableApps actually have pre-packaged applications that you can install directly to your USB drive. These apps, games, and utilities will run from your USB stick when you plug it into a computer(provided that they’re on the operating system the programs run on). Aibek compiled an excellent list of 100 Portable Apps for your USB Stick that I would recommend checking out if you’re looking for pre-packaged programs to put on your thumb drive.
So, you found a really cool application and there was no pre-packaged version of it anywhere on the internet that would install it to your USB drive. Looks like it’s time to learn how to create a portable app for flash drive. Please note: I’m not referring to U3 flash drives; that’s a different ballgame in several ways (even though they can be used much the same way).
The example application I’m going to make portable is Audacity, an open source audio editing program. You can download your own file, or follow along using Audacity (recommended for your first time) before you try this method on your own applications.
Step 1: Download the application setup file
If you’re following along, download the Audacity installation file. Make sure this download is relatively isolated or things will get confusing later.
Step 2: Download Universal Extractor and WinRAR
Download Universal Extractor and a program such as WinRAR. Install both programs–we need both to make this work. Make sure you allow both programs to associate with their respective file-types, and restart the computer if prompted–better safe than sorry. I didn’t need to restart, but it couldn’t hurt.
Step 3: UniExtract the Setup file
Right click your downloaded setup file (in my case, it’s Audacity) and click “UniExtract here”. Go ahead and specify a folder that you would like to extract the setup file to. A folder will be created with the extracted files inside. Open up that folder for the next step.
Step 4: Find the EXE file that runs the program
In that extracted folder, look for the .exe file that runs the program. It’s pretty easy to spot and usually has the same name as the program you’re trying to install. For instance, in my case, the .exe is named “audacity.exe”. Double click the file and verify that it runs the program successfully.
Step 5: Pack all the files into an archive
Highlight every file in that folder, right click on them, and click “Add to archive” in the contextual menu.
In the resulting dialogue box, name your archive “Audacity Portable” or whatever you prefer. Under compression method, select “Best”, and be sure to check “Create SFX archive”.
Next, click the ‘Advanced’ tab and click “SFX Options…”. In “Run after extraction” field, input the name of the .exe file that you located in Step 4. In my case, the name was “audacity.exe”.
Head on over to the ‘Modes’ tab and select “Unpack to temporary folder” and “Hide all”
Lastly, go to the ‘Update’ tab and select “Overwrite all files”. Now go ahead and hit OK, and watch WinRAR generate an application file.
Step 6: Copy the file to your USB drive
This step is pretty self explanatory. Drag the application to your USB drive (wherever you want it to be) and then give it a test run! Double click the application to run it–on any Windows machine! This version of Audacity is Windows only.
So to sum things up, we essentially found a file we wanted, extracted it, and then repackaged it with a few of our own preferences thrown in. Every time you click the application, it’s actually going to briefly unpack the file into a few hidden folders so that the .exe has access to the resources it needs. This means that the app takes about 2 seconds or so longer to execute (depending on the size of the app), but it will execute seamlessly.
What do you think? Did this process work for you? I personally like this method, but there are others out there that can also work (like copying the entire program folder from the program files directory). Unfortunately, the other methods I’ve tried have been unreliable.
The general rule of thumb for the method I’ve shown here is that if the .exe in step 4 executes successfully, the process will also be successful and you’ll be able to pack it all into an application file. I hope you enjoyed this article and found its contents useful. Let me know what you think in the comments section!