This runs perfectly fine, but I think this is all you need:

```ruby
user_home_path = registry_getvaldata("#{username_reg_path}\\#{user_sid}", "ProfileImagePath")
```