I do the exact thing you are asking
I have a couple of scripts on my desktop that I run when I want a certain share mounted.
The only thing different I do to what you have written above, is I have made a credentials file which contains my username and password. If you use the above example that you have written, it won't work because it will also need a password.
You have two options, first being, add the password into your script, or second, use a credentials file. Depends on how secure you want it really. If anyone comes along and views your script, they will see your password.
If you are worried about this, use a credentials file.