On Fri, Aug 6, 2010 at 4:22 PM, Jeremy Matthews <jeremymatth...@mac.com> 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to