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

NordmoleX

macrumors member
Original poster
Jul 10, 2017
56
8
Hi guys, after being away from Mac for a few years again, and even before only having brief experience with it, something I remember even back then having the same issues with.

When I attach my Network drives (Synology NAS) in MacOS, so its automatic mounted at each start, how can I prevent Finder to open them up every reboot ? Its annoying. I remember there was a checkbox to hide this, but that's not helping. I am sure this is something simple, but I don't find a solution. And sure none that isn't like 10 years ago. Since things probably have changed.

I would appreciate any help. ;) Thanks in advance.

Wolf
 
The problem is, its not a problem of simply mounting the drives from my NAS. With the automatic logins for these network folders, they work fine each reboot. But no matter if I check the "HIDE" box, finder will always open all those drives in a separate window at the start, and that's more like window spam ^^if you have enough network drives. ;)

All those possibilities you posted above seem to stop that. There is also no real description, that other than actually mounting the Network drive (which works as is) but I can't stop the piling up of all the finder windows each reboot. Must be a way. Or not ?
 
Maybe follow the direction in the following video:

Then put the NAS smb mount and put it on desktop and save your password and drag that to your Dock! So in future if you want to connect to it just click the share disk icon in Dock to initiate a smb connection!
 
Last edited:
  • Like
Reactions: NordmoleX
When I attach my Network drives (Synology NAS) in MacOS, so its automatic mounted at each start, how can I prevent Finder to open them up every reboot ?
Define "attach".

What I do is make an Applescript that connects to the various shares, then put that in Login Items.

tell application "Finder" try mount volume "smb://DiskStation.local/Archive" mount volume "smb://DiskStation.local/Documents" mount volume "smb://DiskStation.local/Media" mount volume "smb://DiskStation.local/Pictures" on error number n display alert ("Error " & n & " on network share mount") end try end tell
 
  • Like
Reactions: NordmoleX
Must be a way. Or not ?
Remove anything related to the shares from your Login Items. In my quick test with a share in Login Items, I also got an extra Finder window to close. Make an AppleScript script or application, like posguy99 suggested, that connects to the various shares, then put that in Login Items.
Example :

AppleScript:
mount volume "smb://DiskStation.local/Archive"
--No need for a Finder tell block

or you could leave everything as is and make an AppleScript script or application, then put that in Login Items with the following code :

Example :
AppleScript:
tell application "Finder"
    close (get every window whose class of target is disk and ejectable of target is false)
end tell
 
Last edited:
  • Like
Reactions: NordmoleX
Good stuff.

Sorry, I misunderstood the mounting/Finder window bit.

Any chance to open all the mounts as tabs, instead of windows...so only a single Finder window? Maybe set a Finder preference? Assuming that would be useful.

I was curious to see what is out there for pre-made apps/tools/scripts, and this might be worth testing, if scripting is not tempting.
 
  • Like
Reactions: NordmoleX
Any chance to open all the mounts as tabs, instead of windows...so only a single Finder window? Maybe set a Finder preference? Assuming that would be useful.
I don't know. Finder tabs are so fundamentally broken that I have them disabled as much as can be done.
 
  • Like
Reactions: NordmoleX
Something didn't work without it being in a tell block. Maybe it was the error code display. I disremember, now... have had that script for ages and ages.
You're right. Alert displays can be obscured by other application windows. The usual workaround is to
wrap that in a Finder or System Events tell block. I would go for a display notification statement. Less obtrusive.
 
  • Like
Reactions: NordmoleX
@kryten2 , I tried your script (have to admit, I never scripted before), and saved it and added it to the startup objects list, where also my network drives are. Can you please tell me if I did it correct, because its not working. There is a good chance I did some wrong, but I think I didn't. ;)
 

Attachments

  • Bildschirmfoto 2021-10-28 um 10.50.48.JPG
    Bildschirmfoto 2021-10-28 um 10.50.48.JPG
    26.8 KB · Views: 188
  • Bildschirmfoto 2021-10-28 um 10.50.57.JPG
    Bildschirmfoto 2021-10-28 um 10.50.57.JPG
    157.6 KB · Views: 192
Define "attach".

What I do is make an Applescript that connects to the various shares, then put that in Login Items.

tell application "Finder" try mount volume "smb://DiskStation.local/Archive" mount volume "smb://DiskStation.local/Documents" mount volume "smb://DiskStation.local/Media" mount volume "smb://DiskStation.local/Pictures" on error number n display alert ("Error " & n & " on network share mount") end try end tell

@posguy99

Can I ask you what's that ".local" at the end ? Is that something you do on your side, or is it something that must be defined ? I usually rather use the direct IP of my NAS. Do I still need the ".local" at the end ?

THanks

Wolf
 
Also, is it normal that the Script Editor now starts every reboot of MacOS ? I am not sure if I did all correct. When you did a script in the editor, you press that tool icon I suppose, which compiles it and then you export it, correct ? If that's alright, then I did it the right way. But still, why does the Script Editor loads each reboot ?

Sorry for being noob. ;) Just don't know about these things yet. ;)
Thanks.

Wolf
 
@kryten2 , I tried your script (have to admit, I never scripted before), and saved it and added it to the startup objects list, where also my network drives are. Can you please tell me if I did it correct, because its not working. There is a good chance I did some wrong, but I think I didn't. ;)
Sorry about that, not your fault. Had the same thing when testing on Mojave. Export the script as an application and put the application in Login Items. Remove the script. When the application runs it should bounce in the Dock briefly. Most people find that distracting and there used to be a way to get rid of it but let's first concentrate on getting it to work for you.
Also, is it normal that the Script Editor now starts every reboot of MacOS ? I am not sure if I did all correct. When you did a script in the editor, you press that tool icon I suppose, which compiles it and then you export it, correct ? If that's alright, then I did it the right way. But still, why does the Script Editor loads each reboot ?

Sorry for being noob. ;) Just don't know about these things yet. ;)
Thanks.

Wolf
Sorry about that too. I didn't experience this when testing on Mojave. I think the system is trying to open the script instead of running it. Default application to do that would be the ScriptEditor. I'll do some more testing on Mojave and Big Sur later this evening. The code should close all those share Finder windows that pop up and leave other Finder windows alone. It might have to be tweaked a little. Did you try running the script manually from ScriptEditor after a reboot? Not trying to confuse you any further by talking scripts and applications.
 
  • Like
Reactions: NordmoleX
Can I ask you what's that ".local" at the end ? Is that something you do on your side, or is it something that must be defined ? I usually rather use the direct IP of my NAS. Do I still need the ".local" at the end ?
That's mDNS. You're fine with using the IP address if that works for you.
 
  • Like
Reactions: NordmoleX
I never used Script Editor before. When I create it, then press the Tool symbol, which I assume means its compiling. How after that I have to save it as an app ? And I am already on Monterey btw. , maybe that also is a factor. I don't know. I appreciate all your help, guys. ;)

Thanks so much.

Wolf
 
I never used Script Editor before. When I create it, then press the Tool symbol, which I assume means its compiling. How after that I have to save it as an app ? And I am already on Monterey btw. , maybe that also is a factor. I don't know. I appreciate all your help, guys. ;)

Thanks so much.

Wolf
Hey Wolf,

Have you figured out the solution for your issue? Im having the same issues

Regards
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.