Connect to server script

Hey guys,

I have a Windows machine at home which acts like my storage point for music and movies.

To connect to it using the Mac I usually click “Go” in the finder and then “Connect to Server”.

Then type in the address “smb://192.168.0.1” and connect. It then asks me for the user name and password.

I’m trying to figure out how to automate the process so that I don’t need to keep connecting it everytime I start up my mac.

Any ideas would be helpful…

So far I’m upto

tell application "Finder"
connect to server

end tell

Hi,

the dictionary of the Finder has no idea how to connect or what a server is :wink:

Try this:

mount volume "smb://user:pass@192.168.0.1/myVolume"

no Finder!

Hello StefanK

Thanks for the info… :smiley:

Kinda new to the scripting world… :cool:

 
on run
	mount volume "smb://user: @ipaddress/myvolume"
	mount volume "smb://user: @ipaddress/myvolume"
end run

After the help I received on this thread… I wrote this simple script. Worked great as long as the PC was using Windows XP SP2

A couple of weeks ago, my brother (who owns the PC) decided to upgrade to Vista. That started my problem. My script wouldn’t work. I tried to connect using Go>Connect to Server… etc… wasn’t working.

I finally found out the fault was on the side of Vista with some added security issues.

However after fixing the issues… I’m able to log into the PC manually. But using the script… here is what comes up.

“Network file permission error.”

Any ideas guys???

Feels kinda weird having to quote myself… :lol:

Anyways… I solved the problem. The problem was that since MS decided to give Vista more security, there is something called Password share or something…and its enabled by default when you share a drive. This simply states that your user account on Vista must have a password on it. If it doesn’t you will not be able to access the drive. Disabling this feature only bring us back to the normal XP style of working.

Hope this info will help…