[comp.sys.mac.programmer] CREATING INITs....How to?

osborn@ux1.lbl.gov (James R Osborn) (05/17/91)

In article <3598@edinboro.edu> bradley@edinboro.edu (DJ) writes:
>
>Hello, I have written a QuickBasic program to check for the existence of
>a certain disk and a certain file with certain information in the file.  This
>program is to be used in a University lab environment where we require
>students to use an activator disk scheme to access the systems.  The program
>works fine as an application and to run at startup time with multifinder as
>a selected set startup application.  Since it is very easy for a student to
>change the set startup I am looking for a way to create some type of INIT or
>startup document to do the same.  I don't know where to begin to creat an INIT
>and if anyone has created INITs and would like to suggest some help I would
>gladly appreciate it.  Or is there a way to keep a user from changing the
>startup settings once they are set?  This may also be an init of some kind,
>but I would really like to know what to use to create INITs.
>
>                Thank You in advance,        
>                Dennis J. Bradley
>                Computer and Communications Center
>			Edinboro University of PA
>			BRADLEY@EDINBORO.EDU
>			(814)732-2931

You may not need to write an INIT, try this:
(I'm using a IIci with 6.0.7...)

1) Do your "Set Startup..." with MF and your program
2) Go to your system folder and "Get Info..." for the file "Finder Startup"
3) LOCK IT (click in the "locked" box)
4) Close everything back up

Now go ahead run some other applications or just do "Set Startup..." with
no applications.  The Finder will not tell you there is any problem,
but when you reboot, your original program will be the one that gets
loaded.  At least this works on my computer with 6.0.7 running.

This won't stop them from throwing away this file if they know that
this is the one to throw out and if they know how to unlock it (or that
they can throw out locked files directly by holding the option key).  But
at least this is a little better.  And it's alot easier than writing
an INIT if it works for you...

-- James

|-----------------------------------------------------------------------|
| James R. Osborn              | It just goes to show you it's always   |
| Lawrence Berkeley Laboratory | something.  Either it's incorrect tech |
| osborn@ux1.lbl.gov           | notes or your mac is smoking.  It's    |
| (415) 548-8464               | always something...                    |
|-----------------------------------------------------------------------|