winbench / bench

Portable Software Environment for Windows
https://winbench.org
MIT License
20 stars 3 forks source link

Environment Path in Explorer with RegisterInUserProfile #82

Closed mastersign closed 8 years ago

mastersign commented 8 years ago

When using the configuration property RegisterInUserProfile, shells started as children of explorer.exe do not have the Bench apps on thier PATH. (not even after an logoff-login-cycle)

mastersign commented 8 years ago

The reason is the following: When activating the configuration property RegisterInUserProfile the variables BENCH_APPS and BENCH_PATH are set. BENCH_APPS contains the root path of the Bench lib directory and this variable is set as a simple string entry in the registry. BENCH_PATH however, is set as an expanded string entry in the registry, and it refers to BENCH_APP as path in front of every apps path directory. BENCH_PATH is then refered by the expanded string entry PATH.

It seems, that explorer.exe does not resolve expanded string entries in the registry recursively.

A solution would be to use simple string entries for all environment variables, despite PATH itself.