Finder's "Connect to Server <smb share>" by shell script

Discussion in 'Mac Programming' started by Mac2013orlater, Mar 1, 2015.

  1. Mac2013orlater macrumors member

    Feb 2, 2014
    The goal is to reproduce Finder's Connect to Server .. in shell script.
    Whereby it is a smb share where the connection has to be made to.

    I wonder what are all the sub-operations conducted by Connect to Server, because when I write a shell script carrying out as following
    - mkdir <mount point>
    - chmod bla bla bla, for the mount point dir
    - mount <aimed-smb-path>
    all I miss is the smb share entry in Finder window which usually is created
    by Finder's Connect to Server but not when I run my script.
    What does my script miss?
  2. kryten2 macrumors 6502a

    Mar 17, 2012
    You can use the mount volume command from AppleScript's File Commands suite in combination with osascript.

    Info : - -

Share This Page