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

Ben J.

macrumors 65816
Original poster
Aug 29, 2019
1,067
627
Oslo
Hi, folks.
I know very little about Terminal commands and such, but I know that if I paste:

diskutil unmount /Volumes/AU0039

AU0039 will unmount.
(This is a fixed partition on one of my external drives, probably with some enabling software for windows and such, that is impossible to get rid of. It's 30MB, and it's just annoying to have in Finder and dialog boxes.)

I've been playing around with Automator and Scripteditor to try and make a small script/app that I can put in startup items, so I never have to see that volume again.

I'm shure this can be done easily.

Thanks in advance.
 

MacCheetah3

macrumors 68020
Nov 14, 2003
2,286
1,227
Central MN
I am not an AppleScripter but did find this:


So, in your case:

1. Launch Script Editor
2. Input
Code:
do shell script "diskutil unmount /Volumes/AU0039"
3. Go to File -> Export...
— Name the file whatever you want (e.g. unmount-ext_AU0039)
— Choose a save destination
— Verify the File Format is Script Application
4. Add the file to Startup/Login Items

I have not tested this on (re)boot to ensure that macOS runs the script and does not simply open the editor.
 
Last edited:
  • Like
Reactions: Weaselboy

Ben J.

macrumors 65816
Original poster
Aug 29, 2019
1,067
627
Oslo
BINGO!
Thank you MacCheeta3, that was almost spot on, only thing was; I had to save as an application in Script Editor, then add to loginitems. A script would just open the editor.

I restarted just now, and the little annoying volume disappeared after a second or two of the Finder appearing.

(JFYI: this volume was especially annoying because it could not be erased or removed in Disk Utilities, and if you tried to eject it in finder, it would just pop up again. Only way to eject it was thru Terminal or 'Deactivate' in DU.)

Thanks again.
 
  • Like
Reactions: MacCheetah3
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.