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: Jeremy Matthews <email@hidden>
- Date: Sat, 07 Aug 2010 18:59:00 -0400
Stephen,
Thanks - I had just dipped into the framework to get info, but the SCPrefs are definitely a little more work..funny thing about NSHot is that most the methods are deprecated....bummer.
-j
On Aug 6, 2010, at 10:52 PM, Stephen J. Butler wrote:
> 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