How to mount Windows drives using script

Joined
Apr 10, 2022
Messages
54
Reaction score
6
Points
8
Hello,
I am running MacBook Pro 2020 macOS 12.6.8
This is not mine but business laptop. I don't have admin privileges and I'm standard user.
I am connecting to business network using VPN (Cisco Anyconnect)
VPN lasts 24 hours ( for security reason) hence every morning I have to re-connect.
I have 5 server in the network that I have to be connected. They all are Windows.
Every morning I have to mount it again.
Initially I used Finder - Go - Connect to Server and start connections.
Now I created a file which has 5 lines like open "smb://server" and it establishes connections to all server when I execute the file.
This is much more convenient for me.
Now I have 2 questions:
1. where would you recommend me to place the file. For now I placed it on Desktop but I'd prefer if it runs every time when I start VPN or etc. i.e. not manually but automatically
2. at the end of execution I have opened Finder window. Could I put something in the file in order to close that Finder window.

Thanks in advance
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top