Hi dave,
I'm not sure whether you're asking for: (1) a script to start File Sharing, or (2) a script to ensure that the File Sharing CP's 'Enable File Sharing clients to connect over TCP/IP' checkbox remains selected across restarts.
If it's case #1, Apple itself used to provide sample scripts/applets to perform this task. [
Note (2000/06/30): This assumes that File Sharing isn't already automatically starting up when you reboot (e.g., because you manually stop it at some point before you shut down).] On my own hard drive, there are at least three versions:-
- The 'Start File Sharing' applet, in the '<HD> : Apple Extras : AppleScript : Automated Tasks :' subfolder.
- The 'Start file sharing' applet, in the '<HD> : Apple Extras : Speech Technology : More Speakable Items :' subfolder.
- The 'turnFileSharingOn' script, in the '<HD> : System Folder : Help : Mac Help : shrd :' subfolder.
You'd just have to copy or alias one of these versions (first making it an applet if necessary) into your System Folder's 'Startup Items' subfolder. If you don't have access to any of these versions, let us know and we can post a copy here for you. Note that, in addition to the File Sharing control panels & extensions being active, the 'FileSharing Commands' OSAX must also be present in the '<HD> : System Folder : Scripting Additions :' subfolder. You'd also need to double-check that the File Sharing CP's 'Enable File Sharing clients to connect over TCP/IP' checkbox is selected.
On the other hand, if it's case #2, then it's likely that a system-level issue is preventing the checkbox from retaining its setting. You could try trashing the 'File Sharing' prefs. Also, check out the related threads over in Apple's own 'Mac OS [Archive] Discussion' Forum, such as
OS9.0 & TCP/IP Filesharing Problem, or
File Sharing + TCP/IP, or
TCP/IP File Sharing off after restart, or
Enable TCP/IP File Sharing button won't stick. Some of those threads also suggest other workarounds if the system-level fixes don't work. For example, you could try aliasing the 'ShareWay IP Personal Bgnd' or 'ShareWay IP Personal Background' "extension" (it's actually an app) into your System Folder's 'Startup Items' subfolder. If that doesn't work (note that the checkbox may still appear unselected even though the extension did nevertheless launch okay), you could try explicitly
telling the extension to
start. If that doesn't work either, you could try using a 3rd-party OSAX that can script mouse-clicks (to simulate selecting the 'Enable File Sharing clients to connect over TCP/IP' checkbox in the File Sharing CP), such as
Akua Sweets,
Sandi's Additions, or
Cursor.
Regards,
--Paul
[This message has been edited by Paul Crawford (edited 06-30-2000).]