Go Back   The macosxhints Forums > OS X Help Requests > System



Reply
 
Thread Tools Rate Thread Display Modes
Old 07-05-2004, 10:27 AM   #1
nz
Prospect
 
Join Date: Jul 2004
Posts: 16
Question How to use APPLESCRIPT to turn on/off PERSONAL FILE SHARING?

How can I use applescript to turn on/off Personal file sharing unter OSX 10.3.4?
nz is offline   Reply With Quote
Old 07-07-2004, 09:08 AM   #2
bramley
MVP
 
Join Date: Apr 2004
Location: Cumbria, UK
Posts: 2,461
Quote:
Originally Posted by nz
How can I use applescript to turn on/off Personal file sharing unter OSX 10.3.4?

It is probably possible to use GUI scripting to achieve what you want. See here to get you started.

There may also be a way using a UNIX utility but I have no knowledge on that.
bramley is offline   Reply With Quote
Old 07-07-2004, 09:12 AM   #3
yellow
Moderator
 
Join Date: Jan 2002
Posts: 10,677
You should be able to change the "AFPSERVER="entry in /etc/hostconfig from "-YES-" to "-NO-" and back again via the Terminal.
yellow is offline   Reply With Quote
Old 07-08-2004, 02:19 PM   #4
nz
Prospect
 
Join Date: Jul 2004
Posts: 16
Thumbs up do shell script!!!

I got it myself!

Turning on with:
do shell script "/usr/sbin/AppleFileServer" password "x" with administrator privileges

Turning off with:
do shell script "/usr/bin/killall AppleFileServer" password "x" with administrator privileges

"x" is your administrator password!
nz is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 07:38 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.