The main problem with running TextPad from a USB Flash Drive is that TextPad stores most, if not all, of it's settings in the registry. After some Google Searching I've written a bat file that can be used to safely install TextPad to a Flash Drive, and to save all of your settings (including installed plugins/macros/etc) between uses. No remnants (registry entries) of TextPad will be left on the computer it is being run by using this method. This procedure could also be modified easily enough to work for most other applications as well.
Disclaimer: While this should work without problems, I should probably state this anyway. Modifying the Registry can be dangerous, and you should not make changes to it unless you know what you are doing and/or have backed up your registry settings. Use the information provided in this post at your own risk. This has only been tested under Win XP.
For simplicity, I have divided this into several files to make it easier to use/modify. The only problem with this method is that the path to the TextPad installation (flash drive) must be manually updated in Textpad.reg file in order for this to work. If anybody knows a better way of doing this, feel free to post it here.
A)Install TextPad on your home computer (if not already installed) and set the settings to the way you want. Then copy the TextPad Directory (ie: C:/Texpad, or C:/Program Files/TextPad) to your flash drive in it's entirety. You may also alternatively install it directly to the Flash Drive if you wanted to. Open up a command prompt (Start->Run->COMMAND.COM) and enter the following to back up your settings (change the path as needed to the folder where Textpad.exe is on your Flash Drive) Alternatively you can also export these keys using Regedit.:
B)Edit the newly created .reg file in your favorite text-editor (notepad or textpad). Replace the drive letter in the path to Textpad to that of your Flash Drive. ie: If Textpad was originally installed to drive C, and your Flash Drive is in E do a find and replace of C:\ with E:\ and save. This step may have to be repeated if the computer you are using TextPad on assigns the Flash Drive to a different letter. For this reason, it's best to edit the .reg file with notepad so you can quickly configure it for use on any computer. *Note*:This step can probably be automated, but I don't know enough about batch files (yet) to do so.REGEDIT /E E:\TextPad\TextPad.reg "HKEY_CURRENT_USER\Software\Helios"
C)Create the Following Files in the directory with TextPad.exe and TextPad.reg on your Flash Drive.
TextPadRemove.reg - Merge this file to manually remove TextPad from system's registry
Code: Select all
Windows Registry Editor Version 5.00
[-HKEY_CURRENT_USER\Software\Helios]
Code: Select all
REGEDIT /E TextPad.reg "HKEY_CURRENT_USER\Software\Helios"
REGEDIT /S TextPadRemove.reg
Code: Select all
REGEDIT /S TextPad.reg
Code: Select all
CALL TextPadInstall.bat
START /W TextPad.exe
CALL TextPadUnInstall.bat