You are here

I've figured out how to create portable launchers for apps that use the registry

25 posts / 0 new
Last post
mikesapunk
Offline
Last seen: 15 years 9 months ago
Joined: 2006-10-03 16:26
I've figured out how to create portable launchers for apps that use the registry

Yo,

The other day I stumbled on an article by a guy named j44xm that describes how you can use batch files and Window's command-line registry editor (reg.exe) to make ALL SORTS of apps portable. (Here's a link to the article).

I took his original idea and expanded on it to create compiled, stand-alone launchers for some apps I had lying around, and it seems to work flawlessly. I've only tried some small apps but I'd like to move-on to bigger things like Nero and Photoshop/Illustrator. I thought I'd share my progess so far though Wink

The way it works internally is the launcher "squirts" any registry keys the app uses into the host machine's local registry, then runs the app. Once the user exits the application, all those registry keys that were inserted are read-back out into a file that gets copied to the portable drive, and then the registry keys are deleted from the host machine.

This means that applications that use the registry for their settings will work from computer-to-computer (with the same settings intact), and no trace is left behind.

The first launcher I'm "releasing" is one for WinRAR (version 3.61 specifically , but older versions should work. I need testers!). I've tested it on 2 XP machines and so far and it seems to work fine. My settings were preserved on each machine, and no traces were left in the registry when I was done.

Just PM me and I'll email you the file (until I see if people are going to use these, and I set-up some permanent hosting space)

Inside the .zip file for the launcher are 2 files:

  • An executable called "WinRAR_Launcher.exe". You'll run this file instead of the real WinRAR executable.
  • A registry file called WinRAR.reg which is a "clean" snapshot of the registry settings (from when the app was first ran).

Just copy these 2 files in the same directory as WinRAR's main executable, and run the launcher.

Oh, to get the app onto your portable drive, I recommend installing WinRAR on your local hard drive first, then go to C:\Program Files\WinRAR and copying everything from that directory onto your portable drive. Then you can un-install WinRAR (or instead of installing it you can optionally use a program like Universal Extractor to get the files out of the installer, then copy just the '{app}' directory to your portable drive).

Somebody try it out and let me know if it works for you too!

mikesapunk
Offline
Last seen: 15 years 9 months ago
Joined: 2006-10-03 16:26
Oh, wait...

This site doesn't let you do PMs. Haha. Hold-on, I'll upload it somewhere and send a link.

mikesapunk
Offline
Last seen: 15 years 9 months ago
Joined: 2006-10-03 16:26
OK, Here's the Link

http://www.snap-computing.com/WinRAR_3.61_Launcher.zip

Try it out and tell me how well it works!

Deuce
Offline
Last seen: 11 years 10 months ago
Developer
Joined: 2005-12-24 16:32
It's Great that...

you learned somehting that helps you out in your portable apping travels. But just so you do know there are already programs, and templates that build launchers here on Portableapps. Here are the main three:

Registry Rapper
Portable Application Template
Quickport Template

Keep up the good work.

***********************************
Deuce {The Core}{Dev Blog}
Portable Software: Just the beginning.

Deuce
Portable Software: Just the beginning.

mikesapunk
Offline
Last seen: 15 years 9 months ago
Joined: 2006-10-03 16:26
Yeah...But...

Portable Application Template and Quickport Template aren't launchers, they're just NSIS scripts. I've voiced my opinion on this forum before that NSIS is NOT a programming language -- its a scripting language meant to create installers for real programs.

And from what I've read about RegRapper by googling it, its functionality is limited to working with applications that have entries in only 1 registry key. Plus, have you actually read that readme file that comes with Reg Rapper? Who has the time for all that mess? You have to jump through fiery hoops to get your app running on a portable drive.

Besides, NONE of them are anywhere near as easy as what I've built -- just drop the .exe and .reg in the same folder as the executable and run it. You don't have to learn NSIS, and you don't have to worry about fudging with Reg Rapper.

I had hoped that once I got a few of them made I could show others how to do it, and then I could start a site that has a repository of launchers -- just choose the app you want to run on your portable drive, then choose the version, download the launcher and go.

But then again, if nobody is interested, I'll just keep these to myself.

Its a shame that the first response I get is "good job, but 100 other people have already done the same thing" instead of "hey, I downloaded this, it worked great, and its a helluva lot easier than trying to use Reg Rapper or learn NSIS."

Lurking_Biohazard
Lurking_Biohazard's picture
Offline
Last seen: 3 years 11 months ago
Joined: 2006-02-18 18:06
Reg file.

I have a copy of Nero that uses this method. It won't work correctly on 9x PCs. Works great on 2K/XP PCs, though. Just thought I'd let you know. Wink

~Lurk~

~Lurk~

Deuce
Offline
Last seen: 11 years 10 months ago
Developer
Joined: 2005-12-24 16:32
That can be fixed...

Hey Lurk,

When you export a registry entry in Windows XP the title, or first line of the file, of the entry will look like this:

Windows Registry Editor Version 5.00

THsi is specific to XP, But in Windows 2000/98 and before it needs to look like this:

REGEDIT4

To fix your 98 problem, just change the first line to the second one, after export. This will allow the entry to import on any windows operating system, including XP as it is backward compatible. This will make it a universal entry, fixing your 98 problem.

If you have any problems let me know.

***********************************
Deuce {The Core}{Dev Blog}
Portable Software: Just the beginning.

Deuce
Portable Software: Just the beginning.

Lurking_Biohazard
Lurking_Biohazard's picture
Offline
Last seen: 3 years 11 months ago
Joined: 2006-02-18 18:06
Nice

Thanks for the very easy fix, Deuce!
On a side note... DAMN NFO Viewer Portable

~Lurk~

~Lurk~

Deuce
Offline
Last seen: 11 years 10 months ago
Developer
Joined: 2005-12-24 16:32
Okay...

First of all, I was, stress was, actualy happy that a new kind of launcher has arrived on the scene. I only mentioned the others so that you could possibly look at them and see if their is something you could use. This is a community trying to work together, BUT you seem to only care about the negative aspect of it. Which is that I was obviously was putting yu down, and that was NOT true.

Second, your opinion on NSIS is just that, your opinion. I understand it is a scripting language and noone has ever said otherwise that I know of, but I could be wrong. It might not be a programming language per se, but it does that same thing in the end, Compile to an EXE. MY opinion is why use a REAL programming language when the same thing can be done with a much simpler scri=pting language. But just as I said above, that is MY opinion. Others here have there own opinions too, so maybe instead of putting down a language just because it does not meet your specification of PROGRAMMING, you should just let people use what they want without persicution.

Third, Quickport and PAT have never said they were launchers, WE both, Klonk and myself, YES, that's right I wrote Quickport, made them just to help others out here who wanted to learn NSIS and make launchers themselves, get a leg up. This is a learning aspect that we ae giving the community. Next time think out of the box.

Forth, Yes I read Registry Rappers Readme, because I WROTE IT! I am the developer of registry rapper. I have taken a long hiatis from development because of my daughters birth, but it is still very much in development. But Liberta is probably going to overtake it in the end. The readme though is not as bad as you make it sound, again it is a learning experience, you are learning about the registry while using the progrma. My belief is that the people using it will probably be those coming to this site, not just some normal user on google. Later in time, I am going to make it user friendly. Next time keep an open mind about a program and possibly learn about it before you put it down.

I was never putting down your project, on the contrary I was trying to help, and even though I did not post about it, I did try it and think it is very good. I actually have a friend of mine using your launcher for his WinRAR version. But now...

Next time you want praise for something and not criticism or any other statement other than what you specifically want, DON't post, you will get all kinds of comments here. And also making statemnet such as "But then again, if nobody is interested, I'll just keep these to myself." after only one comment, makes me think you cannot take criticism and will lash out at anyone that goes against you beliefs, opinions, or wants. Not something we need here, because that is not commuity.

Think before you post next time.

***********************************
Deuce {The Core}{Dev Blog}
Portable Software: Just the beginning.

Deuce
Portable Software: Just the beginning.

Zach Thibeau
Zach Thibeau's picture
Offline
Last seen: 8 years 8 months ago
Developer
Joined: 2006-05-26 12:08
Ouch

Ouch talk about bringing out the double deuce, deuce I know who not to cross ^_^' I'm actually shaking with fear... I think I said too much now and I'll shut my mouth now

your friendly neighbourhood moderator Zach Thibeau

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 12 years 10 months ago
Joined: 2006-01-06 21:27
Woot!

Go Deuce!
I have used RegRapper on many occasions for a lot of apps for friends and I found it a lot simpler than making a script from start.
----
R McCue
Cube Games
People who didn't need people needed people around to know that they were
the kind of people who didn't need people.
(Maskerade)

"If you're not part of the solution, you're part of the precipitate."

participant
Offline
Last seen: 15 years 6 months ago
Joined: 2006-07-30 13:50
Well done

Well done mikesapunk,
WinRAR 3.61 is running fine here on Win XP + SP2, thanks a lot.
A registry entry is left on Win Server 2K3 though.
This comes in really handy with my portable Total Commander.
Thanks again Smile

mikesapunk
Offline
Last seen: 15 years 9 months ago
Joined: 2006-10-03 16:26
Thanks

Hey Participant,

I'm glad someone tried my launcher!
If you can tell me what the registry key is that gets left on 2003 (I don't have access to a 2003 machine), I'll include it in the next version of the WinRAR launcher. I don't *think* it will cause a problem on 2000/XP if that key gets created and then deleted each time, those versions just won't do anything with it.

I'll have to test and see the results. If it poses a problem, I'll include different versions of the .reg file and make the launcher dynamically load the registry entries depending on the OS of the current host system. Maybe I'll build then into the app as resources, so there's not a bunch of files. Decisions, decisions.

Anyhow, thanks for the feedback!

Klonk
Offline
Last seen: 10 years 4 months ago
Joined: 2006-04-21 03:08
Yes

I completely agree.

I haven't looked too deep into you program/script, but honestly this is the same what the templates do. You just have to define in to script which keys/files have to be saved.

What I could think of, but I doubt it would be possible with NSIS:
Run an application through a CreatorProg. The CreatorProg records which regkeys are written/accessed and saves them into a file. Same for working files/directories. And voilà you have a portable application.

This approach will give problems, as some application write registry keys during work (e.g. for saving configurations). So it would have to be always semi-automatic, i.e. you will always have to check the recognized configuration.
It might help creating a portable application, yes, but so can regmon and filemon from sysinternals...

@mikesapunk: Please do not misunderstand me: If it works great, keep the work up...

mikesapunk
Offline
Last seen: 15 years 9 months ago
Joined: 2006-10-03 16:26
Deuce, Sorry if I offended

Deuce,

Sorry if I offended you, I didn't know you were the author of Reg Rapper and had worked on the other applications. All I know about reg rapper is from what I've read about it on the web, I should have given it more of a fair shake.

The fact is, I'm just trying to give people an easy way to launch normally "non-portable" (because they write to the registry) applications from portable drives. I thought if I created custom launchers for applications and distributed them freely, I'd be contributing to the community.

I'm not trying to be negative, and I would love to hear honest and constructive feedback on how well (or how bad) my programs work from people who have actually tried them.

Your comment just rubbed me the wrong way because I took it as "we already have an application for this. Its called Reg Rapper. You're just wasting your time".

Don't get me wrong, I'd love to see Reg Rapper mature and become easy to use and work well. I'm doing essentially the same thing, but I have to work on applications one at a time. A program like Reg Rapper that could dynamically find registry entries created by ALL apps and back them up would be awesome! It is much more efficient than individual launchers. So for now, you keep working on Reg Rapper, and I'll keep working on my launchers. Who knows, maybe we'll meet somewhere in the middle.

Keep up the good work,
-Mike

mikesapunk
Offline
Last seen: 15 years 9 months ago
Joined: 2006-10-03 16:26
NEW Launchers

Hey gang,

So I live in St. Louis, and my Cardinals are going to OWN those stinkin' tigers, but (if you're following the World Series), it rained last night Sad

Sooo...I had a chance to work on some portable launchers for other apps that I use.
Give these a shot if you're feeling adventurous, if I get enough response I'll make more launchers and maybe even start whipping-up a website to store/catalog these things.

BTW, and I know I've already said this, the easiest way I've found to get these apps on your portable drive is to just install them locally (on your C:\ drive) first and then copy the files to your portable drive. Throw the launcher's .exe and .reg file in the same directory, and go! You can then un-install the application from your local drive, you don't need it anymore.

Here's the launchers I've made so far:

DVDDecrypter 3.5.4.0:
http://www.snap-computing.com/DVDDecrypter_3.5.4.0_Launcher.zip

IsoBuster 1.9.1:
http://www.snap-computing.com/IsoBuster_1.9.1_Launcher.zip

Universal Extractor 1.3.1:
http://www.snap-computing.com/Universal_Extractor_1.3.1_Launcher.zip

WinRAR 3.61:
http://www.snap-computing.com/WinRAR_3.61_Launcher.zip

If you don't have the EXACT same versions listed here, still give it a shot. It should work fine, as long as the executable name is the same, and the registry entries are made under the same key names.

Let me know what you think,
-Mike

participant
Offline
Last seen: 15 years 6 months ago
Joined: 2006-07-30 13:50
Right ....

These entries are left on Win 2K3
-----------------
[HKEY_CURRENT_USER\Software\Winrar]
[HKEY_CURRENT_USER\Software\Winrar\Compression]
[HKEY_CURRENT_USER\Software\Winrar\Extraction]
[HKEY_CURRENT_USER\Software\Winrar\FileList]
[HKEY_CURRENT_USER\Software\Winrar\FileList\FileColumnWidths]
[HKEY_CURRENT_USER\Software\Winrar\Formats]
.... and so on.
-------------------------
I have been pondering over one thing though, if the launcher isn't supposed to leave any traces behind, why WinRAR icons are still present upon closing the launcher (?)
So this means the classes have been set and indeed this is what I have found under .zip for instance.
-----------
[HKEY_CLASSES_ROOT\.zip\ShellNew]
"FileName"="c:\\Program Files\\TC\\totalcmd\\Progs\\WinRAR 3.61\\zipnew.dat"
-----------------
Is the launcher meant to be working this way mate ?

mikesapunk
Offline
Last seen: 15 years 9 months ago
Joined: 2006-10-03 16:26
Hmmm...

Hey Participant,

Thanks for the quick response. Did you already have WinRAR installed on that machine?
There are 2 clues that are making me think either you already have it installed on that box, or something weird is going-on (maybe my launchers don't work on 2K3):

  • The "FileName" in the ShellNew key points to your local drive, which means the system thinks WinRAR is installed locally (it should be the drive letter of the portable drive)
  • All of the registry keys you listed (except the ShellNew) are listed to be backed-up/removed when the launcher exits. Pop-open the WinRAR.reg file and you'll see them.

If those registry keys were originally found on the system (from a local installation), the launcher will not remove them after it exits. Otherwise, it would screw-up the local installation!

If you installed WinRAR just to copy it to the portable drive, maybe you ran the application locally before copying to the portable? That could be the issue. Or maybe you still have it installed. Try uninstalling it and re-running it from the portable drive. Then let me know if the registry keys are deleted.

Oh, and P.S., good find on the HKEY_CLASSES_ROOT\.zip\ShellNew key -- I didn't catch that one! I'll include it in the next version of the WinRAR launcher

thanks,
-Mike

participant
Offline
Last seen: 15 years 6 months ago
Joined: 2006-07-30 13:50
Well ...

Win 2K3
I installed WinRAR locally, copied the content to another location ( doesn't have to be a movable device, does it? ) and removed the original installation then.
[HKEY_CURRENT_USER\Software\Winrar] remains there upon closing the launcher though.

Win XP SP2
I am using the portable WinRAR ( with the launcher ) from Win 2K3.
I found some entries that made Win remember the icons as it were:
----------------------
[HKEY_CLASSES_ROOT\WinRAR]
@="WinRAR archive"

[HKEY_CLASSES_ROOT\WinRAR\DefaultIcon]
@="c:\\Program Files\\TC\\totalcmd\\Progs\\WinRAR 3.61\\WinRAR.exe,0"

.... and so on.....
--------------------------

[HKEY_CLASSES_ROOT\WinRAR.REV]
@="RAR recovery volume"

[HKEY_CLASSES_ROOT\WinRAR.REV\DefaultIcon]
@="c:\\Program Files\\TC\\totalcmd\\Progs\\WinRAR 3.61\\WinRAR.exe,1"

...and so on....
-----------------------------
[HKEY_CLASSES_ROOT\WinRAR.ZIP]
@="WinRAR ZIP archive"

[HKEY_CLASSES_ROOT\WinRAR.ZIP\DefaultIcon]
@="c:\\Program Files\\TC\\totalcmd\\Progs\\WinRAR 3.61\\WinRAR.exe,0"

...and so on...
------------------------------
I deleted those entries and now everything seems to be working the way it should Smile
I can't quite remember but I might have had WinRAR installed one day on partition C:\ and I must have neglected the left registry entries after having removed the application.
I am constantly trying portable software and that might be the reason I guess.

Deuce
Offline
Last seen: 11 years 10 months ago
Developer
Joined: 2005-12-24 16:32
Quick note..

So you don't have any support questions later, the HKEY_CLASSES_ROOT key, can only be written to or manipulated by an admin on the local, machine. So if a user goes to say a library pc, they will not be able to get that registry key to import. 1 of two things will happen, if will just fail and not tell, start the program anyway, just without the file ext. or the program will choke and fail. Just some friendly thoughts to consider during your coding and testing phase. I figure I save you alot of headaches trying to figure it out, I know it gave me headaches. Smile

***********************************
Deuce {The Core}{Dev Blog}
Portable Software: Just the beginning.

Deuce
Portable Software: Just the beginning.

chezduong
Offline
Last seen: 1 week 6 days ago
Joined: 2006-12-06 04:01
Other Registry Keys that need Admin priveliges?

Wow, interesting. Other than HKEY_CLASSES_ROOT, which other registry keys need Admin privelges to access?

This would be nice to know when using PAT 1.4 or other registry wrapper tools.

Deuce
Offline
Last seen: 11 years 10 months ago
Developer
Joined: 2005-12-24 16:32
The only one...

That you can write too without any problems under a noprmal user is HKEY_CURRENT_USER. One way or another all the others are admin in some way. The HKEY_LOCAL_MACHINE is completely locked to admin users.

***********************************
Deuce {The Core}{Dev Blog}
Portable Software: Just the beginning.

Deuce
Portable Software: Just the beginning.

J44xm
Offline
Last seen: 15 years 4 months ago
Joined: 2005-12-13 17:05
Glad to see that you expanded on my idea

Hello. I'm pleased that my simple method was able to inspire you to create something better. Sounds like you've got a good idea going. Keep it up! I'm always looking forward to more portable applications!

-- J44xm (http://j44xm.notlong.com)

J44xm
Offline
Last seen: 15 years 4 months ago
Joined: 2005-12-13 17:05
[double-post removed]

[double-post removed]

WilSteele
Offline
Last seen: 15 years 7 months ago
Joined: 2007-01-04 15:32
WinRAR Portable

I think there has been a portable winRAR for some time. At least I know I have a copy of one. Got it off of an old Gov pc here in Canada and I use it to work on older systems that I recycle for those who can't afford new ones. It was just on this old IBM 300gl and I just copied the winRAR folder from the hard to a floppy, put the floppy in the pc and use winRAR from the A drive. No other steps necessary.

Topic locked