Skip to content

Instantly share code, notes, and snippets.

@fgardavaud
Last active January 11, 2021 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fgardavaud/71c280e98f64641052d690db49c18128 to your computer and use it in GitHub Desktop.
Save fgardavaud/71c280e98f64641052d690db49c18128 to your computer and use it in GitHub Desktop.
script to connect network drive with samba protocol in apple script langage
------------------------------------------------------------------------------------
-- Script name : Reseau_v2.app
-- Aim : Connect network drive with samba protocol with macOS system.
-- No configuration is required by the user except to give the right of program execution if SIP is active on your computer
-- try is to avoid finder infinite loop if you can't acces to the network drive for various reasons.
-- Author : Francois Gardavaud, MPE. Medical Physicist Expert.
-- Date : 07/09/2020
-- Version number : 2.0
-- OS : macOS
-------------------------------------------------------------------------------------
tell application "Finder"
try
mount volume "smb://your_URL_path_with_domain_name" as user name "your_login"
end try
delay 2
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment