On all my windows machines(XP SP2, Win7HP) are the environment variables HOMEPATH and HOMEDRIVE defined. A quick search on the net shows me, that both variables should be defined on windows.

HOMEPATH is only a fallback, fossil searches the following environment variables in the given order:
 LOCALAPPDATA -> APPDATA -> HOMEPATH

USERPROFILE might be added to this fallback chain, but i think there must be another problem on your machine, because LOCALAPPDATA and APPDATA are not found too.

One remark: i think HOMEPATH in the current implementation might not on work on some installations. HOMEPATH contains only the path (f.e. and does not give you the drive (c:). So fossil should read %HOMEDRIVE%%HOMEPATH%.