Hi, does anybody have a best practice in mounting drives via MAC for Kace and to also make sure it shows up on the desktop?




0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0
tell application "Finder"
tell Finder preferences
set desktop shows connected servers to true

end tell
end tell
set user_name to do shell script "whoami"
tell application "Finder"
activate


mount volume "smb://" & user_name & "@server/share/"
delay 1
end tell

This assumes that you are logged into the computer with a username that has access to the network share in question.

Answered 02/15/2017 by: chucksteel
Red Belt

  • Thank you. Do you use the online shell script to push this out or the online kscript?
    • Actually I built a package that places the script in /Applications and a launch agent plist in /Library/LaunchAgents. That package is then deployed to systems via a managed install. When users login to the system the launch agent runs the script and it mounts their network folders for them. The script in our production environment includes several mount points, above is just an example.
      • Thank you for your assistance on this. What happens if the machine is connected from off company network? Do error messages show up?
      • At this point we have only deployed this in lab environments so connecting off campus hasn't been an issue. If we were going to deploy it more widely I would probably include a check on IP address or something similar to verify that we are on the local network.
Please log in to comment
0
I don't think there is a good way to do this with the K1000. We wrote an AppleScript that mounts the network drives and have it launched via a LaunchAgent.

Answered 07/20/2016 by: chucksteel
Red Belt

  • Do you have any scripting examples on that you are willing to share?
Please log in to comment
Answer this question or Comment on this question for clarity

Share