Running Mercurial on a Flash Drive?

NessDan picture NessDan · Dec 15, 2009 · Viewed 8.4k times · Source

So I do a lot of work on a school computer. We can't install anything but we have most of our tools on our flash drives but I was wondering if there's a way to get Command Prompt to use Mercurial off of my Flash Drive. Let's say in theory that Mercurial's files were on my flash drive, where would I go from there?

Answer

user245794 picture user245794 · Jan 7, 2010

To make Bryan's solution "truly" portable in Windows 2000/XP/Vista/7, assuming the BAT file is inside Mercurial's directory, use:

set PATH=%PATH%;%~dp0%

So, no more hardcoded paths.