Running QGIS from flash drive?

Portable GIS (for Windows) would be much easier to set (copy to a clean formated usb stick)

Contains

Desktop GIS packages **QGIS** (with GRASS plugin), uDIG and gvSIG,
FWTools (GDAL and OGR toolkit)
XAMPPlite (Apache2/MySQL5/Php5),
**PostgreSQL (version 8.4)/Postgis (version 1.4)**,
Mapserver, OpenLayers, Tilecache, Featureserver, and Geoserver

With QGIS and PostGIS you can move your data around without issue.

http://www.inigis.org/397/portable-gis-version-2-from-archaeogeek-com.html/ has a download link to http://downloads.thehumanjourney.net/portablegis_setup_v2.exe

Recommend this software as works well and it robust on a good fast USB port.

Note: This is different to OSGeo Live which runs as a bootable usb that runs linux directly off the usb stick. Portable GIS runs in Windows (sits on the taskbar when plugged in) Also known as USB GIS http://www.faunalia.com/usbgis#download

Source: http://www.archaeogeek.com/blog/2012/03/23/portable-gis-vs-osgeo-live/


Here's one method, install Osgeo4W from scratch using the command line; open a command shell and:

# navigate to the USB device:
pushd U:\

# download command line installer
wget http://download.osgeo.org/osgeo4w/release/apt/apt-r1193M.exe -O apt.exe

# set install root to USB drive
set osgeo4w_root=%cd%\o4w_mobile
apt setup

# install quantum gis and dependencies
apt install qgis

Edit U:\o4w_mobile\bin\qgis.bat and change SET OSGEO4W_ROOT=U:\o4w_mobile to:

SET OSGEO4W_ROOT=%~dp0\..\

Take the usb drive to a new computer, plug it in, run X:\o4w_mobile\Osgeo4w.bat, and from that shell run qgis, et voila!

Notes

At time of writing, this will download some 85mb of package archives, so allocate time and bandwidth accordingly.

On a slow USB device some steps will appear to hang, e.g while installing the python-core package. Just let it ride, it will eventually finish or least at give an error message.

While the results are portable, the installation is not. The install process creates shortcuts on the host computer's desktop and start menu, some registry entries, and updates some system dll's (if needed, which leads to important note: the new host system may or not have the right dll's for some packages, particularly openssl).

You probably don't want to leave your broken shortcuts etc. on the host machine, so either delete the shortcuts or run the install again from a local fixed drive.

The command line installer is not necessary, the same method can be used using the standard OSGeo4W installer. The important part is editing the startup qgis batch file. The rest is just candy.