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

reddrag0n

macrumors 6502a
Original poster
Oct 1, 2007
624
161
Canada
i am wondering if there is a script i can create to hide specific drives on my desktop? i know i can hide all drives but i need some to be visable, but the others can be hidden. aka the windows drives and the main opencore boot drive doesn't need to be on the desktop while in mojave

from this...

Screen Shot 2023-09-27 at 12.53.14 PM.png



to this...

Screen Shot 2023-09-27 at 12.53.36 PM.png
 

chabig

macrumors G4
Sep 6, 2002
11,460
9,326
The only way I know to do this is this–make aliases of the drives you want to be visible on the desktop, then hide the hard drives and just use the aliases instead.
 

reddrag0n

macrumors 6502a
Original poster
Oct 1, 2007
624
161
Canada
found my answer buried in this forum

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.
tested and it works like a charm
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.