How To Create Your Own Portable App For A Flash Drive

Ads by Google

the swiss army knife   How To Create Your Own Portable App For A Flash DriveOver 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.

Ads by Google

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.

uniextract   How To Create Your Own Portable App For A Flash Drive

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.

archive   How To Create Your Own Portable App For A Flash Drive

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”.

archiveparameters   How To Create Your Own Portable App For A Flash Drive

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”.

AdvancedSFX   How To Create Your Own Portable App For A Flash Drive

Head on over to the ‘Modes’ tab and select “Unpack to temporary folder” and “Hide all”

modes   How To Create Your Own Portable App For A Flash Drive

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!

Ads by Google

21 Comments - Write a Comment

Reply

James

Good article! I have wondered before why there is no program that simply converts programs to flash drives, but this method worked fine for me. Thank you.

Reply

Jim Hubbard

The very best thing in this category is ThinApp (formerly known as Thinstall).

Unfortunately the pricing is insane. ($5,000 for the application suite and $39 per distributed application – called client licenses. The first 50 client licenses are free.)

The pricing is probably why you can readily find it on torrent sites.

I really wish there was an open source version of ThinApp. It would make application distribution a lot cleaner.

Reply

James

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.

Portable-Virtualized, I’ve yet to find any satisfactory method.

Paul Bozzay

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.

Reply

Guyver-8

Whoa there!

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.

Hope this helps…’portable is the way to go’

LOVE this site

Reply

Anand

nice post man , i will definitely try it….thanx

Reply

Guyver-8

Whoa there!

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.

Hope this helps…’portable is the way to go’

LOVE this site

Paul Bozzay

Hey–you’re right on this.

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.

Thanks for your comment and providing alternatives; very helpful!

Guyver-8

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.

Anyways…looking forward to your next post

Did i say i luv this site??? oh yea i did

Reply

codyc

This worked perfectly. Thanks! Doesn’t work on everything of course but far better than nothing.

For the registry issues, use a registry cleaner occasionally bam problem solved.

Good article

Reply

Altzan

Like others stated, this method looks great but might leave files behind on the computer.
Wonder if there’s a way to force a program to create temp files only on the thumbdrive itself…

Paul Bozzay

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.

Reply

hadi

I truly love this website, you guys have the coolest things good advice. Just FYI as mentioned above, a lot of the programs you use daily are are Torrent sites (just FYI ;)

Reply

Helctor

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.

Reply

Meena

well Really a nice trick, but does it work for Firefox??

Reply

Khalid

firefox already have a portable version
http://portableapps.com/apps/i
enjoy

Reply

Khalid

Thanks a lot for this wonderful post
Finally, I was able to convert TeXnic Center (a LaTeX editor) to a portable version.

Reply

Bob T.

Thank You Paul

For my experience in PC (that is very little) that was an important lesson,

I wonder if ther is a way to change the final icon to.

Bob.

Reply

Meena Bassem

well ,simply in the advanced sfx options dialoge, go to text and icon , and choose your icon, it might not work with some versions of winrar

Bob T.

thank’s Meena it was useful

Bob

Your comment