Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

An AppleScript app to force Setup Assistant to run Install
There have been past hints (in 10.5; from 2001) about how to force the initial Setup Assistant to run again, but these methods were both very manual and required booting in Single User mode.

I've created an AppleScript app -- Clean Install.app -- that will allow you to 'clean' any attached OS X volume (other than the current startup volume). The script removes all the home folders, and the netinfo database (Tiger) or user info plist's (Leopard+), then forces the initial Setup Assistant the next time the 'cleaned' volume is booted. The application is completely written in AppleScript and can be edited, so feel free to make whatever customizations and modifications you want.

This allows you to take a fresh OS X install, add any software and run any updates you'd like, and then give it to the end user as though it were a brand new system. It's also useful if you're selling your Mac and just want to clean off all your info.

[robg adds: I have mirrored the program here on macosxhints, in case the original ever vanishes (Clean Install.app). Newest versions will be found at the author's link, so check there first. I've looked through the source of the script, and it looks fine, but I haven't tested it myself. It is destructive, of course, so make sure you know what you're doing before using it.]
    •    
  • Currently 2.78 / 5
  You rated: 5 / 5 (9 votes cast)
 
[10,806 views]  

An AppleScript app to force Setup Assistant to run | 4 comments | Create New Account
Click here to return to the 'An AppleScript app to force Setup Assistant to run' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
READ FIRST!
Authored by: bcometa on Jul 24, '09 11:37:55AM

Do not run on a hard drive with the same name as your internal drive!

Just deleted my desktop, some library stuff, and who knows what else because my hard drive ("MacHD") had the same name as the drive I was trying to run on (even though your internal drive isn't supposed to show up in the drive listing).

I've been waiting for a script like this for years, so willing to give it another shot or two. Restoring from SuperDuper backup now and will try again after renaming destination hard drive-- will post results.



[ Reply to This | # ]
Works!
Authored by: bcometa on Jul 24, '09 01:05:08PM

looks like it worked pretty perfectly for a 10.5.7 pbg4...

note: looks like it deleted the "shared" user -- but isn't that installed by default w/ a new install? i believe it should always keep the shared user, but perhaps delete the contents within it, no? perhaps it should keep the contents --some apps do use "shared" for certain things... i.e. adobe.

request: As I usually add all the installed apps to the dock for a computer i'm selling, it would be awesome if there was an option to copy com.apple.dock.plist from the initial [setup] user (or a specified user) to /System/Library/User Templates/English.lproj/Library/Preferences. This will keep the already customized dock for the new user (so they don't have to add all the apps installed back on the dock).

thanks again, this is great!!



[ Reply to This | # ]
Working on Same Name Bug Fix
Authored by: kennethson on Jul 24, '09 01:45:40PM

Just to let you all know, I'm currently working on a fix so that this handles Multiple Volumes with the same name in a more predicable fashion.



[ Reply to This | # ]
An AppleScript app to force Setup Assistant to run
Authored by: igolfer on Oct 14, '09 08:24:52PM

It still doesn't work correctly. I should have read the comments before I ran it on a computer with same hard drive name as volume I was erasing, but I didn't, and I lost all of my documents, downloads, music, pictures. It would be really handy if you would actually fix the issue, it has been a while since you claimed you would fix it. I will enjoy going though the long process of recovering my files.



[ Reply to This | # ]