Re: settings computer name, host name, & local host name
Re: settings computer name, host name, & local host name
- Subject: Re: settings computer name, host name, & local host name
- From: "Stephen J. Butler" <email@hidden>
- Date: Fri, 6 Aug 2010 21:52:54 -0500
On Fri, Aug 6, 2010 at 4:22 PM, Jeremy Matthews <email@hidden> wrote:
> So, I know there are a number of ways to GET computer name, local host name, and host name (this one only by scutil??) - is there a method folks out there are using to SET each of these?
> Other than NSTask and scutil???
Not Cocoa, but I'll answer this anyway. The 'sc' in 'scutil' stands
for SystemConfiguration, and there's a whole framework for that:
<http://developer.apple.com/mac/library/documentation/Networking/Reference/SysConfig/>
In your case, you want SCPreferencesSetComputerName() and
SCPreferencesSetLocalHostName(). I think there's also something in
there for setting the hostname in SCNetwork.
<http://developer.apple.com/mac/library/documentation/Networking/Reference/SCPreferencesSetSpecific/Reference/reference.html#//apple_ref/doc/uid/TP40008297-CH2-DontLinkElementID_1>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden