Not fully possible. Foobar2000 remembers full path to music files in it's database and playlists, so the CD made this way will work only when CD drive has assigned the same drive letter as in your computer. If it's not a problem, you can do it like this:
Write the music to the CD in the first session of multi-session disc, then add files on the CD to foobar playlists and database (wth user profiles disabled), burn the foobar2000 direcory as the second (and final session) to the cd, together with autorun.inf (this file should reside in the root direcotry of CD) containing:
CODE
[autorun]
OPEN=foobar2000\foobar2000.exe
ICON=myicon.ICO