Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!stanford.edu!unix!mxmora@unix.sri.com From: mxmora@unix.sri.com (Matthew Xavier Mora) Newsgroups: comp.sys.mac.programmer Subject: Init Delete Thyself Message-ID: <24620@unix.SRI.COM> Date: 22 May 91 22:28:42 GMT Sender: news@unix.SRI.COM Organization: SRI International Lines: 20 How do you get an init to delete itself? I have a message init that displays a message at startup like, "We have installed new printer drivers on your machine please call ext xxxx if you have any problems." After the user clicks ok, the init should delete itself. Currently I have the Init delete the INIT code resource out of the resource fork. This makes the init benign, but still leaves the init file in the system folder. This is not optimal. I would like to completly delete the file from the system folder but there seems to be a few problems. For one, the file is busy and the second thing, if you delete a file in the system folder at init time, then you screw up the index count of the system folder. So how do you get an init to delete itself? Do I have to set up some vbl task or something? Thanks Matt