From: Chris Morris Date: 2003-03-21T22:44:05+09:00 Subject: Re: GetComputerName using Win32API > Shashank Date wrote: > > # GetComputerName using Win32API > > > > require 'Win32API' > > > > def get_computer_name() > > require 'socket' > > p Socket.gethostname Also: ENV["COMPUTERNAME"] (Although that may not work across all Windows ... it should work NT/2k/XP)