Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

richard.mac

macrumors 603
Original poster
Feb 2, 2007
6,292
5
51.50024, -0.12662
what command or script does disk utility use when it unmounts a volume? its mighty fast. ive currently got this apple script to unmount my vista partition on login:

Code:
do shell script "hdiutil unmount /dev/disk0s3"

but this is excruciatingly slow. what command or script can i use on login to unmount my windows partition as fast as disk utility does?

thanks
 
You can try substituting the diskutil command (same syntax for unmount) to see if that gives you quicker results.
 
cheers for the fast reply! i just tried diskutil rather than hdiutil but their both the exactly the same speed. i want it to be instant like in disk utility so my login speed is acceptable... sorry if this is too much to ask
 
diskutil calls the disk management API to do its thing, that should be what the GUI version of Disk Utility is using also.

Are you sure that this command is what causes your slowdown? Applescript is excruciatingly slow all by itself.
 
oh ok! yeh i think apple script is just slow ay. is there any other way i can unmount a volume on login without using apple script?
i want to unmount my vista partition on login so spotlight stops showing worthless windows results. ive tried a lot of things and this seems the best idea. macfuse/ntfs3g was ok and seemed to stop the results (made it writable so i could add it to spotlighgt privacy) but made restarts take over a minute for some reason.
 
Huh. You can run a shell script directly as a login item, but even that will want to open Terminal which takes a little time to start up.

It's a little more complicated to set up, but you can use loginwindow hooks to run things like this with less overhead.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.