On Wed, Feb 25, 2004 at 10:03:51PM +0900, Moran, Craig M (BAH) wrote:
> Is there a way to specify a directory in Ruby that is profile-independent
> for the Windows NT variants?  For example, if I wanted to do this in VBA for
> the currently logged in user's My Documents folder, it would look like this:
> ProfilePath = Environ("USERPROFILE") & "\My Documents\"
> This way, regardless of who is logged in and runs the script, it will always
> point to their own My Documents folder.  Thanks in advance for the help-
Be aware that this is only correct on english versions of windows. In german
e.g, the folder is not named "My Documents" but "Meine Dateien" (or
something like that - don't use windows very often ;-) ).

I believe that the windows registry is the right place to get that
information from. (I have to admit though, that I have no idea how you could access
the registry from ruby, and where you find this information there).

greetings, Florian Pflug