I inherited a laptop with Windows XP installed. I think the user account I'm using originally had a different username. Some of the enviroment variables (APPDATA and HOMEPATH) are still referencing the former username, rather than my new username. The variables aren't set in the normal env var section of System settings, but I see them in the registry in HKEY_CURRENT_USER/Volatile Environment. I read that these are generated dynamically at login, so I'm wondering what is the appropriate way to modify these to use a different username in the path.
My suggestion is not to try. Once, when a woman in my company got married and consequently changed her last name, her user account name changed to reflect that. I tried to rename her local profile folder and all of the references to it, and it was a nightmare. Numerous programs had recorded the full profile folder name in the registry instead of using standard Windows API calls in code, and so there were hundreds of references to change in the registry and in files. I finally found all of them (I think), but it was not worth time that it took.
More to the point: %APPDATA% and %HOMEPATH% are not the only values that need to be changed. You will have to search the registry and the whole hard drive for any references to the profile folder, and I submit that it is not worth the effort. If you really hate the old name being around, back up the files, delete the profile, and let Windows create a new one with the new name.