Spark folder

I’m just curious as to how Spark comes up with the path to the Spark folder and spark.properties on Spark 2.5.8

We have a large number of users with their Desktop, My Documents, and Start Menu redirected to file server, say \FileServer.domain.local\Users\Home%USERNAME% with Desktop, My Documents, and Start Menu underneath that.

The remaining profile folders stay on the local system under C:\Documents and Settings%USERNAME%

When those users open Spark the spark folder gets created in the redirected folder space rather then the local profile.

Such as: \FileServer.domain.local\Users\Home%USERNAME%\Spark

I don’t have a problem with that, but I’m trying to come up with a login script to modify the Spark.Properties file.

I’d rather not have two different scripts, one handling normal non-redirected user accounts and one handling redirected user accounts.

I’ve looked through the environment variables and have not been able to find any reason why it would end up even looking at the redirected folder locations.

Any help would be appreciated.

Thanks.