Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!ames!oliveb!apple!applelink.apple.com!MAC.ROMOS From: MAC.ROMOS@applelink.apple.com (Ian Hendry) Newsgroups: comp.sys.mac.programmer Subject: Re: Startup Applications? (How to tell if you are one) Message-ID: <1452@internal.Apple.COM> Date: 19 Apr 89 19:32:33 GMT References: <1623@husc6.harvard.edu> Sender: usenet@Apple.COM Distribution: na Organization: Yeah, I'm organized. Lines: 34 >Is there a way to determine whether your program is running as a startup >application? I suspect it can be done, since PowerStation knows when to >run its startup page and when to run its user interface... Boy what a bad Idea..... That said, I know of one bug that will help in some circumstances: LoMem global $210 is the BootDrive. This is the same as the System folder (as returned by SysEnvirns) except when you are the startup App in which case it is the App dir. This is not a really good solution since if your app happens to be in the system folder it will fail. I take it that you are concerned not only with whether you are the startup, but whether you are actually running as the startup app THIS time(ie you could be the startup and quit and re-run not as the startup). If this is not the case then you could look at the startup file or the boot blocks or whatever. This is probably dangerous, but I really don't know that much about it. Maybe some of the managers are not initialized...doubt you could count on that because INITs may do any of these initializations. Just curious, why do you want to know? PS: By the way this is an area about which I do not know much... so I make no guarantees about this particular post or its correctness. Ian Hendry MAC.ROMOS@applelink.apple.com Make sure my name is in the subject of any Email, or post replies to network. TE: 408-974-4737 Disclaimer: It was all HIS idea anyway! Nothing I say reflects anything my employer means... or anything I mean for that matter.