Mac Staff Home – dock shortcut

UPDATE – Cam commented on this post last year and I adjusted the code but never posted the update. I’ve posted an update for dock shortcuts using WebDAV but some people might still need to use these ones so I am updating the code to make it a bit better.

Now it falls over to enter a different username if the local name is wrong, it also improves the original posted code by ignoring the mounted drive if it’s already mounted and also mounts directly to the user folder instead of also showing the top level Home$ share. Oh yeah it also opens a finder window to the base so you can just click it when ever you want to bring up a finder to the share folder.

So there are a few of these out there and it’s usually a techs first delve into Mac when they get asked to create a short cut to connect to a file share. Simple connections to afp or smb shares are easy but then you hit a wall when you get asked to make it connect to the specific Users folder.

Original Code

Improved Code

 

Step by Step

Open AppleScript Editor and paste the above in.

Adjust the name of your share appropriately – this will not work exactly as is unless you work at the same place as me or you happen to have the same setup.

Screen-Shot-2013-11-05-at-6.17.33-pm

Save the script first and then Export it and choose the File Format to be Application

Screen-Shot-2013-11-05-at-6.54.27-pm

Using the Keynote trick you can make a high res icon for it – once upon a time there was a a bunch of effort required to do this but now it’s too damn easy.

Right click the new app and Get Info (command+i)click the icon so it has a blue highlight and then paste your image – icon done.

2minute example –

staff-home

Now to finish off, when you store the new shortcut you’ve made put it in your /Users/Shared folder.

Screen-Shot-2013-11-05-at-6.17.15-pm

Once you’ve installed it there and changed the permissions in the Get Info to be re Read&Write for everyone. It can now be dragged to or MCX’d to anyones dock on that Mac.

As I had pointed out to me;

always a few ways to achieve the same thing

There are a lot of ways to do the connection, this is just the way I have done it and if you like please feel free to add some in the comments =)

The reason for the secondary line in the script is so that when a user clicks the shortcut it will open a finder to the folder rather than just mounting it. I honestly should go and add some error checking and also put in some dialogues for failure to clean it up. I should also do a check to see if the drive is mounted already to skip that step if it isn’t needed, as then it would become the button that a user can click to bring up the share space every time.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply