NOTE: Before running this example, you must first put a copy of the JPEPortable.exe in the Fastest directory and rename it to notepad.exe.

This example presents a performance optimized launching of an application.

The ini itself...

The Launch section

This section's settings are read by the JPE-built app launcher and each overrides its equivalent stored within the launcher executable file. A truly "fastest" example would have provided you with a differently built launcher; one that had all the settings it needed built within itself, negating the need for a launch or runtime settings ini. But this is the best that can be offered for now.

Of special note is the use of the "reg" version of the jauntePE runtime, which provides only registry portablization, resulting in a whopping 50KB trimmed from the dll along with additional decreased resource usage.

[Launch]
Path=%System%\%appname%.exe
JPERuntime=..\Runtime\Reg\jauntePE.dll
JPERuntimeIni=.\%appname%_jauntePE.ini
ExeDir=0

The rest of this file's sections are all JPE runtime ini sections and are read by the JPE runtime dll and again, used to override equivalent settings stored within the launcher executable file.

The Redirection section

The in-memory portable registry used in this example is a version that only writes changes out to the .reg file at application end, and does so by writing the entire .reg file out in a "binary" format. Both of these options produce the fastest running application at the expense of a slightly longer load time, especially for large .reg files.

Of special note are the currently commented out logging settings. Uncommenting them (removing the leading semicolons) will cause the runtime to produce a file with the contents of how the runtime has interpreted the provided launch and runtime settings. Turning on LogFuncs will have the runtime append a table of the called, hooked api functions, to the log file. This table may then be used to boost performance as will be shown below with the Hook sections.

[Redirection]
MemRegistry=3
;Logging=1
;LogPath=.\%appname%_jauntePE.log
;LogFuncs=1

The Registry sections

Since this example is all about performance, one necessary optimization is to ensure that only the minimal amount of registry requests are processed against the portable registry. For this application, that means that only one registry key is necessary for it to be portablized. All other requests are handed off to the system registry for normal processing.

[Registry]
Use=1
Data=.\Data\%appname%.reg

[RegistryExclude]
1=*

[RegistryInclude]
1=HKEY_CURRENT_USER\Software\Microsoft\%appname%

The Filesystem sections

Again, for performance reasons, it was decided that no file system redirection was necessary. So there are no file system related sections since the launcher used doesn't have any portablization options set and having the smallest possible ini yields the fastest load times.

The Module sections

Another necessary performance requirement is to ensure that only the minimal number of modules are impacted by the portablization tests. In this example we're only interested in making sure that the application itself doesn't modify the registry, since we have previously determined that only the application modifies the one registry key we're interested in portablizing. We don't care what the system modules do.

[ModuleExclude]
1=*

[ModuleInclude]
1=%appname%.exe

The Hook sections

As noted above, the application was previously run and the log file output showed that only the following registry api hooks need to be applied. Note that this hook list is specific to the 2K SP2 notepad. To use this feature you'll need to figure this list out for each application, with a remote possibility that you'll need to figure this list out for each application for each Windows version. For running on 9x or NT-based versions, a safe "bet" would be to always include both the A and W versions of each used api function, if they exist.

[HookExclude]
1=*

[HookInclude]
1=RegCloseKey
2=RegCreateKeyA
3=RegCreateKeyW
4=RegQueryValueExA
5=RegQueryValueExW
6=RegSetValueExA
7=RegSetValueExW