Installing Textpad to Flash Drive for use on public computer
Posted: Thu Sep 30, 2004 3:08 am
I asked this question on the forums here a few months ago, but I finally decided to figure out a way to do it myself since nobody here knew.
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.:
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
TextPadUninstall.bat - Backs Up Settings and Removes from Registry
TextPadInstall.bat - This file needs to be modified in order to update the file paths. In the meantime, you must manually do a find/replace in TextPad.reg file as described above to ensure it's set to the right drive letter for the computer you are on.
RunTextPad.bat - Assuming paths in the reg file are correct, all you need to do is open this file to safely execute TextPad on a public computer.
D)That's it. To run Textpad simply execute RunTextPad.bat from MyComputer. Your settings will be automatically extracted when you run the program, and saved again when you close it, with all registry entries removed from the given computer. You may also manually run the appropriate Install or Uninstall .bat files if you need to (instead of RunTextPad.bat), such as when running multiple instances of TextPad.[/code]
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.regCode: Select all
REGEDIT /S TextPad.regCode: Select all
CALL TextPadInstall.bat
START /W TextPad.exe
CALL TextPadUnInstall.bat