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.

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!

Your email address will not be published. Required fields are marked *

Comment

Name *

Email *

y p shrivastav

August 14, 2017 at 6:56 am

pl refer to post of Nitish . i also find that sometimes after extracting setup file , i dont get any .exe file . only some folders come up. even there is no .exe file in those folders either . please suggest how to make portable of such programs. thank you very much

pl refer to post of Nitish of 15/06/2016. i am not able to read your reply to his post. i also find sometimes that after extracting a program file , i do'nt get any .exe file . only some folders come. there is no .exe file in those folders either. please guide as to how to portable in such cases . thanks.

When I copy the Portable file to my USB drive and double click on it, it says "Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item." Please help!

It really worked thank you.But some setup files were not able to be extracted like browsers, some antivirus software,video editing software.....handbrake didnot work even after creating sfx archive ..plz suggest a method to solve these.

Funny thing: Audacity (v1.3.1 and up) is natively portable. Just create a folder named "Portable Settings" in the same parent folder as "audacity.exe". That's it!
Similar solutions are available for other apps, too.

That would be the ideal solution Altzan; I did some looking and didn't find anything (yet). It's all going to depend on the programs that you convert..(some don't leave anything behind, while others edit registry values). Could probably edit the permissions of the .exe file so that it cannot edit registry, etc, but it'd probably hamper the program a bit. Food for thought, I'll see what I can come up with.

In retrospect, it wouldn't be too hard to write a .bat file that runs a registry scanner in the background after USB apps are run--this could be a temporary fix.

The advice given will most likely end in tears for a lot of people...if a program creates registry entries your method will at best leave rubbish in the host computer's registry...at worst it will overwrite existing registry keys and the host computer won't function properly after you've removed your USB device.

If you want to make a portable app, you need to first know what the program does when run.

Here are some of the best sites for portable apps
portablefreeware.com
PortableApps.com
Lupo pensuite
Pendriveapps.com
winpenpack.com

The portablefreeware site is especially useful as it has a massive database of programs that are or can be portable and with full details (registry writes, unicode, os support) for each program.

The search function will even show programs not in the database but which have been discussed in the forums.

Although I have been doing this for a while and have never seen a repercussion of any sort, I agree with your statement--it's not the safest, greenest option.

Frankly however, if you run a registry scanner weekly like I do, it should get rid of the "loose ends" left behind by programs like this and you should be good to go. See the comment I made on a comment above about some instances where you might be able to use the content in this article with no repercussions; just some ideas.

Hey right back at cha'
Think 'Portable'...it's not your computer you need to worry about.

example.
You use your usb on your best mate's computer and the program you run hijacks a ton of file associations, you run a reg cleaner and now the computer has no program linked to those file types and you've lost your best friend.
(...well ok not lost)

I don't think there is a single program out there without at least one decent portable alternative.

so..
1) contact the author of the program you want portable.
2) see if there are viable alternatives.
3) if you must have it...first install and run the program in a virtual space (sandboxie is probably easiest but there are a number of virtual pc programs out there) to see what the program does.

Then the usual method is to build a 'wrapper' to execute the program and tidy-up afterwards this could be done with a .bat or use something like AutoIT or my pref AutoHotKey.

The advice given will most likely end in tears for a lot of people...if a program creates registry entries your method will at best leave rubbish in the host computer's registry...at worst it will overwrite existing registry keys and the host computer won't function properly after you've removed your USB device.

If you want to make a portable app, you need to first know what the program does when run.

The process looks simple enough; however, how do I know if keys are being added to the registry of the host computer a bunch of "trash" left behind? The theory with a true, stealth portable application is its cleanliness. Green apps leave nothing behind need nothing from the host.

Thinstalled apps may appear appealing, but many applications, say VirtualBox, Hamachi, etc. can't be successfully created. In making several thinapps, I realized a dedicated machine works best (no other software installed other than the OS) and not all apps can be virtualized.

You're correct; depending on the program and the settings that you input to that program, it might clutter your registry.

I'd recommend for now, getting a registry cleaner; the purpose of this article wasn't a solve-all solution. Rather, it's to give you the ability to run an app somewhere else if you need, without having to run an installer on a host machine.

For instance, at my community college there are a lot of computers that reboot to a clean image every night at 11. For me, being able to plug in a USB and run an app that may add registry values does NOT matter because the PC will restore to its original image that night. The same goes for most library PC's, etc. This article gives you the tools to take apps onto computers like that and use them when you want.