Creating A Portable App: A Guerilla Field Guide
● Become familiar with the launchers available.
* Notepad++ Portable Moves files and then adjusts them so that any open files from your flash drive will now open on your new host.
* 7-Zip Portable deals with the registry entries made by 7-zip.
* PNotes Portable Passes a command line variable to the program.
● Determine the programing language
. Why? Well, you have to be careful. Is it done in:
*.Net? Sorry. While some don't care, alot of people here despise .Net, as its not installed on all computers. See this link For a whole discussion on the subject of .Net.
* Java? As I understand there's the Java Portablizer, but there is not yet an Open Source JRE. So use of Java applications is somehow limited.
You can study the following application to get an idea of portable Java implementation.
● Get the tools. Load up- you'll need them.
* I whole heartedly suggest the use of HM NIS Edit (Portable) Select either the download with NSIS included, if you don't intend to download it separately, or without if you do. It adjusts properly in both occasions.
* Note also if you wish to use another editor, you can download a portable version of NSIS separately, from here.
* Regshot. which is used to figure out what changes a program made during the install process.
* Alternately, you can use Process Monitor to figure out what registry entries its reading.
* NirSoft RegfromApp is a small freeware utility that allows you to specify a specific process to monitor. You can even launch a process with it and monitor those specifically. It produces a nicer output of what registry entries the program has modified.
* I also suggest picking up Notepad ++ Portable. Just in case.
● Do your research.
Read up on these topics in the forums:
* The PortableApps Format Specifications
● Download your program.
If you have keyboard loggers, malware protection or anything that runs in the background, consider turning them off before taking a regshot. Now, fire up regshot and take a regshot of the computer by scanning the C drive, more on that in a minute, before installation. Go have a cup of coffee or a can of Mountain Dew. Don't touch the computer! You'll get extra registry entries.
● Install your program and run it a couple of times.
Make sure you do this from a clean install. If you don't, you may have skewed results. Do NOTHING else during this time
● Take second regshot and then compare the results. Save it a html, it produces a nicer printout then .txt
● Figure out where the program is saving files.
Check C:/Documents and Settings/UserName/Application Data for %appdata%. If you scan the entire C:\ Drive with regshot, those changes should show up.
● What to do with registry entries:
:Regshot will show a HCKU modification as HKU\Random Numbers\whatever. Look for those in HKCU\Software\ and handle them in NSIS as HKEY_CURRENT_USER\Software\Whatever.
** Useful Entry: HKU\S-1-5-21-1060284298-823518204-725345543-1003\Software\Texas Instruments\TI Connect\StartUp\.
** Useless: HKU\S-1-5-21-1060284298-823518204-725345543-1003\Software\Microsoft\Windows\ShellNoRoam\MUICache
HKLM is a branch of the registry that cannot be modified by someone with a Limited account- just an Administrator. Handle them by double checking that they are needed. Often, something like InstallDir: whatever can be ignored. Else-if those entries really really are needed, you will need to check that the launcher can do it, then launch the software. If you don't have the rights, you'll use a message box to say so and terminate the launcher. Handle them in NSIS as HKEY_LOCAL_MACHINE\Software\whatever
You can ignore these.
● Find a base launcher that deals with those issues.
● Adjust the launcher to reflect the changes you need made
● Compile, test, and adjust