Is there a way to setup a permanent variable for that session of the PE
Yes
like %systemroot% example
Well not a good example .....
, %temp% is a better example
I guess adding 3 more lines to your batch will do the task
(2nd line to assure in case....)
reg.exe add "HKCU\Environment" /v LaddsUSB /t REG_SZ /f /d "%LaddsUSB%"
Set LaddsUSB=%LaddsUSB%
BroadcastEnvChange.exe
and enable Win7PESE\Tweaks\"ImDisk Ramdisk" on your test
Let us know how it goes....
ps: btw, you can make small builds for faster virtual tests by deselecting most default things.... ;)
I dont want to have to define this in every script after my main variable setup script has run at bootup
Well well,
you do not need above "with scripts", neither Win7PESE nor Gena ,
both projects have "Run From CD" option, available on scripts,
So all you need to do is, selecting this option on scripts.....
There are also some more options/methods for scripts (aiming same tasks, different / flexible methods ;)) .....
as far as you well define what you are trying to achive .......
what you are after (adding a Hot Environmental variable) is more valuable than scripts,
but for your own customized portabilation on disk (ufd, usb etc..)..
Which I may guess, after / IF you well organise, we can put to projects too