- First mount the network share you wish to automatically open at login. 
 
- Now to have the mounted network share appear on the desktop, select Finder – Settings and tick the option Connected server.
 
- Next open System Settings and from the sidebar choose General. 
 
- In the main panel of General locate and select Login Items
 
- Drag and drop your network shares icon into Open at Login
 
- Close System Settings 
 
- Now when you log in your computer will automatically mount your network share
 
While it is relatively easy to automatically mount network shares in macOS. As Finder will by default open a Finder window, for each network share that is opened. When you sign into your computer, its desktop can appear cluttered. So we prefer to use an Apple Script that will auto mount network shares, but not automatically open Finder windows.
- Open Launchpad – Other – Script Editor.
 
- Now copy the following script: 
 
try
	
	
-- (1) Check that server volumes will appear on desktop when mounted
	
	
tell application "Finder"
activate
set desktop shows connected servers of Finder preferences to true
-- (2) mount server volumes
try
mount volume "smb://ip-address/share-name"
			
			
display notification "The network shares you requested are now available." with title "network-name network shares"
			
		
end try
end tell
end try
- Past the script into Script Editor.
 
- Substitute the parts that are in bold for the address of your file server or NAS and the name of your network.
 
- Save your script [ File – Save].
 
- Test that the script works by running your script.
 
- Turn your script into an application by choosing File – Export.
 
- In File Format select Application from the drop down menu.
 
- Save your application.
 
- Drag and drop your application into Login Items.
 
Note: You will find that if you auto mount your network shares, it will take slightly longer to sign in. Also if you are a laptop user, when your computer is not connected to your network, it will still try and mount your network shares. So it is for this reason that we prefer to use a different script that we wrote specifically for laptops.
 
Add comment