Is there a way to either create a new Environment Variable from within a WF 4.0 workflow or update an existing one if it already exists?
You can set a enviroment variable inside an code activity.