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 <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