Is there a best practice for creating a user environmental variable in LDMS 2016? I have an install that needs to set a variable, but won't run as current user, so I thought I'd bundle it with a custom Windows Action package, or a powershell package that runs something like:

If you've locked down PowerShell, you may have to look elsewhere for it - and remember that you can launch a package in a user context. Local System *SHOULD* be enough though for this - but depending on what you're after, you may need to launch it as a specific admin (if you need to access domain data, for instance, which LOCAL SYSTEM generally won't be able to).

What I ended up doing, and think ought to be a good solution for others was this.

I created a Windows action package that adds a registry key under HKCU/Environment. Because it was a user variable I use the current user's account to run the package. If it was a system variable, it would be in HKLM and could run a LocalSystem.