USB How To
From PsiWiki
Psi on a Portable Device
This article covers how to run Psi on a USB device (or just from a single directory).
- Note:: This is a per use fix, and seems similar to other portable applications at http://portableapps.com.
Contents |
[edit] Reasoning
A default Psi installation does not run from one standalone directory, presenting a portability issue.
One of many threads explaining how to set up Psi for portable use.
- See thread : http://psi-im.org/forum/thread/1807
- post#2 : http://forum.psi-im.org/post/11641 (infamously rofl)
[edit] Key Issues
- the Psi application and data are not located in the same directory tree on the disk;
- manually setting this for each installation can take a significant portion of time to set up on random machines;
- If the use on other machines is temporary, then the solution needs to not impose itself permanently on that machine, i.e. not write to the system registry.
[edit] Solution
- Create a batch file to set a data path, then launch Psi from the device.
- Copy the data directory contents to the newly set data path on the device.
- Make sure the data path is relative.
- Make it easy for the average user to use
[edit] Batch file
Here is what needs to be in the batch file. You should probably change the lines to make it easy to find that data directory.
@set PSIDATADIR=PsiData @start psi\psi.exe
Note: A very nice portable Loader can be found at the GnuPT-Homepage. Standalone and it works with the GnuPT-Portable-Loader which makes it possible to use GnuPG within PSI on your USB-Stick.
Note: special arguments can be added to have Psi run differently, like say disable GnuPGP, just place it on line 2, after psi.exe. You can also change the name of your data path and the path of your Psi.exe. This gives any user the setup that is easy for them to understand and is customized to their taste.
Here another batch file example:
@echo off rem get current working dir in %ROOT% for /f "usebackq delims=;" %%a IN (`cd`) DO set ROOT=%%a rem set PSIDATADIR to cwd\psidata set PSIDATADIR=%ROOT%\psidata rem start Psi start %ROOT%\psi
[edit] Data Directory Copy
If you run Psi Locally, you should be able to find it in
If you don't set the environment variable PSIDATADIR Psi uses the following default location to store its files:
- Linux, MacOS X and other Unices
- ~/.psi/
- Windows NT, 2000, XP, Server 2003, Vista and Server 2008
- %UserProfile%\PsiData\ (usually C:\Documents and Settings\username\PsiData )
- Windows 95, 98 and Me
- %ProgramFiles%\Psi\PsiData\ (usually C:\Program Files\Psi\PsiData )
where:
- %UserProfile%
- Your home folder in Windows NT/2000/XP/Server 2003/Vista/Server 2008 (usually C:\Users\loginname on Windows Vista/Server 2008, C:\Documents and Settings\loginname on Windows 2000/XP/Server 2003, C:\WINNT\Profiles\loginname on Windows NT); note that this is not the same as My Documents folder
- %ProgramFiles%
- Your Program Files folder (usually C:\Program Files)
- loginname
- Your name in Windows (the short one, used on logon screen; not the one used on Welcome screen in Windows XP)
Now that you know where your local data is, you can just copy it into your datapath set by the batch file.
[edit] Easy to use
Yes?
[edit] Credit
- Myself because I had to be the first person to write this
- The guys on the forums for being badass enough to provide the data needed to make this article (thanks non admin guys)
[edit] External Links
- http://psi-im.org/wiki/Configuration_File [I have nothing to say]
- http://psi-im.org/forum/thread/1807 [Look at post #2]

