From: Daniel Berger Date: 2008-08-16T01:06:00+09:00 Subject: Re: How to get Windows user name? On Aug 14, 4:50 pm, Mike Johnson wrote: > Hi, all > > I am trying to detect the user who's currently login the Windows system. > Is there way to do it in Ruby? This is the one function of the 'etc' library that works on Windows: require 'etc' puts Etc.getlogin Or, you can use the sys-admin library, which provides much more functionality on Windows: gem install sys-admin require 'sys/admin' puts Sys::Admin.get_login Regards, Dan