The goal behind this question is to create a portable Windows script/program that would help users run (console) programs directly from a USB key (not necessarily through autorun, though). The script/program would thus do the following when double clicked on:
- Launch a console (
cmd
would do) and give a DOS command prompt, - Have the current directory set to a specific directory
WorkingDir
on the USB key (which contains various [Python] programs), - Set the path so that the user can run a command (python.exe) found in another USB key directory (so that the user can launch various Python programs found in
WorkingDir
).
The whole thing is based on Portable Python, which is on the USB key. I would also like to be able to simply put the contents of the key on a hard drive and use it from there.
I tried to write a file that contains commands like:
PATH=..\"Portable Python 2.7.2.1\App":%PATH%
cd WorkingDir
cmd
but I'm not sure how to call it so that Windows runs it (and I was therefore not able to see whether these command would work).
I don't know much about DOS and Windows, so any help would be much appreciated!