"TheUserName" represents the Windows user that shared the volume or is set for the network share to have access.
"TheShare" is the name of the directory you shared in Windows.
On your Mac, open Scripteditor (Applications > Utilities > Scripteditor) and create a new file.
Paste the two lines with the correct values, a.e.: (assuming the Windows user is named "Jill" and the shared directory is "HomeMovies")
AppleScript:
tell application "Finder" to mount volume ("smb://Jill@jill-pc/HomeMovies")
tell application "Finder" to open ("HomeMovies")
By pressing the "Play" triangle you can test the script. Confirm the pop-ups, enter the password the Windows share has and select "save password in keychain". Then test the script again.
If it works, you can select "Export... > File type: App" and save it on your desktop.
I prefer entering the IP of the PC instead of the name but this requires a static IP and not DHCP.