Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DougTheImpaler

macrumors 6502a
Original poster
I'm kind of a newb to AppleScript, so I was wondering if someone could give me some guidance. I said VNC in the title but I really mean VPN. I don't want to control a machine; I just want to get to a share.

I'm trying to create a script that will launch Internet Connect and connect VPN-style to a specific IP address, then mounts a share with a specific username, password, and (since it's a Windows network) domain. I also would like this same script to mount a share on my local network.

I figure I can tell it to mount stuff something like this:

Code:
tell application "Finder"
	mount volume "smb://DOMAIN;username:password@machine_name/directory"
	mount volume "smb://WORKGROUP;username:password@machine_name/directory"
end tell

That should get it to mount the share on the Windows domain I'm VPN'ing into and also mount the share on my Windows machine at home, right? What aboug launching Internet Connect and telling it to connect to that VPN? Any suggestions?

My idea here is to make one script that sets up everything so that my wife can get to a file over VPN, edit it in PowerPoint 2004, copy it to the Windows box to verify it works fine in PP2003, and then copy it back to the share with a new name. That way she doesn't have to worry about mounting volumes, and when she's done she can throw them in the trash to unmount.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.