I guess I was unclear, so I'll start at the beginning...
There is an environment variable called HOMEPATH that is one of several "standard" environment variables set up by Windows. Many applications expect it to be valid. Others like it include APPDATA, HOMEDRIVE, and so on. It does not normally appear under
the "Environment Variables" tab under System->Advanced because Windows sets it up from some other source at startup.
In my system, for some reason I don't understand, it has disappeared. When I list all environment variables in a command shell it simply isn't there. Something happened while I was recovering my system that caused this to happen. It is a real problem
and I have been trying to find a solution:
Adding HOMEPATH under the "Environment Variables" tab works temporarily, but the variable disappears again after a reboot. It is still in the list of variables on the tab, but it does not take effect after a reboot. No solution there... Windows is overriding
that setting.
Trying to discover from where Windows sets the value of HOMEPATH, I scanned the registry. The HOMEPATH value in both "Volatile Environment" keys is blank. The other value/data pairs are correct. I looked on another Windows XP PC, and the HOMEPATH data
was correct, not blank. So I tried setting my HOMEPATH key's data to its correct value. This did not work (the variable still does not appear when in a command shell) and they return to blank after a reboot... so Windows is getting the HOMEPATH value from
someplace else and using it to set the Volatile Environment data in the registry.
So there's a real problem here. I searched the web, but no one seems to have any idea where Windows gets the values it assigns to these variables (and to the registry data), or how they might be repaired when something goes wrong.