The Windows command processor (cmd.exe) supports environment variables like
USEPROFILE. The value of these variable is always the same after they have been set. But if I execute
echo %TIME% I get a 'dynamic' value. So clearly there is an execution path for the environment variable syntax that can result in a dynamic value. (Unless the operating system actually updates the
TIME variable every second. But I don't think so, because
TIME is not listed when executing the
So how do I set an environment variable that results in execution of a script or program when evaluated?
I want to add information to my command prompt, based on the current working directory. The Windows Command Processor uses whatever is in the
PROMPT environment variable as its prompt. If I can make an environment variable that is dynamic then I can probably achieve what I want.