+ Post New Thread
Results 1 to 5 of 5
Scripts Thread, Apple Script - to mount several drives in Coding and Web Development; Afternoon, Just been writing a script to make an alias to the desktop and open two network locations. Code: tell ...
  1. #1
    mdench's Avatar
    Join Date
    Oct 2011
    Location
    Billingshurst
    Posts
    808
    Thank Post
    40
    Thanked 104 Times in 94 Posts
    Rep Power
    39

    Apple Script - to mount several drives

    Afternoon,

    Just been writing a script to make an alias to the desktop and open two network locations.

    Code:
    tell application "finder" to make new alias file at (path to desktop folder) to ("Macintosh HD:Users:Shared:Music Store") 
    tell application "finder" to open location ("smb://music/mtechshare")
    tell application "finder" to open location ("smb://music/%username%")
    The last two require auth against the share with AD username / password. Is there anywhere to specify these items from the initial login? So that the script will auth the user against the mtech share and then place there username into the second mount script so that it will mount there home folder onto the desktop?

    Cheers guys n gals

  2. #2

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,896
    Thank Post
    3,415
    Thanked 1,081 Times in 997 Posts
    Rep Power
    369

  3. #3
    mdench's Avatar
    Join Date
    Oct 2011
    Location
    Billingshurst
    Posts
    808
    Thank Post
    40
    Thanked 104 Times in 94 Posts
    Rep Power
    39
    so is it possible to get the script to place the currently logged in username into mount string? The idea is that each student / staff should be able to log onto the macs and hopefully if i get it to work this script will automatically mount the relevant drives. One of which is there own homes folder on a linux box.

  4. #4


    Join Date
    Feb 2007
    Location
    51.403651, -0.515458
    Posts
    9,354
    Thank Post
    241
    Thanked 2,808 Times in 2,073 Posts
    Rep Power
    812
    Quote Originally Posted by mdench View Post
    so is it possible to get the script to place the currently logged in username into mount string?
    This script may help (it uses 'whoami' to get the username)...

    www.edugeek.net/forums/mac/46738-macs-drive-mapping.html#post429058

  5. #5

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,896
    Thank Post
    3,415
    Thanked 1,081 Times in 997 Posts
    Rep Power
    369
    Quote Originally Posted by Arthur View Post
    You're Arthur :P *tongue in cheek*

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 1
    Last Post: 26th April 2013, 10:59 AM
  2. Replies: 3
    Last Post: 22nd November 2012, 08:33 PM
  3. Replies: 1
    Last Post: 6th October 2010, 08:49 PM
  4. Script to Defrag all drives on log on
    By nephilim in forum Scripts
    Replies: 1
    Last Post: 5th October 2010, 11:51 AM
  5. Replies: 3
    Last Post: 25th October 2007, 09:14 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •