I am looking for a way to access the value of %HOMEPATH% under Windows (or more generally, any environment variable of the form %name%).
The use case is to have a consistent init.el across multiple operating systems. In Linux and OS X, (expand-file-name "~") always gives the home folder, but the same command under Windows it returns %HOMEPATH%/AppData/Roaming.