If during logon you run just 1 master script written in kixtart then as Les says you can use a global Kixtart variable. It will be available throughout the logon/Windows startup process.

If you are chaining a series of scripts called from a Batch file you have trouble. In this case you may have to experiment with the various Sets to discover which shell is the appropriate shell to write to. If this is the case you might look into using the DOS utility PUTENV which can write to specific shells if you know their literal system names. (This utility is not the same as PUTINENV whose main purpose is putting LANMAM variables into the environment.)

I recommend Les' suggestion.
_________________________
Jack