You can create a batch file with the following contents:
net use e: \$hostname\$sharename $password /u:$sharename /persistent:no
and place it in your Startup menu.
Alternatively, you can use “Map Network drive” under “Tools” menu in File Explorer , and check “Reconnect at login” option.
When you are using Windows Vista, “Map Network drive” GUI menu is at right-click on Computer in Start menu. You can also map sub-folder to drive. If you want to mount entire share to drive, you just need to right click on the share and select “Map Network Drive…”.