63
JauntePE 0.3.0 Getting Started The section is primarily intended for use by those who wish to manually maintain their JauntePEized applications. Those unfamiliar with how the JauntePE launcher and runtime work should make use of the JPE Quickie tool instead, as much of what is discussed in this section is automated by that tool. The 0.3.0 version JauntePE standalone launcher is identical in use to its predecessors except for the use of a new set of launcher settings which allows you to modify how a given launcher behaves without having to build a new launcher exe - you just build a new launcher ini instead. The 0.3.0 version JauntePE runtime is identical in use to its predecessors except for the use of several new sets of runtime settings, several new performance enhancements, and some bug fixes. One thing that should be noted up front however, is that the portable registry .reg file's contents are slightly different with 0.3.0, which makes any 0.3.0 modified .reg file incompatible with any previous version's runtime dll. So make a backup copy of any existing portable registry .reg files first before trying it out with 0.3.0, just in case you need to revert back to an older version. To make use of the 0.3.0 launcher exe and runtime dll, you must at least do the following: Copy the JPEPortable.exe file to the launch directory of your choice.

Hacer Portables

Embed Size (px)

DESCRIPTION

INSTRUCTIVO

Citation preview

Page 1: Hacer Portables

JauntePE 0.3.0 Getting

Started

The section is primarily intended for use by those who wish to manually maintain their JauntePEized applications. Those unfamiliar with how the JauntePE launcher and runtime work should make use of the JPE Quickie tool instead, as much of what is discussed in this section is automated by that tool.

The 0.3.0 version JauntePE standalone launcher is identical in use to its predecessors except for the use of a new set of launcher settings which allows you to modify how a given launcher behaves without having to build a new launcher exe - you just build a new launcher ini instead.

The 0.3.0 version JauntePE runtime is identical in use to its predecessors except for the use of several new sets of runtime settings, several new performance enhancements, and some bug fixes. One thing that should be noted up front however, is that the portable registry .reg file's contents are slightly different with 0.3.0, which makes any 0.3.0 modified .reg file incompatible with any previous version's runtime dll. So make a backup copy of any existing portable registry .reg files first before trying it out with 0.3.0, just in case you need to revert back to an older version.

To make use of the 0.3.0 launcher exe and runtime dll, you must at least do the following:

Copy the JPEPortable.exe file to the launch directory of your choice. 

This is the generic 0.3.0 launcher. You can find it in the JauntePE\Toolbox directory. This step is mandatory for existing 0.2.0 or older standalone JauntePEized applications since the communication mechanisms between the 0.3.0 launcher and the 0.3.0 runtime have changed, primarily to allow the use of JauntePE on 9x Windows, but also to allow for new 0.3.0 functionality. If you try to run an 0.2.0 or older launcher with the 0.3.0 runtime dll, you will get and error message and the launched application will be terminated. 

Page 2: Hacer Portables

When the launcher is run, its directory is assigned to the %appdir% substitution token which is available for use in any JauntePE configuration ini path. The launcher does not have to reside in the same directory as the executable it launches unless you don't want to use a launch config ini to specify where the to-be-launched executable resides.

Rename the copied JPEPortable.exe to something meaningful. Rename it with a .scr extension if you wish to launch a screensaver. 

The filename does not have to contain the _portable suffix as in prior versions. The filename minus any _portable suffix is assigned to the %appname% substitution token. The %appname% substitution token plus the file extension is then used as the default application executable to be launched. If this file is not found in the %appdir% directory, the %appname% substitution token plus a .jpe extension is used as the default application to be launched. If this file is not found the launcher quits with an error message, unless a launcher config ini is found and it contains a [Launch]Path setting that "points" to the executable to be launched.

Copy the Runtime\jauntePE\def\jauntePE.dll file somewhere convenient for use by this, and possibly other future, portablization efforts. 

This is the only runtime JauntePE dll that you need for 0.3.0. 0.3.0 does not require nor make use of madchook.dll. The name of the file must remain jauntePE.dll. 

There are other, specialized, builds of this dll that you might want to make use of later, in a separate download. Especially if you plan on creating your own distributable "wrapper", as there are much smaller plugin-specific builds, such as the registry-only and file system-only builds. Refer to the DLL Builds section for a complete list of all of the available runtime dll builds.

Create, or modify an existing, %appname%_jauntePE.ini launch settings file, to specify any launch settings you may wish to use, as the launch settings are all off by default. 

In other words, if your launcher's name is Firefox.exe, the launch settings file must be named Firefox_jauntePE.ini. 

This file must reside in the same directory as the portable launcher. An example_jauntePE.ini in the Toolbox directory has been provided for you as a starting point if you so wish. It contains a commented-out entry for every

Page 3: Hacer Portables

possible setting's valid value. So all you have to do is uncomment out the lines as needed and modify the few that require a path or some other non-fixed value. See the included examples if you are unfamiliar with these new settings. The launch reference also provides more detailed explanations of these settings. There are also a number of generic and application-specific launch/runtime combo config ini files available in the Toolbox\Configs directory. 

Make sure you have the Path and JPERuntime settings correct for the to-be-launched executable and JauntePE jauntePE.dll files. Also, although not mandatory, it would be a good idea to go ahead and set the JPERuntimeIni setting to either "point" to the same %appname%_jauntePE.ini file or to the one you choose to create or modify in the next step.

Create, or modify an existing, %appname%_jauntePE.ini, JauntePE_jauntePE.ini, or explicitly specified runtime settings file, to specify any runtime settings you may wish to use. 

This file may be the same as the launch ini but does not have to be. Please see the runtime reference if you have any questions regarding its contents.

JauntePE 0.3.0 12-Step

Program

NOTE: The 12-step program given below has been automated via the new JPE Quickie tool. Use of JPE Quickie is now the recommended and preferred method of initially portablizing an application via JauntePE. There is also a new tutorial that walks you through your first use of the tool.

Page 4: Hacer Portables

Here's the beginnings of what's being called the JauntePE 12-step program. It's meant to be a guide of sorts for helping you to "properly" configure an application for initial portable use via JauntePE. There's still some gaps to be filled, so don't be surprised if you try the steps on an application and it doesn't work.

One thing to point out now is that not every application requires this type of setup. But this is the most generic setup and shouldn't cause problems for those applications that don't require it. It will just make things slightly more complex if you're used to having all of an application's files in one directory. You can setup a portablized application that way, you'll just have to learn how to do that on your own by reading the docs.

Another important point to make here is that it's best if the application you're trying to portablize is not currently normally installed on the computer. Again, this depends on the application and its installer, and how robust it/they are, and how finicky you are. If the application is currently normally installed on the computer, you have a decision to make. The decision is whether you want to take the chance that the application and its installer are not robust at all and will, on their own, just ignore what's currently "out there" in the non-portable registry and file system. Or, whether you're willing to do the extra work necessary to help prevent a robust application or installer from causing problems with your portablization efforts.

Here are the 12 steps:

1. Create a portable directory for your application. From here on "your application" will be referred to as %appname%. So if your application is generally known as Snafu, then replace %appname% with Snafu everywhere within this document.

o Don't create the directory on the desktop or in Program Files or MyDocuments, etc.

o Use some place like "E:\Portables\%appname%". From here on this directory will be referred to as %launchdir%.

o Create a "JPE" sub-directory in %launchdir%.

o Copy JauntePE's distributed default jauntePE runtime dll file, found in the JauntePE\Runtime\jauntePE\def directory, to "JPE".

2. It's best if you do a "portable install" of the application, but if you don't have an installer for the application, do the following:

o Create a "ProgramFiles" sub-directory in "JPE".

o Create a %appname% sub-directory in "ProgramFiles".

Page 5: Hacer Portables

o Copy all of the application's files and sub-directories to this lowest-level sub-directory, i.e., copy to %launchdir%\JPE\ProgramFiles\%appname%.

o Refer to the no installer section if the application makes use of non-system dlls, ocxs, or oles that must be portably registered.

o Skip to Step 9.

3. Create a "Setup" sub-directory in %launchdir%.

4. Copy the installer for the application to %launchdir%\Setup.

5. Copy JauntePE's distributed JPEPortable launcher file, found in the JauntePE\Toolbox directory, into %launchdir%, naming it Setup.exe.

6. Copy one of the generic JauntePE distributed JPE Quickie configuration files, found in the JauntePE\Toolbox\Configs directory, into %launchdir%, naming it Setup_jauntePE.ini. The specific configuration file you copy depends upon what you want to do. For a "normal" application, the Normal2 configuration should do. The Normal3 configuration adds the ability to portablize file system paths stored within the portable registry, via the RegTokens setting. The Greener configuration adds portablization of more registry keys and more special folder directories. The Greener2 configuration adds complete registry portablization.

7. Text edit the Setup_jauntePE.ini file as follows:

o Replace %APPPATH% in [Launch] Path with .\Setup

o Replace %appname% in [Launch] Path with the filename of the installer, e.g., SnafuSetup

o Replace %JRTPATH% in [Launch] JPERuntime with .\JPE

o Replace %APPNAME% in [Launch] JPERuntimeIni with Setup

o If this is for an application that is currently normally installed on the computer, see the already normally installed section below on ways to handle this situation.

o Save and exit.

8. Run the installer for the application via the Setup.exe launcher in %launchdir%:

o Accept the settings per your requirements, but make sure that the application is to be installed in the typical "%ProgramFiles%\%appname%" location, where %ProgramFiles% is the full path to your standard "Program Files" directory.

o Don't have it run the application or do anything else after the installation has completed.

9. Copy JauntePE's distributed JPEPortable launcher file, found in the JauntePE\Toolbox directory, into %launchdir%, naming it %appname%.exe.

10. Copy one of the generic JauntePE distributed JPE Quickie configuration files, found in the JauntePE\Toolbox\Configs directory, into %launchdir%, naming it %appname%_jauntePE.ini. See Step 6 for a summary of each configuration.

11. Text edit the %appname%_jauntePE.ini file as follows:

o Replace %APPPATH% in [Launch] Path with .\JPE\ProgramFiles\%appname%

Page 6: Hacer Portables

o Replace %JRTPATH% in [Launch] JPERuntime with .\JPE

o Replace %APPNAME% in [Launch] JPERuntimeIni with %appname%

o If this is for an application that is currently normally installed on the computer, see the already normally installed section below on ways to handle this situation.

o Save and exit.

12. Run the application via the %appname%.exe launcher in %launchdir%.

If all goes well, you could, if you wish, modify the %launchdir% directory's %appname%_jauntePE.ini file to be more specific to your application after running the application in discovery mode and then using its results to optimize the configuration ini.

You could also use JPE Builder to modify the %launchdir% directory's %appname%.exe launcher to apply the application's icon to it, embed the configuration ini into it, embed the portable registry into it, etc.

I like to keep the installer handy, just in case, but if it's no longer needed, you could also delete the %launchdir%\Setup directory and its contents, and the %launchdir% Setup.exe and Setup_jauntePE.ini files.

Handling "already normally installed" situations

If this is for an application that is currently normally installed on the computer, it may be necessary for you to add in a section at the end of the configuration file you're editing, that will cause the installer or application to *think* that the application has not been installed on the computer. Doing this increases the chance that you'll get a clean and full install and running of the application. There are 2 ways to accomplish this, the Many Ignores method or the Pseudo-Sandbox method. Each has its own inherent set of advantages and disadvantages.

It should be noted here that the methods given below don't cover what could be done to hide any normally installed application's system registry entries from the portably run executables. There is a way to gather this information

Page 7: Hacer Portables

by running the installed application via JauntePE, making use of its Discovery feature, to capture what registry keys the application's module(s) access. But for now this technique is considered beyond the scope of the 12-Steps Program. A "quick and dirty" attempt would be to run the normally installed application via JPE Quickie, exercise the application as much as possible, use JPE Regger to extract the registry keys, and then add those keys to your configuration file(s) within a RegistryIgnore section.

The "Many Ignores" Method

In this method, you add the following FilesystemIgnore section, and the lines within it, to each of the configuration ini files you create:

[FilesystemIgnore]1=%38%\*.*2=%22%\*.*3=%25%\*.*4=%31%\*.*5=%35%\*.*6=%45%\*.*7=%46%\*.*8=%0%\*.*9=%5%\*.*10=%12%\*.*11=%16%\*.*12=%26%\*.*13=%28%\*.*14=%6%\*.*15=%8%\*.*16=%9%\*.*17=%11%\*.*18=%21%\*.*19=%32%\*.*20=%33%\*.*21=%34%\*.*

The "Pseudo-Sandbox" Method

In this method, you first pre-create all of the portable file system directories using the JauntePE Portable Dirs archive, found in the JauntePE\Toolbox\Extras directory. Follow the instructions given in the readme.txt file within the

Page 8: Hacer Portables

archive. You then add the following FilesystemIgnore section, and the lines within it, to each of the configuration ini files you create:

[FilesystemIgnore]1=382=%40%\..

Handling "no installer" or "can't run installer" situations

If you have a situation where you either don't have an installer for the application, or you can't run the installer due to JauntePE shortcomings, you might also encounter the problem of having to manually portably register any non-system dlls, ocxs, oles, etc. The JPE regsvr32 archive, found in the JauntePE\Toolbox\Extras directory, will help you with this additional work. Follow the instructions given in the readme.txt file within the archive.

JauntePE 0.3.0 Known

Limitations

JauntePE 0.3.0 has one important and a few other limitations that you need to be aware of in order to get the most out of its capabilities.

Page 9: Hacer Portables

1. Limitation/Problem: Portably running applications with full file system redirection on, from the Desktop, My Documents, Program Files, or other special folders, i.e. non-portable folders, causes unspecified problems. 

Work around: Don't portably run applications, with any type of file system redirection on, from the Desktop, My Documents, Program Files, or other special folders. 

You can try turning on the ExcludeAppDir option but that's really only of use when the entire portable file system is contained within the portablized application's executable's directory. You can also try adding the root of the portable file system as an excluded file system path. But both of these suggestions may cause other, unknown, problems. 

Reason: JauntePE accomplishes file system portablization through a simple technique known as redirection. When an application makes a file system related request, the JauntePE runtime intercepts the request, takes a look at it to see if it needs to be modified, modifies it as necessary, and then passes the request onto the system to complete the processing. Part of the modification of the request may be the changing of a path rooted in a special folder to an equivalent portable path rooted elsewhere. If the equivalent portable path is also rooted in a redirectable special folder, problems can occur. What the actual problems are have not been documented. 

Example: Let's say you've created some new text in a portablized Notepad window that you wish to save into your "My Documents" folder. An example file system path to that folder would be "C:\Documents and Settings\myusername\My Documents\mytext.txt". The JauntePE runtime takes this request and compares it against the configuration settings it was started with. Based on the comparisons, JauntePE decides the file system path that the application wants to store the file to is one that is included for redirection. So it changes the path to one that is within its configuration's portable file system and then passes the request on to Windows for completion. For a portable file system that has a root path of "F:\myPortables\Notepad\JPE", the redirection path for the above "save file" request would be "F:\myPortables\Notepad\JPE\User\Documents\mytext.txt". 

Using the above as an example, let's now say that your portable Notepad file system has a root path on your desktop. So instead of "F:\myPortables\Notepad\JPE" as its portable file system's root path, you now have "C:\Documents and Settings\myusername\Desktop\myPortables\Notepad\JPE" as its root path. As you hopefully have surmised, this path is also redirectable.

2. Limitation/Problem: Under certain situations, portably running multiple applications, or multiple instances of the same application, that use the same in-memory portable registry, can cause unspecified problems. 

Page 10: Hacer Portables

Work around: If a problem arises (you get an error message, etc.) that alludes to the possibility of missing or inconsistent or out-of-sync registry entries, try changing the in-memory registrysetting to 0. If that works and it wasn't set to 1 to begin with, try setting it to 1, which will get you at least partial benefits from in-memory portable registry use. 

Reason: The in-memory portable registry used by a given process (running instance of an application executable) is only accessible to that one process. It is not shared amongst all portably run processes, even if they are all using the same configuration ini that specifies the same portable registry path. 

The only way a given portable registry is completely shared amongst all of the processes that make use of it is with a MemRegistry setting of 0. This setting completely turns off in-memory use and causes all reads and writes from and to the portable registry to occur immediately and against the portable registry .reg file directly. Keep in mind, however, that turning off in-memory use also turns off a number of other useful registry-related features, such as FillRegistry, RegIgnDel, and RegMerge. 

Using a setting of 1 (which is the default for most of the supplied config examples and for Quickie packages) will cause each process that makes use of a given portable registry to read it into memory when the application is started, and to not read it again. This means any changes a given process makes to a portable registry won't be seen by any of the other currently running processes unless they have a setting of 0 and the process making the changes has a setting of 1 (since a setting of 1 means that updates are immediately written to the portable registry .reg file.) If all of the processes have a setting of 1, only newly started processes will pick up any changes made since the original processes were started.

3. Limitation/Problem: On Windows versions newer than XP, JauntePE may not redirect every call made by an application to the system registry and file system api functions. And for Vista (or newer) targeted applications, browsing the file system may not display the portable files and sub-directories at all. 

Work around: There are no known work arounds. 

Reason: The JauntePE runtime dll was coded against the system registry and file system api functions specifications as defined in the Windows XP SP2 Microsoft Platform SDK. It was also tested for the most part on that version of Windows. Since then newer versions of Windows have been released that greatly expand the number of system registry and file system api functions that an application may make use of. Primarily on Vista. 

Also on Vista, major changes have been made to the shell interface functions that an application may make use of, such as the new replacement dialog box for the previously used File Open/Save dialog box. Not only has the user

Page 11: Hacer Portables

interface changed, but the Microsoft shell dlls appear to have been recoded to bypass the normal system registry and file system api functions and to instead directly call the publically undocumented NTDLL functions themselves. As JauntePE does not redirect at this level, these calls are missed and not redirected as needed.

4. Limitation/Problem: JauntePE only works with 16 bit or 32 bit processes, and only works with 16 processes that are run on Windows 2000 or newer. 

Work around: There are no known work arounds. 

Reason: The JauntePE runtime dll is a 32 bit runtime executable. Which means that it is only usable within a 32 bit process. 

On Windows NT or 2000 or newer, there is an option when creating a 16 bit process to have it run within a separate 32 bit process known as a WoW VDM (Win16 on Win32 Virtual DOS Machine.) The application talks to the VDM and the VDM passes the requests on to the 32 bit api functions. This is what JauntePE takes advantage of in order to portably run 16 bit applications on Windows 2000 or newer.

5. Limitation/Problem: JauntePE does not correctly process Unicode-based ini configuration files. 

Work around: There are no known work arounds. 

Reason: All JauntePE executables, including all of the JauntePE runtime dlls, only support ANSI-based ini configuration files. Which means that it isn't possible to specify replacement or help text, that requires Unicode characters, for any of the GUIs. It also means that it isn't possible to specify any registry or file system paths, that require Unicode characters, for any launch or runtime ini configuration file.

6. Limitation/Problem: JauntePE's default IdentMode does not provide visual feedback 100% of the time on an application's top-level windows. 

Work around: Try switching to one of the other modes or just turn it off all together if you don't need any visual feedback. 

Reason: MS Windows.

7. Limitation/Problem: The JauntePE runtime dll's determination of the log file's "waiting for input" point in time is still inconsistent between 9x and NT-based versions of the OS. 

Work around: Perform all of your "waiting for input" tests on NT-based versions. 

Reason: MS Windows.

Page 12: Hacer Portables

8. Limitation/Problem: It's possible that injected-into only processes will crash when they're uninjected or when they terminate, when a runtime's IdentMode is set to 1 or 3 (3 is the default.) This can occur when the launcher's InjectOnly setting has been turned on. 

Work around: Set the runtime's IdentMode to either 0 or 2 when turning on the launcher's InjectOnly setting. Set it to 0 if targeting 9x versions of MS Windows. Set it to 0 unless you really need window identification. 

Reason: No code is in place to properly unhook the windows that get hooked when a runtime's IdentMode is set to 1 or 3. MS Windows also does not provide a safe/proper mechanism for de-subclassing a complicated chain of subclassed/de-subclassed/re-subclassed window callback procedures on any of its 2K or older versions, especially on 9x versions.

JauntePE 0.3.0 Tutorial # 1steps you through the basics of portablizing an application to produce a "normal" package.

Presented here is a step-by-step walk through for using JauntePE's JPE Quickie tool to create a generalized JauntePE portable package for 7-Zip 4.60. You should be able to apply this tutorial to the creation of any JauntePE portable application package via the use of the application's installer.

Since this is a tutorial on creating a normal quickly usable package, no optimizations are applied to make the portablized application start quicker, run faster, use only the minimum set of JauntePE capabilities, or use the least amount of storage space. For creating those types of packages, after

Page 13: Hacer Portables

working your way through this tutorial, see the partially optimizing, fully optimizing, and storage optimizing 7-Zip tutorials.

The tutorial has been updated for use with the Nightly Build #19 version of JPE Quickie.

Step 1) Start JauntePE by your preferred method

Hopefully getting to this point is self-explanatory.

Step 2) Start JPE Quickie

Page 14: Hacer Portables

a) Activate the Quickie page by clicking on its buttonb) Click on "Launch JPE Quickie"

If you'd prefer, it's okay to start JPE Quickie through some other means, like an Explorer shortcut or via another application launching utility such as PStart.

Step 3) Begin the installer selection - click on "Select Application"

Page 15: Hacer Portables

This should bring up the "open file" shell browsing dialog box, as shown in the following step, that you're hopefully familiar with. Its "Browse to and select the application main executable" title message is just a shorthand way of asking you to "find and select the executable that you want to next run portably."

As the "Step 1" note on the dialog box indicates, you can also use your file manager's drag and drop capability to "select" the installer for use. 

Step 4) Select the installer to be portably runa) Browse to the installer file's location and select itb) Click on "Open"

Page 16: Hacer Portables

Once you have opened the file, JPE Quickie should auto-recognize that the executable is an installer and turn on the "This is an installer" check box. If not, you should turn it on yourself after verifying that you have indeed selected and opened the correct installer file (check the filename of the opened file given below the "Select Application" button.)

Step 5) Portably run the installera) Click on "Run Portably"b) Select "Run normally"

Page 17: Hacer Portables

This step may take a few seconds if you've previously portably run something via JPE Quickie, since it first needs to clear out the contents of the directory it tells the JauntePE runtime to use as the location for the portable registry and portable file system. JPE Quickie also builds a launcher and JauntePE launch and runtime configuration ini for the installer at this time.

Step 6) Select the configuration to run with - click on "OK"

Page 18: Hacer Portables

This dialog box gives you an opportunity to change which JauntePE runtime configuration to use during the subsequent run. It would be a good idea to take the time now to go through the set that came in the JauntePE archive, in case the distribution's default doesn't have all of the features you'd like as a default.

If you don't want to see this dialog box most of the time, check on the "Auto-use the default" check box and you won't see this dialog box again except when there are pre-built configurations available that are specific to the application you've chosen to run. This dialog box may also be bypassed by selecting from the "File" menu's "Run Portably with Config" submenu, as shown inStep 15 below.

Step 7) Begin the portable installation - click on "Yes"

Page 19: Hacer Portables

This is just a "hand holding" message that gives you a final opportunity to back out of portably running the installer. If you find these types of messages annoying, and/or you don't think you'll be needing them anymore, check on the "Only prompt when necessary" check box and no more of these types of messages will popup unless there's an error. If you do this now you can skip some of the following steps.

When you click on "Yes", you should see JPE Quickie's "App Watcher" dialog box pop up (see Step 10 for a picture), followed by the installer's initial dialog box.

Step 8) Accept the default install location - click on "Install"

Page 20: Hacer Portables

It's very important for portability reasons that the install-to location be set to the computer's "Program Files" directory. Almost all installers tested have this directory set as the parent directory of the default install location. If not, you need to use whatever means the installer gives you to make sure that a "Program Files" sub-directory is chosen as the install-to location.

By the way, you may have noticed the unfamiliar titlebar icons that appear on this screenshot. Those are the JauntePE runtime icons that tell you from right to left that JauntePE is running ( ), that system registry portablization is enabled ( ), and that file system portablization is enabled ( ). The display (or not) of these icons, and other "window identification" functionality, is controlled via the JPE Configure tool, which you will learn about in a subsequent tutorial.

Step 9) Finish the portable installation - click on "Finish"

Page 21: Hacer Portables

When you click on "Finish", the installer should close down and you proceed to the next step in this tutorial.

When working with an installer that finishes by allowing you to subsequently start the just-installed application, or to "read the readme", at this time it's best to not do any of those things. If the installer does start the application, or does popup the readme, just close it down.

Step 10) Finish the portable running of the installera) Find the "JPE Quickie v Alpha 0.1.0 - App Watcher" windowb) Bring it to the frontc) Click on "OK"

Page 22: Hacer Portables

The most important thing to recognize here is that there should be an "OK" button to click on and not a "Cancel" button. If there isn't, you need to figure out why. Because, if you click on "Cancel" instead of "OK", JPE Quickie will stop its wizard-like walk-through of the steps necessary to get to a portably usable package.

Step 11) Confirm a successful installer run - click on "Yes"

Page 23: Hacer Portables

This is just another "hand holding" message that gives you an opportunity to back out of the steps you're currently being led through.

Step 12) Get past this annoying message - click on "OK"

What can I say, I want to be thorough but I'm also lazy.

Step 13) Continue on to application selection - click on "Cancel"

Page 24: Hacer Portables

While a JPE Quickie launched application is running, it's monitored by the JauntePE runtime embedded within its processes. After a "Yes" confirmation at Step 11, JPE Quickie analyzes the monitoring effort's results, and if any problems are found it displays them in this step's "Discovered Issues" dialog box.

There are a few places that JPE Quickie's default "Normal2" JauntePE configuration allows modifications to be made to, when at times, it shouldn't. The list displayed gives you an idea of what those modifications were, if any, so that you can take manual corrective action. You can select an entry to bring up more detailed information on it. And a few (very) system registry modifications can now be undone directly from within that dialog box.

Regarding these specific discovered 7-Zip installer issues, they're benign since the installer attempts to create 2 directories that already exist: the current user account's "local settings" and "profile" folders. If you'd like to experiment a bit, to see what happens when running with a JauntePE configuration that traps these types of issues, "Cancel" here and "Cancel" again in Step 14. Then start over at Step 5. In Step 6, select the "Greener" version of the "Generic" configuration and then proceed from there as normal with the tutorial. This time through you should find that Step 12 and this step

Page 25: Hacer Portables

are skipped since the JauntePE runtime was able to successfully portablize the directory creation requests (due to the stricter configuration settings,) leaving the run with no discovered issues.

Step 14) Select the application to be portably runa) Select the "7-Zip File Manager" shortcut entryb) Click on "OK"

When deciding what list entry to choose, it's best to look through the shortcuts first, if there are any. Unless you know the actual file name of the application's main executable. You should look through the "StartMenu" located entries in particular. Those entries are the shortcuts that the installer would have created in your system start menu if you hadn't run the installer via JauntePE.

Page 26: Hacer Portables

By the way, this is the dialog box that pops up when you click on the "Select Quickie App" button on JPE Quickie's main window.

Step 15) Portably run the applicationa) Click on the "File" menub) Select "Run Portably with Config"c) Select "Generic_Normal2"

This step and its sub-steps accomplish the same thing as steps 5 and 6 above when you began the sequence to portably run the installer. This is just a different and slightly faster way of beginning to portably run the currently selected executable.

Notice however, before you step through, that the check boxes have changed. JPE Quickie recognizes that the application you selected to run is not an installer, so it turns off that check box for you. It also recognizes that

Page 27: Hacer Portables

you want to run an application that resides within the portable file system, so it turns on the "Leave intact any Quickie portable data" check box for you.

Step 16) Begin the portable application run - click on "Yes"

Hopefully you remember this dialog box from Step 7 above. When you click on "Yes", in 7-Zip's case, you should see its main "file manager" window, which should look something like the window shown in Step 18 below.

Step 17) Begin "exercising" the application - change some settingsa) Select Tools->Options from the main menub) Select the Settings tabc) Check on "Show '..' item"d) Check on "Full row select"e) Click on "OK"

Page 28: Hacer Portables

The sub-steps given here are obviously 7-Zip specific, as are steps 18, 19, and 20 that follow.

The general idea behind these "exercising" steps is that you want to cause the application to create and store as much of its registry and file system data as possible. Doing so now will help you later when you first attempt to run the packaged application on its own, under another account or on another machine.

It will also help JPE Quickie determine if any of the work you did with the application caused it to behave in a non-portable manner that the JauntePE runtime was not able to redirect into the portable registry and/or portable file system. You will then be able to rectify the problem prior to using it elsewhere.

And it will also help JPE Quickie later if and when you decide to create an optimized application package. However, as will be shown in the following

Page 29: Hacer Portables

tutorial, you can always re-run the application via JPE Quickie first. But it's generally a good idea to do as much up-front as possible with the application.

Step 18) Continue "exercising" the application's functionalitya) Move and resize its main windowb) Resize the columnsc) Browse to the parent folder containing the JauntePE folderd) Select the JauntePE folder's entrye) Click on "Add"

Here are just some more 7-Zip specific things to do to "exercise" it.

Page 30: Hacer Portables

What you're about to do in the following steps is create a new 7-Zip archive of the JauntePE directory's contents. This is an important thing to do when "exercising" 7-Zip since archiving something is one of its main features. And, as you will see in a later tutorial, it also causes 7-Zip to run one of its other executables "behind the scenes," which is something that JPE Quickiedefinitely needs to know about if you ever want to create an optimized package for 7-Zip.

Step 19) Finish "exercising" the application's functionalitya) Change the "Compression level" to "Ultra"b) Change the "Dictionary size" to 32 MBc) Change the "Word size" to 256d) Click on "OK"

Page 31: Hacer Portables

Just some more 7-Zip specific things to do that you'll recall later to verify that the portably packaged application is carrying all of its settings along with it, and is also portably launching its executable that it uses to do the archiving.

Step 20) 7-Zip specific - wait for the archive creation process to finish

Page 32: Hacer Portables

The final 7-Zip specific step to take to "exercise" it.

Step 21) Exit the application by its normal method for doing so

Page 33: Hacer Portables

Finally, you're done with 7-Zip and are ready to return to JPE Quickie to see what it has to say about how the application behaved from a portability perspective.

Step 22) Finish the portable running of the applicationa) Find the "JPE Quickie v Alpha 0.1.0 - App Watcher" windowb) Bring it to the frontc) Click on "OK"

Page 34: Hacer Portables

Just as with the installer in Step 10 above, "OK" to continue working with JPE Quickie or "Cancel" at any time before to terminate the Quickie session.

Step 23) Confirm a successful application run - click on "Yes"

Are you getting annoyed yet?

Page 35: Hacer Portables

Step 24) Begin packaging the portable application - click on "Yes"

Finally, the packaging begins.

Step 25) Give the package a namea) Type in a name orb) select a drop down name and change as necessary

Page 36: Hacer Portables

The "Package name" you use must be a valid file system directory name, as that is what it's eventually used for. According to an Explorer error message popup, that means the name cannot contain any of the following characters: \/:*?"<>|

Step 26) Begin package location selection - click on "Select Location"

Page 37: Hacer Portables

This brings up the, hopefully familiar, "Browse For Folder" Explorer dialog box.

Step 27) Select the folder to create the package in

Page 38: Hacer Portables

Browse to the folder where you want the package's directory and its contents created. Then select it.

It's best not to choose the Desktop, My Documents, or some other special folder if you want to use the packaged application without possible future problems. See the Known Limitationssection for the reason why.

Step 28) Continue with specifying the package settings - click on "OK"

Page 39: Hacer Portables

Click on "OK" once you've browsed to and selected the folder that you want the package's directory and its contents created in. This will close the "Browse For Folder" popup dialog box and bring you back to the "Package Up" dialog box.

Step 29) Begin the building of the package - click on "OK"

Page 40: Hacer Portables

First take a look at the "Package location" path to make sure that it corresponds to the folder's location that you browsed to and selected via the previous Steps.

If the path looks correct, then you're ready to create your first JauntePE-driven portable application "package," which for this tutorial is nothing more than a copy of the current portable file system's contents, along with a slightly modified JauntePE configuration ini file.

When you click on "OK", the "packaging" process begins. This can take quite a while if the application you're packaging is large, and especially if you had previously configured the JauntePE tools to use the UPX executable compression utility via JPE Configure. Eventually, however, the following step's message box popup should appear.

Step 30) Get past this annoying message - click on "OK"

Page 41: Hacer Portables

The final annoying message to dismiss.

Step 31) Close down JPE Quickie via its titlebar close button or Alt+F4

Page 42: Hacer Portables

Step 32) Close down JauntePE via its titebar close button or Alt+F4

Step 33) Run the newly-created portable applicationStep Generic action to perform 7-Zip specific

a Open your favorite file manager

bBrowse to the folder containing the newly-created portable package's folder

cBrowse into the portable package's folder

Browse into "JPE 7-Zip"

d Start the portable application Start 7zFM.exe

eVerify that the main window is positioned, sized, and otherwise configured as before

Page 43: Hacer Portables

Step Generic action to perform 7-Zip specific

f Verify that the settings are as before Select Tools->Options from the main menu

gVerify that the application's main functionality is as before

Retrace the steps for archiving the JauntePE folder and verify that the archiving settings were as before

hExit the application by its normal method

Select File->Exit from the main menu

This step simply confirms that the portable application behaves the same way when run from the created package directory as it did when run via JPE Quickie, since this is the way you will run the portable application in the future.

If it's not self-evident yet, the "JPE 7-Zip" folder is self-contained and may be copied to any other location (except as noted by the Known Limitations) or computer and used as is. Now would be a good time to copy the folder to another computer, virtual machine, etc., and run it there, to make sure that all is truly portable (assuming you have plans for true portable use in the future.)

The 7zFM.exe application executable in the "JPE 7-Zip" directory itself is not the 7-Zip main executable, but rather a JauntePE launcher. It may be treated as if it were the application's main executable, however. Meaning, you may use it in a shortcut with parameters, add it to your Start menu, add a shortcut to it into your SendTo folder, start it via a bat or cmd file, with or without parameters, start it via some other application launcher, etc.

For launchers requiring special setups, if you're willing to do a bit of hand editing of the launcher's configuration ini file, take a look at the various launcher settings that you can use to specify shortcut-like launch properties.

If you're the finicky type, at this time you may wish to get rid of the installer's launcher and configuration ini: the 7z460.exe and 7z460_jauntePE.ini files. If they're still around.

And if you're up to it, now would be a great time to proceed on to the next tutorial, which builds upon this tutorial's efforts to quickly reconfigure your JPE 7-Zip portable package to make use of some of the JauntePE runtime's optimization settings.

Page 44: Hacer Portables

JauntePE 0.3.0 Tutorial # 2

Page 45: Hacer Portables

steps you through the basics of portablizing an application to produce a "partially optimized" package.

Presented here is a walk through for using JauntePE's JPE Quickie tool to create a partially optimized JauntePE portable package for 7-Zip 4.60. You should be able to apply this tutorial to the creation of any JauntePE portable application package via the use of the application's installer.

It is assumed that you have already worked your way through the first tutorial. If this is not the case, please do so now, as the current Quickie package created via that walk through is necessary for this tutorial. This tutorial was also written with the assumption that you have learned from the 1st tutorial, so many of that tutorial's steps are skipped in this tutorial as being obvious.

JPE Quickie created partially optimized packages are ones that attempt to safely minimize the amount of impact the JauntePE runtime has on a portablized running application. This is accomplished by analyzing the previously generated discovery data. The analysis results in a generation of configuration settings and lists so that only the necessary application-to-system calls are fully processed by the JauntePE runtime.

For example, if you followed the first tutorial's steps exactly, the discovery data generated by your previous "exercising" of the 7-Zip application should indicate that no file system portablization is necessary. It should also indicate that only a select few system registry portablizations are necessary (the ones that support the storage and retrieval of 7-Zip's settings data.) In such a case, JPE Quickie will completely turn off the use of the file system portablization plugin during the configuring of a "partially optimized" package. And it will minimize the overall impact of the system registry portablization plugin. This should result in faster 7-Zip startups as well as faster overall file system browsing within 7-Zip's file manager window.

The downside is that you must exercise, i.e., make use of, all of an application's functionality in order to get the best set of discovery data generated. And to the fullest extent that you possibly wish to make use of it in the future. Otherwise you run the risk of running with an optimized configuration that lets some as-yet-unkown file system and/or system registry modifications through to the system - modifications that a non-optimized configuration, e.g. a "Normal final package", would portablize.

Page 46: Hacer Portables

The tutorial has been updated for use with the Nightly Build #19 version of JPE Quickie.

Step 1) Start JPE Quickie and switch to the Quickies tab

Hopefully getting to this point is self-explanatory.

Step 2) Reuse the application's executablea) Select the 7-Zip main executable's entry in the listb) Click on "Select as Current"

Page 47: Hacer Portables

This is just another quick way to reselect a portably installed executable for reuse.

If you're interested, you can get run detail information for any previously JPE Quickie run application by clicking on the selected (highlighted) entry in the list. If you do, the below dialog box will pop up, which currently only presents summary run information for a number of different categories.

Page 48: Hacer Portables

In the 7-Zip tutorial's case, you can see that there were 2 executables run as part of the first tutorial's use of the portable application: 7zFM (the file manager) and 7zG (the archiver.)

Step 3) Begin repackaging - click on "Package Up"

Page 49: Hacer Portables

This should look familiar by now. You don't need to run the application this time, however. Because the application was already run in the first tutorial and the JauntePE runtime already monitored what was going on and so the data necessary to create a partially optimized package has already been created.

So all that's required is that you manually tell JPE Quickie that you're ready to create a package. You do this by selecting the "Package Up" command button.

Step 4) Repackage the portable application with partial optimizationsa) Name the new package the same as the previously created packageb) Reselect the parent folder of the previously created package

Page 50: Hacer Portables

c) Click on "Partially optimized final package" to set the package typed) Begin the rebuilding of the package by clicking on "OK"

This step's actions should look familiar as well. The only real difference between what you need to do now, as opposed to what you did in steps 25 through 29 of the first tutorial, is to explicitly select the package type.

Step 5) Get past this annoying message - click on "Yes"

Page 51: Hacer Portables

Just another warning message. The advice given is worth heeding though.

Step 6) Get past this annoying message - click on "OK"

That's it. In reality, as long as you have done your due-diligence and have properly exercised the application to its fullest, the only difference between building a normal portable package and a partially optimized one is in the selection of the package type.

As a final step, it would again be a good idea to now make use of the new portable package outside of JPE Quickie. Make sure to take a look at the JauntePE titlebar icons in the 7-Zip application's main window. The file system portablization icon ( ) should now be missing. If you run into problems, then you'll need to re-rebuild the package to again make it a "Normal final package" and just use it like that.

Page 52: Hacer Portables

Well, that was kind of easy, wasn't it? If you think so too, continue on with the next tutorial for something a bit more complicated that should give you a better understanding of how what you do with an application directly affects a subsequently created partially optimized package.

JauntePE 0.3.0 Examples

Page 53: Hacer Portables

This section presents a number of examples using some of the MS Windows applications as the target applications to be portablized. Each presents a slightly different way of using the JauntePE feature set. These are by no means an exhaustive look at all of the possible ways to configure an application, or set of applications, for use. But they should at least give you an idea of the different and new ways to use this utility. The examples are given in most general case to most specific case order.

Please note that you must create the portable launchers for each example in order to see them in action. You can do this manually, by simply copying the JPEPortable.exe file (found in theToolbox directory) to the appropriate example directory. Or you can do this using the JPE Builder utility.

The Notepad examples each give a different take on running a portablized MS Windows Notepad. They start with the most basic configuration and proceed to the most specialized. Included are examples of portable font use, various types of portable file system use, a "most stealthy" usage, a "fastest running" usage, and use of the identification and the new shell usage and fake drives capabilities.

The RegEdit examples together provide a general way of using a portablized MS Windows RegEdit to perform any manual maintenance on an application's portable registry.

The FreeCell example shows how to use the new "no annoyers" capabilities to prevent certain types of application behaviors.

The Explorer example shows how to use the new InjectOnly launch setting to apply the JauntePE runtime's features to an application's already running process or processes.

file:///D:/PELI/JAUNTEPE/JauntePE030Alpha/help/launch.html

Page 54: Hacer Portables