I do not see a direct way to get this information directly. If nothing comes up, the only thing that comes to mind is something hacked that will probably work in 99% of cases:
Take %USERPROFILE%
Take %APPDATA%
Take %APPDATA% and replace %USERPROFILE% with null. "Rest" should be "/ Application Data" or "/ Anwendungsdaten" or something else
Take %ALLUSERSPROFILE%
Add the result of step 3 to it.
You must specify the correct localized path to the Appdata directory of the All Users profile.
Note. This has not been verified, and I have little experience in this field. But that might work.
source share