# Using Applescript to connect to a Windows Server



## blackoutspy (Oct 3, 2004)

tell application "Finder"
     mount volume "smb://USER@MYSERVER"
end tell

That is what i'm currently using, how ever the problem that exists is that when that script is run, the SMB/CIFS Filesystem Authentication window appears. My question is, what would i add to my script to "press" ok for me on this window?


----------



## wiz (Oct 3, 2004)

tell application "Finder"
	mount volume "smb://userassword@server/share"
end tell


----------



## blackoutspy (Oct 3, 2004)

Sorry i forgot to add that part, i actually do have that in my code, but it still pops up the auth window. Could it be because my windows share doesn't have a password? My address actually looks like this: smb://USER@WINDOWS/SHARE


----------



## wiz (Oct 3, 2004)

try replacing it with smb://USERWINDOWS/SHARE


----------



## blackoutspy (Oct 3, 2004)

Still pops up the auth window. It wouldn't be to bad, except i'm going to use this as a cron script so i can't have it waiting for me to click ok.


----------



## wiz (Oct 10, 2004)

easy way out: create a password for that account


----------

