You need to create two files:
autorun.inf
[autorun] open=cmd.exe "Python Console" /k autorun.cmd action=Open Python Console...
autorun.cmd
@Echo Off CD %~d0\WorkingDir Path %Path%;%~d0\Portable Python 2.7.2.1\App
The phrase %~d0 is the drive in which the command file is located, namely the letter of the flash drive (E :).
Now I came across two small icons. There was already a hidden, system readonly autorun.inf file on my USB drive. I had to unprotect with the following command before I could edit it.
Attrib autorun.inf -r -s -h
My second hiccup is that Windows 7 will not start from a USB drive. You must right-click the drive in Explorer and select "Run Python Console ..."
source share