function name = get_machine_name

% get_machine_name - get machine name from registry
% -------------------------------------------------
% 
% name = get_machine_name
%
% Output:
% -------
%  name - name of machine from registry
%
% NOTE: this only works on windows

%--------------------------------
% Author: Harold Figueroa
%--------------------------------
% $Revision: 701 $
% $Date: 2005-03-11 16:53:22 -0500 (Fri, 11 Mar 2005) $
%--------------------------------

%--
% machine name from logon registry entries
%--

name = winqueryreg( ...
	'HKEY_LOCAL_MACHINE', ...
	'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon', ...
	'DefaultDomainName' ...
);

% winqueryreg( ...
% 	'HKEY_LOCAL_MACHINE', ...
% 	'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon', ...
% 	'AltDefaultDomainName' ...
% )
% 
% %--
% %  user name from logon registry entries
% %--
% 
% name = winqueryreg( ...
% 	'HKEY_LOCAL_MACHINE', ...
% 	'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon', ...
% 	'DefaultUserName' ...
% );
% 
% %--
% % user name from matlab registry entries
% %--
% 
% winqueryreg( ...
% 	'HKEY_LOCAL_MACHINE', ...
% 	'SOFTWARE\MathWorks', ...
% 	'Name' ...
% )
% 
% winqueryreg( ...
% 	'HKEY_LOCAL_MACHINE', ...
% 	'SOFTWARE\MathWorks', ...
% 	'Company' ...
% )
% 
% %--
% % user name from windows registry entries
% %--
% 
% winqueryreg( ...
% 	'HKEY_LOCAL_MACHINE', ...
% 	'SOFTWARE\Microsoft\Windows NT\CurrentVersion', ...
% 	'RegisteredOwner' ...
% )