Citrix WEM external tasks calling environmental variables stopped working
I've been using an external task in WEM for years to launch a bat file to update BGinfo. One of the values I'm displaying is client name. BGinfo is finicky and limited and has never been able to see the %clientname% variable, so a work around is to create a registry rule in WEM that creates a custom variable (HKCU\Environment\ClientNameCustom) with a value of %clientname%. Pointing BGinfo to that reg successfully pulls the current client name. Or it used to. Out of the blue, the BGinfo bat fired from a WEM external task has stopped being able to resolve the variable. It now just displays %clientname%. When I run the exact same bat directly on the session it works fine. (WEM is calling the bat from the VDA). As a potential workaround, I created a 1 line PS script to pull $env:clientname and write it to a text file, then pointed BGinfo to that text file for the client name. When the PS is fired from WEM, it does not write the variable to the text file. Running the same script directly on the VDA does. WEM external tasks run in the user context, so what the hell am I missing here??