1 Reply Latest reply: Aug 28, 2013 10:08 AM by Camelot
BiggZach Level 1 Level 1 (90 points)

I am trying to create and Automator workflow that mounts a users home folder when they run it. I can use the "Get Specified Servers" with the folder coded in but I need a workflow that will work for multiple users.

 

Here is what I am trying but can't get it to work:

 

1 - Ask for Text (The user puts the name of the remote folder here (it matches their username))

2 - Set Value of Variable - username

3 - Get Specified Servers (I need the varible passed to one of the urls here)

 

The users home folders are hidden folders on a Windows network share so it has to end with $

 

Thanks,

 

Zach

  • Camelot Level 8 Level 8 (46,120 points)

    I am trying to create and Automator workflow that mounts a users home folder when they run it.

     

    By definition, a user's home folder will be mounted when the user logs in. Therefore you can't mean their home folder. You may have some other user-specific folder that you want to mount post-login, but don't confuse that with a home directory.

     

    1 - Ask for Text (The user puts the name of the remote folder here (it matches their username))

     

    If the name of the folder always matches their username, don't bother asking them for it. Not only is it prone to errors (typos, etc.), delays (waiting for the user to type), but it's also unnecessary. Just use the 'short user name' variable instead.

     

    3 - Get Specified Servers (I need the varible passed to one of the urls here)

     

    The Get Specified Servers action won't normally accept variable inputs in the server URL (bad UI design on Apple's part), but you can work around it by substituting the variable's UID. That is a little tacky, IMHO, so your other option is to mount the share via some other way that does accept variable inputs (e.g. a shell script or some such).