%~d0gives the current drive letter (including a colon). If the batch file is contained on a USB drive, you can use it.
So for example, instead
E:\PortablePrograms\ProgramName.exe
you write
%~d0\PortablePrograms\ProgramName.exe
... or you could do something like this
::change directory to the script directory drive
pushd %~d0
::navigate from the drive to the relevant path(s)
cd PortablePrograms
::execute any programs
ProgramName.exe
SecondProgramName.exe
::just because I like to pair my pushes with pops; not required
popd
source
share