Help with JauntPE

Discuss anything related to JauntePE, the utlimate utility to help you tame non-portable applications. Share your experience about the apps that work with JauntePE, and the apps that don't.
Message
Author
ZergFood
Posts: 34
Joined: Wed Feb 25, 2009 7:29 am
Location: Romania

#16 Post by ZergFood »

First of all, your example above redirects the filesystem too, not just registry -- if your app doesn't write to "special folders" (such as "Documents and Settings" or other folders like this) then you can disable it. i.e delete the

Code: Select all

[Filesystem]
Use=1
Data=.\JPE\
and delete the

Code: Select all

RedirWFS=1
&

Code: Select all

AppWFS=1
From the [Launch] section. WFS = filesystem. (if you want details you can look at the slightly confusing manual -- for a newbie at least :))

In your example, the registry redirection is generic:

Code: Select all

[Registry]
Use=1
Data=.\JPE\jauntePE.reg

[RegistryExclude]
1=HKEY_LOCAL_MACHINE\Hardware
2=HKEY_LOCAL_MACHINE\Security
3=HKEY_LOCAL_MACHINE\System
4=HKEY_PERFORMANCE_DATA
5=HKEY_DYN_DATA

[PortableRegExclude]
1=HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer
2=HKEY_CURRENT_USER\Software\Microsoft\Windows
3=HKEY_CURRENT_USER\Software\Microsoft\Windows NT

[PortableRegInclude]
1=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets
This does the following:

It redirects ALL of the registry, EXCEPT the following keys:

HKEY_LOCAL_MACHINE\Hardware
HKEY_LOCAL_MACHINE\Security
HKEY_LOCAL_MACHINE\System
HKEY_PERFORMANCE_DATA
HKEY_DYN_DATA

In other words, the above keys are the only ones that are written to the real registry. This isn't very optimized, because your app may only use a simple key in Software\AppName most probably.

Then:

Code: Select all

[PortableRegExclude]
1=HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer
2=HKEY_CURRENT_USER\Software\Microsoft\Windows
3=HKEY_CURRENT_USER\Software\Microsoft\Windows NT

[PortableRegInclude]
1=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets
This isn't very useful, except for Windows Applets (like Notepad & stuff like that), so it's not required.

Now, let me walk you step-by-step through a simple .ini file so you can understand how to do it from 'scratch'. I'll ignore the [Redirection] section as it's understandable from the manual (you can read that, not very confusing). The only thing I'll stress out of that section is MemRegistry. Set it to some value that puts the registry in memory. 4 & 5 are read-only (i.e never written back to disk), 2 & 3 keep it in memory, but write it on application end to disk. 2 is text-mode, 3 is binary-mode (i.e how the .reg file stores the reg keys, in text or binary). Same for 4 & 5.

For example:

Code: Select all

MemRegistry=3
will make it read the entire registry of the app in memory when it starts (usually it's very small), do stuff with it, and write back to it on application end. Also it will keep it in binary format (replace it with '2' if you want text-format -- although binary is faster).


Now let's get to the actual registry redirection. You should think of JauntePE as redirecting the entire registry writes, by DEFAULT (i.e if you don't put anything in the .ini file). This section:

Code: Select all

[Registry]
Use=1
Data=.\JPE\jauntePE.reg
tells it to use registry redirection (Use=1), and to put the portablized registry in a file called jauntePE.reg in a subfolder called JPE (.\ means "current folder" in Windows).

For example, if you want to place it one level above the current folder (..\ in Windows means one level above), and call that file "registry" WITHOUT any extension (just an example), you would put:

Code: Select all

[Registry]
Use=1
Data=..\registry
and the portablized registry would be located one level above in a file called "registry" without any extension.

Now, like I said before, jauntePE by default redirects ALL registry usage. You want to redirect only a given key, let's call it HKEY_CURRENT_USER\Software\MyApp in this example.

First you have to tell JauntePE to exclude ALL the registry (i.e not to redirect ANYTHING). In effect this is like disabling registry redirection:

Code: Select all

[RegistryExclude]
1=*
1=* means all of them. RegistryExclude excludes the keys that you do NOT want to redirect. This tells it to exclude all.

Now, after they have all been excluded, we can include the ones we want back in. For example, to include HKEY_CURRENT_USER\Software\MyApp in the redirection (else why do we use jauntePE if we don't redirect anything :lol:), use RegistryInclude:

Code: Select all

[RegistryInclude]
1=HKEY_CURRENT_USER\Software\MyApp
You can also put another key, if you want to redirect that as well, for example:

Code: Select all

[RegistryInclude]
1=HKEY_CURRENT_USER\Software\MyApp
2=HKEY_LOCAL_MACHINE\Software\MyApp
I hope you get it. It's quite simple. You first tell it to exclude all registry from redirection (as by default, it redirects EVERY key), and then include back the ones you want (specific for your app).

The .ini (without the [Launch] and [Redirection] sections, please look in the manual for those -- they have very many parameters you can tweak to your needs, and aren't hard to understand) looks like this:

Code: Select all

[Registry]
Use=1
Data=.\registry.reg

[RegistryExclude]
1=*

[RegistryInclude]
1=HKEY_CURRENT_USER\Software\MyApp
2=HKEY_LOCAL_MACHINE\Software\MyApp
Of course assuming you want the virtual registry to be put into the registry.reg found in the current folder (.\ means current folder).

This redirects only the two keys in the RegistryInclude section -- in effect, what we wanted and optimized ;)


EXTRA: let's get into PortableRegExclude with a practical example. Suppose that this app of yours, MyApp, writes its settings to: HKEY_CURRENT_USER\Software\MyApp\Settings. It's ok, it's redirected as we have done above.

However, let's say that this app also writes the "recent documents list" into HKEY_CURRENT_USER\Software\MyApp\RecentList and you do NOT want this stored in your portable registry (and of course, not in the real registry either!).

Suppose you want to make this subkey (RecentList) read-only so that the app does NOT write to it, but allow it to write to "settings" if you change any of course. So, we've redirected the application's keys to our registry.reg, but it still writes it's "recent documents list" into that subkey.

We can tell jauntePE to Portably Exclude (so to speak) SOME of the ALREADY redirected keys/subkeys from being written to. We do this with [PortableRegExclude] (that's what it does). In this example, since we want the settings to be able to be written to (in our redirected registry.reg of course) but we don't want the "Recent Documents List" ever to be written to our registry (and neither the real registry), then we do the following:

Code: Select all

[PortableRegExclude]
1=HKEY_CURRENT_USER\Software\MyApp\Recent
By default, in this case, JauntePE makes ALL REDIRECTED registry as being write-able (i.e it writes them if modified, at application end). But we can "exclude" the ones we do not want to be written to. EVER.

Note that, in case you want by default JauntePE to exclude ALL of them from being written to, you use:

Code: Select all

[PortableRegExclude]
1=*
and then put the ones you want to be written to with [PortableRegInclude]. For example, if our app writes its recent documents list to multiple keys, or we only want the "Settings" subkey to be written to, we do the following:

Code: Select all

[PortableRegExclude]
1=*
[PortableRegInclude]
1=HKEY_CURRENT_USER\Software\MyApp\Settings
This tells jauntePE to make ALL of the REDIRECTED registry (in the RegistryInclude section, above (before the PortableReg examples)) and make it temporary -- i.e NEVER written to disk at all.

EXCEPT the values in the PortableRegInclude, which in our case, is the Settings subkey. Therefore the above can be interpreted as: "JauntePE, none of the redirected registry keys should be written into the registry.reg file (i.e all of them are "scrapped" or "flushed into void"), EXCEPT the HKEY_CURRENT_USER\Software\MyApp\Settings".

On the other hand, with the previous example:

Code: Select all

[PortableRegExclude]
1=HKEY_CURRENT_USER\Software\MyApp\Recent
This tells it: "JauntePE, all of the redirected registry keys should be written into the registry.reg file (i.e all of them are "saved"), EXCEPT the HKEY_CURRENT_USER\Software\MyApp\Recent".

By default, all redirected keys are saved in registry.reg. You can make it IGNORE some keys and "scrap" them (i.e not 'save' them upon exit) by using PortableRegExclude.

Also RegistryIgnore is useful for ignoring the real registry -- this mostly avoids conflicts between your redirected registry app and the "real" installed app (if the machine has one).

So, with the above example in mind, and "scrapping" only the HKEY_CURRENT_USER\Software\MyApp\Recent key, the .ini (without the [Redirection] and [Launch] sections) would look just like this:

Code: Select all

[Registry]
Use=1
Data=.\registry.reg

[RegistryExclude]
1=*

[RegistryInclude]
1=HKEY_CURRENT_USER\Software\MyApp
2=HKEY_LOCAL_MACHINE\Software\MyApp
[RegistryIgnore]
1=HKEY_CURRENT_USER\Software\MyApp
2=HKEY_LOCAL_MACHINE\Software\MyApp

[PortableRegExclude]
1=HKEY_CURRENT_USER\Software\MyApp\Recent
That's all, redirects all the stuff in "HKEY_CURRENT_USER\Software\MyApp" and "HKEY_LOCAL_MACHINE\Software\MyApp" into our registry.reg file -- and it "scraps" (i.e never 'saves') the "HKEY_CURRENT_USER\Software\MyApp\Recent" subkey. (but saves the others, whatever they may be).


Ok, I hope that clarified it, I have some problems with my comp right now (overheating for some weird reason) so I'll probably not be available soon or as frequently. I hope you understood it and good luck. :D

(filesystem redirection is different, a bit more complicated in my opinion, but is basically the SAME, except that you need a "SpecialFolders" section in addition to just excluding and including folders).

mark rose
Posts: 11
Joined: Mon Mar 02, 2009 1:13 am

#17 Post by mark rose »

Thanks, this is great! :)
I definately have a better understanding now of what to do with JPE and am going to play around with some apps a little bit before posting again.
I really appreciate all your help and hope that you get your computer fixed soon.
Good luck and take care,
Mark

ZergFood
Posts: 34
Joined: Wed Feb 25, 2009 7:29 am
Location: Romania

#18 Post by ZergFood »

Definitely, I think that "creating a script from scratch" as I have outlined will make it easier for you to understand. It's much easier than modifying a "generic" script -- trust me, that's how I learned it. I'm pretty much a "noob" in jauntePE as well, seeing as I only used it for the past month or so 8)

As for my comp, it isn't really broken, it just overheats for some reason (I run it without the case) and I think the harddrive has some problems (I'm typing this from my old laptop, which is sloooooow in HD access speed). Anyway thanks for the wish ;)

ZergFood
Posts: 34
Joined: Wed Feb 25, 2009 7:29 am
Location: Romania

#19 Post by ZergFood »

Hey mark, did it work? Did you have difficulties with it? :)

Post Reply