Jump to content

Map Windows home drive to desktop script example


Recommended Posts

Posted

Hi, Has anybody got a good example of a script that I can use to map a windows home drive to the mac desktop on login. Using Yosemite workstations bound to active

directory and managed through Yosemite profile manager. Can mount drive to users folders by going to 'connect to server' but cannot get a script working. Any samples

would be much appreciated.

Posted

OK Managed to find a script but have run into a small problem,

 

The script is basically as below:

 

tell application "System Events"

tell current user

set fn to full name

try

mount volume "smb://server/shared area/" & fn

end try

end tell

end tell

 

The problem I have is that it will only work if the username of the logged in user is the same as the Display name in Active Directory. e.g. Staff user atest login name is atest but their display name is A Test - Head of Maths.

This will not work. The only way I can get it to work is to change the display name to be the same as the login name: atest. But this now means that it affects the email display details.

Anybody know if I can change the script so that it reads from the username and not the display name.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...