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
mark rose
Posts: 11
Joined: Mon Mar 02, 2009 1:13 am

Help with JauntPE

#1 Post by mark rose »

Hi,
first I want to say a huge thanks to the creator of JauntPE, redllar, and all those who support the project in this forum. I am very new to using this app, so please bear with me. I have had some success creating portable apps using JauntPE, but I am not 100% sure if they are truly portable: even though no files or folders were created and no registry entries written (as far as I can tell).
I have a couple of questions:
1. is there somewhere that I can upload apps I created with JauntPE so that someone can test if they are really portable?
2. in general, what types of apps are likely to cause problems if I try and make them portable?
Thanks in advance,
Mark

crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

#2 Post by crownixx »

1. You can post it here but depends on the application license. If it permit you to do repackaging the app, then post the complete portable application. If not, then just post the launcher.

2. joby_toss reports mostly he had problem with an application that use the internet connection. Possibly the general types of apps that having troubles to portablize them are similar to what Thinapp can't virtualize. See here

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

#3 Post by mark rose »

Thanks crownixx for responding; I really appreciate it!
I am not quite sure how to post just the launcher if it already includes the app. By the way, I am only doing this for personal use. I have no intention of redistributing apps that I make portable; just so you know.
I looked at the link you suggested about what can/cannot be made portable. Again, thanks. This is what I more or less suspected. I actually tried with an antivirus, just out of curiosity, but failed miserably. Anyway, another lesson learned. On another note, is there somewhere here in the forums where I can find a tutorial on creating portable apps using NSIS? I tried a little bit with it, but found it to be a somewhat beyond my current capabilities, and, with all due respect to John Haller and the PortableApps.com forums, the information provided there was not really intended for complete beginners.
Thanks in advance,
Mark

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

#4 Post by ZergFood »

For registry use this awesome tool called RegFromApp to monitor registry changes by your app -- and see if it modifies any registry (it shouldn't).

By the way there are certain registry entries that are modified by the windows shell, such as ShellNoRoam or stuff like that, and the app reports it. Don't worry, it's still portable if those are the only reg keys reported.

RegFromApp is portable too.

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

#5 Post by mark rose »

Thanks ZergFood! I will try RegFromApp as you suggest. I have done some basic testing already using another brilliant app from Nirsoft (Regscanner) and noticed ShellNoRoam and MUICache entries. Can I assume that these are not a problem? Also, once I have created a portable app is it possible to fine tune things by, for example, editing the JauntPE.ini file? The reason I ask has to with noticing an increase in the size of an apps folder after using it. For example, if I run the app and it would normally place information in a Data folder, then I see the size of that folder has increased. Is this normal or should I have set things differently from the beginning? Any advice would be appreciated.
Thanks,
Mark
[A quick update: tried RegFromApp with 3 different apps but keep getting the following error:
Failed to connect the selected process. Error code: 65535
Do you know what this means?]

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

#6 Post by ZergFood »

mark rose wrote:Also, once I have created a portable app is it possible to fine tune things by, for example, editing the JauntPE.ini file? The reason I ask has to with noticing an increase in the size of an apps folder after using it. For example, if I run the app and it would normally place information in a Data folder, then I see the size of that folder has increased. Is this normal or should I have set things differently from the beginning? Any advice would be appreciated.
Thanks,
Mark
Sure, it's what I always do, fine-tune it manually and optimize it, but be careful not to cause some leaks :D
And yes, MUICache and ShellNoRoam are registry keys used by Windows itself (well the windows shell to be precise), and almost all apps, portable or not, modify them, if they use the respective shell functions.

I think jauntePE has a feature to not use them either but I don't think they're a problem anyway (unless you want to be extremely stealthy).

Add this to the .ini if you want to not have those shell registry:

Code: Select all

[ShellUsage]
Use=1
PreventMRU=1
Though I admit, I never used it myself.

If the data increases you can take a look at it with editJPE (in jauntePE examples), which runs regedit portably for your registry only. It may be normal or not depending on the app -- if you want it to stay normally you can use MemRegistry to 4 or 5, or set the reg file to read-only (works too).
mark rose wrote:[A quick update: tried RegFromApp with 3 different apps but keep getting the following error:
Failed to connect the selected process. Error code: 65535
Do you know what this means?]
No idea, I have never encountered that, I use XP SP2 though, not sure on other OSes. If you use that as well, then probably it's some limitation on few apps. I'm sorry that I can't be of any help as I never encountered that thing.

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

#7 Post by mark rose »

Thanks, this is definately helpful and inspires me to create more portable apps using JauntPE. I really hope there is continued development on it because I found, even as a beginner, that it is "relatively" easy to use after a few hit and miss attempts.
Thanks,
Mark

crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

#8 Post by crownixx »

Just a quick tips,

If you want to portablize an app, you need to know what the task of the app do first. Redirecting all the registry & filesystem doesn't always make the portable application working. For example if you success portablizing the antivirus and manage to make it running, it still will be useless. How the portable antivirus want to modify or delete the registry keys made by the virus if you prevent it by turning on the registry redirection? Thus the only way to make the antivirus working is to minimize the registry redirection as much as possible. Another application example might be registry cleaner, registry tweaker, wallpaper changer...

Study first, and not all applications can be portablized as simple as 1-2-3. That's all from me

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

#9 Post by mark rose »

I only tried an antivirus to see what would happen; I realize that something like that would be very complicated.
@ZergFood
I looked in the JPE.ini files for the apps I created and discovered that ShellUsage was already included and yet entries are written. Is this normal? Also, how do I manually redirect folders/files after creating an app? By the way, I use JPEQuickie to create things since the manual way is a bit too complicated for me (I think). Any suggestions?
Thanks in advance,
Mark

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

#10 Post by ZergFood »

@mark: regarding RegFromApp, I finally understood what you meant, and yes I know it doesn't work with JauntePE for some reason. What I meant was to use it on an un-portablized application, testing and "exercising" it (i.e modify all options, use it to full potential, etc...) so you don't "miss" any keys, and see what registry keys it writes to.

You then specify the respective entries into the .ini file in the jauntePE runtime.

Some tips for redirecting only "certain" keys. E.g: say you have a program called "SomeProgram" that writes to "HKEY_CURRENT_USER\Software\SomeProgram", thus you need to redirect only THIS.

What you have to do FIRST is to turn ON registry redirection like this:

Code: Select all

[Registry]
Use=1
of course also put the path where you want it, but you can look in the manual for details.

Then, to redirect ONLY the keys you WANT, you have to first EXCLUDE all of them, and then include only the ones you want:

Code: Select all

[RegistryExclude]
1=*
[RegistryInclude]
1=HKEY_CURRENT_USER\Software\SomeProgram
This excludes all registry keys (via the 1=* specified in the manual) and then includes only the ones you KNOW the app is going to use. This is one of the simplest optimizations possible, and good one too :)

(same for filesystem redirection if you want)

For the registry you also have PortableRegExclude and PortableRegInclude, these are used as TEMPORARY registry keys that are READ from the registry or "created on the fly" (if the app needs them and doesn't find them), but they are NEVER written to the registry.

PortableRegExclude excludes the registry keys that you do NOT want to be written. Thus if "SomeProgram" writes to Settings and Temp subkeys, and you don't WANT the "Temp" to be written to the registry (but you do want the Settings written). Therefore you'll have to

Code: Select all

[PortableRegExclude]
1=HKEY_CURRENT_USER\Software\SomeProgram\Temp
you can use 1=* too here, if you have a lot of portable keys you want to exclude from being written (i.e treat them as temporary in memory), and then only specify with PortableRegInclude the ones you want to be written in. Thus if your app had Temp1, Temp2, Temp3, Temp4 and Temp5 as subkeys and you wanted to exclude them (but include the Settings) you could use:

Code: Select all

[PortableRegExclude]
1=*
[PortableRegInclude]
1=HKEY_CURRENT_USER\Software\SomeProgram\Settings
Also check the Redirection section and MemRegistry option put in there (see the manual). It helps you decide how the registry is stored (text/binary, in memory, or read-only, etc...). Note that the above (with PortableReg stuff) only works if you put the registry in MEMORY via the MemRegistry option.

EDIT: Note that PortableRegExclude and PortableRegInclude must specify keys that are already redirected via RegistryInclude as above. The difference between them is like so:

No redirection --> stuff written to REAL registry
Redirection --> stuff written to "virtual" portablized registry
Redirection and PortableRegExcluded --> stuff NEVER written to ANY registry, not even virtual (much less the real one).

The latter could be used as some form of read-only only for specific keys only :D

Hope it helped somewhat.

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

#11 Post by mark rose »

Wow! This is excellent ZergFood; thank you, thank you. I am really starting to understand how this works now and feel more and more confident testing stuff.
If RegFromApp does not work with JPE portables AFTER they have been made, what can I use to test that there are no leaks to the registry or file writes etc.? As I said, I have used Regscanner to see what was written after running an app, but all I could find were ShellNoRoam MRU and MUICache entries. I believe this is normal and does not affect portability; is this correct?
Thanks again,
Mark

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

#12 Post by ZergFood »

If you know what registry it writes to (you exercised it before, without jauntePE, with RegFromApp), then you can just delete them (I mean, the keys from the REAL registry), and use the jauntePE version of your app (i.e portable version), and 'exercise' it again.

Then you can take a look with regedit and see if the keys that are supposed to be portable are in the registry or not (they shouldn't be, I'm talking about the 'real' registry here).

And yes you can do an automatic scan too. But ShellNoRoam and MUICache are shell registry keys, modified by the Windows shell (if the app uses the Windows shell that is) so those keys are modified even by "portable" applications that use the shell. They shouldn't be a problem, it's sort of like the "most recent documents" list in Windows. Your app will still be portable, but not "stealthy". (IMO not much of a problem).

Some Windows guru can clarify this better than me :D (but to be honest, I never paid attention to those myself ;))


EDIT: Also @mark, there is also RegistryIgnore which I very often use. I usually just copy the stuff from RegistryInclude into it -- this tells the app to IGNORE the respective keys from the real registry, even if it doesn't find them in the virtual registry.

This is useful sometimes as you may end up with mixed settings, if your virtual registry lacks some settings and you use the app on a machine that has the program installed with those missing settings (i.e the app will read from the virtual registry, and when it can't find it there, it looks into the real registry).

You can prevent the "looks into the real registry" with RegistryIgnore. With that, if it doesn't find it in the virtual registry, then it says "Not Found" instead of looking into the real registry (this is also an optimization).

EDIT: Something like this:

Code: Select all

[RegistryExclude]
1=*
[RegistryInclude]
1=HKEY_CURRENT_USER\Software\SomeProgram
[RegistryIgnore]
1=HKEY_CURRENT_USER\Software\SomeProgram

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

#13 Post by mark rose »

@ZergFood
The RegistryIgnore tip is great; I look forward to trying it.
Thanks,
Mark
By the way, when I edit the JPE.ini file does it matter where I add new values and strings or can they be added at the very end of the list?
And what does this string do/when should I edit it?

[PortableRegInclude]
1=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets

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

#14 Post by ZergFood »

mark rose wrote:By the way, when I edit the JPE.ini file does it matter where I add new values and strings or can they be added at the very end of the list?
They need to be added into the respective sections (the stuff between the [] brackets). Also, they need to be ordered consecutively, for example:

Code: Select all

[RegistryInclude]
1=Key1
2=Key2
3=Key3
(note the "1=", "2=", and "3=" at the beginning of the line).
mark rose wrote:And what does this string do/when should I edit it?

[PortableRegInclude]
1=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets
I assume the .ini has some PortableRegExclude on a key that is probably one level above that and "includes" it (subkeys so to speak), or maybe it is 1=*, right?

PortableRegExclude tells the already redirected registry keys (i.e which are already redirected by jauntePE!) to act as "temporary" keys, or maybe read-only would be simpler to understand.

PortableRegInclude, as per your example, tells the "excluded" ones to NOT act as temporary/read-only. By default, NONE is read-only (unless you make the entire .reg file read-only), so there's no need to use PortableRegInclude unless you excluded some keys.

The above example of yours looks into Windows Applets (windows programs/accessories; stuff that comes with Windows, nothing else). I assume it is meant to treat all other windows stuff as temporary (that is, just "read" from the registry but NEVER written to, not even in the portablized registry), and only treat the applets themselves as "write-able" so to speak. (maybe to keep their settings and such, which might be modified depending on user preferences ;)).

Normally you would use PortableRegInclude (if you used Exclude before to exclude keys) to include those that you want the app to change (in the portablized registry btw! not the real registry). For example, settings.

If you don't want some keys to be modified, not even in the portablized registry (i.e make them read-only), then use PortableRegExclude on them.

In fact this is the closest analogy I could think of: PortableRegExclude is used to make keys that are already redirected read-only. Remember the app will itself modify these read-only keys when it runs (they are placed in its memory!), but they will NEVER be written to disk (not even portablized registry).



Other explanation: PortableRegExclude tells which keys that are ALREADY redirected must never be written to disk (but only managed in memory). They can be "read" of course, from disk (disk = the app's redirected registry). So in effect, they are read-only. :D

If you redirect the keys "A" and "B" and "C" and you want "B" to be read-only, use:

Code: Select all

[PortableRegExclude]
1=B
(of course this is just an example, 'B' isn't really a reg key :P

Now, if you want to make them all read-only, except "C", you can use so:

Code: Select all

[PortableRegExclude]
1=*
[PortableRegInclude]
1=C
The first one tells to make them ALL read-only, and then you tell which ones to make write-able (in this case, "C"). Kind of like the opposite of what was above (in the former example, you start with all write-able and tell which ones to be read-only; in the latter, you start with all read-only and tell which ones to be write-able).

Notice that if you have a key "D" that is NOT redirected (i.e it is written to the real registry), then PortableRegExclude won't touch it, as far as I know.

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

#15 Post by mark rose »

I really appreciate the fact that you are being patient with all my basic questions. Thanks! Okay, here is a JPE.ini file created for WRR by mitec that was set up using JPEQuickie (please note that I did this as my first app to test JPE since I had never used it before and knew there was only one registry key that would be written):

[BuildApps]
1=WRR.exe

[Launch]
Path=\WRRPortable\WRR\WRR.exe
JPERuntime=.\JPE\jauntePE.dll
JPERuntimeIni=.\%appname%_jauntePE.ini
JPERuntimeReg=.\JPE\jauntePE.reg
JPERuntimeWFS=.\JPE\
RedirReg=1
RedirWFS=1
AppReg=1
AppWFS=1
ExeDir=1
JobIni=.\JPE\%appname%_job.ini

[Redirection]
RedirMSI=1
RedirMisc=1
MemRegistry=1
FillRegistry=1
RegMerge=1
RegIgnDel=1
ExcludeAppDir=0
WFSMerge=1
Logging=0
LogFuncs=0
LogPath=.\JPE\%appname%%date%%time%%pid%.log
Discovery=0
DiscoveryPath=.\JPE\%appname%%date%%time%%pid%_discovery.log
UseIcon=1
ModFrame=1
FlashDisco=0
IconDisco=0
InnerColor=255
OuterColor=0

[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

[Filesystem]
Use=1
Data=.\JPE\

[ShellUsage]
Use=1
PreventMRU=1
PreventBinUse=1

Is this all correct? Nothing is written to the registry after running the portable version, but can I leave it like this or would you edit/optimize it? If so, what and why?
Thanks in advance,
Mark

Post Reply