set username to do shell script "whoami" property pass : "" property network_share : "" property domain : "(Domain)" property server : "(Server Name);" property sharedirectory : "install" tell application "Finder" if pass is "" then set dialog_1 to display dialog "Please enter your password:" default answer "" with hidden answer set the pass to the text returned of dialog_1 end if set network_share to "smb://" (domain) ";"(username) ":" ( password )"@" (server) "/" (sharedirectory) if not (exists network_share) then mount volume network_share else eject network_share mount volume network_share end if end tell