• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: settings computer name, host name, & local host name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: settings computer name, host name, & local host name
      • From: Jeremy Matthews <email@hidden>
References: 
 >settings computer name, host name, & local host name (From: Jeremy Matthews <email@hidden>)

  • Prev by Date: Re: Main Thread Crashing in Multithreaded App
  • Next by Date: Re: Wow! Just installed OPENSTEP ENTERPRISE 4.2
  • Previous by thread: settings computer name, host name, & local host name
  • Next by thread: Re: settings computer name, host name, & local host name
  • Index(es):
    • Date
    • Thread