Re: Enable Personal File Sharing programatically?
Re: Enable Personal File Sharing programatically?
- Subject: Re: Enable Personal File Sharing programatically?
- From: Andrei Tchijov <email@hidden>
- Date: Tue, 16 May 2006 11:34:22 -0400
When your user enables/disables Windows Sharing, the only things
which get changed are launchd's *.plist files responsible for SMB
sharing
/System/Library/LaunchDaemons/nmbd.plist and
/System/Library/LaunchDaemons/smbd.plist
When Windows sharing is disabled, both these files have 'Disabled =
true'. You should be able to enable/disable Windows sharing by
"unloading" these 2 things with launchctl, changing these 2 files and
then loading them back (with launchctl). You do need root privileges
to do it.
On May 16, 2006, at 11:23 AM, Joshua Scott Emmons wrote:
I have an application that requires personal file sharing to be
enabled for some of its features to work. If it is not enabled, and
one of those features is selected, I display a dialog explaining
how to turn personal file sharing on. For security reasons, I also
suggest that the user turns file sharing back off when finished.
It's actually a really annoying process: Open the System
Preferences app. Wait. Select "sharing". Wait. Click on "Personal
File Sharing". Wait. Repeat to disable when done.
If it annoys me, it has to be annoying my users. Is there a way I
can use Cocoa to enable file sharing programatically (maybe
prompting the user for an admin password if needed in the process)?
It would be way better for my usability if a user could, say, click
a button on my warning sheet to enable file sharing instead of
going through the whole System Preferences thing.
Any ideas?
Cheers,
-Joshua Emmons
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden