How to set and use env variables in the same windows agent run?
I have a Puppet agent on a Windows machine run as a service under the LocalSystem account. I am wanting to install some software on this machine that requires a particular environment variable to be set before the software can be installed. I have created a manifest that sets the env variable and then uses the 'package' resource type to install the software. However, the software cannot see the variable, thus does not get installed properly.
I have tried creating the env variable using different approaches (setx/set using 'exec' and using the '/badgerious/windows_env' module), all to no avail.
Any help will be appreciated.