I would like to be able to set an environment variable as an action in bundles
-- not to set one associated with an executable action, but rather to define an
action that will accomplish permanently setting an environment variable.

For example (not quite real but close) if I installed Java, I might want to set
the value for JAVA_HOME as a persistent environment variable if the install
doesn't create it.

I know of several methods that work for setting an environment variable on the
system, but none of them work particularly well for my purposes:

1) Create a batch/cmd file containing the SETX command, place it somewhere
accessible to the system, and use Run Script. The drawback is that this
requires placing an extra little command file somewhere accessible to every
system that runs the bundle.
2) Add or modify the variable via the registry. This has the drawback of
requiring a "refresh" action to somehow make the system see the variable value
right away.

err.... I think those are the only methods I know. Of course one can set an
environment variable just associated with an action (except with11.2.3 agent)
but I want to essentially modify the system permanently, but only for people
getting the specific bundle.

What's the best way to go about this? Am I missing something (personality?)?


-- DE