Skip to main content
Question

self deleting startupitems

  • March 16, 2009
  • 3 replies
  • 9 views

Forum|alt.badge.img+11

Hi People,

Im trying to write some startupitems that well delete themselves after they have run, Casper's FirstRun script uses the following command

/bin/rm -rf 'path to folder'

i have tried this and it doesnt delete itself

Criss Criss Myers
Senior Customer Support Analyst (Mac Services)
Apple Certified Technical Coordinator v10.5
LIS Business Support Team
Library 301
University of Central Lancashire
Preston PR1 2HE
Ex 5054
01772 895054

3 replies

Forum|alt.badge.img+5
  • Contributor
  • March 16, 2009

I found some oddities with casper here, and since we use laptops and are not always downloading new policies, I created a launchd item and a script...the launchd item loads on boot and executes the script - the last two thing the script does is to securely delete the launchditem, and then the script itself...reboots if needed.

-j


Forum|alt.badge.img+23
  • Valued Contributor
  • March 16, 2009

Why not use a "once per computer" or "once per user" policy?

----------
Miles A. Leacy IV

? Certified System Administrator
? Certified Trainer
Certified Casper Administrator
----------
voice: 1-347-277-7321
miles.leacy at themacadmin.com
www.themacadmin.com


Forum|alt.badge.img+21
  • Contributor
  • March 16, 2009

I have a few things that do this at startup without issue. I also utilize one of the features of the JAMF binary to make sure the network is up and the JSS is available before attempting the command. I had some Recon issues so I made a startup item recon that deletes itself after it's run.

Not sure if the list will pass the DMG, but if it doesn't let me know.

Craig E