You can map a network drive using a script or batch file.
Open up Notepad
Type the following in substituting computer with the computer you are connecting to. You will also substitute the folder with the folder name that is shared (only share with who you want to have access) also you can type in the password and username as necessary.
After typing this information in, Click on File and Save As. Type map.bat and select the file type as all files. Save the file where you want it. You can now add it to your startup or to a schedule you set.
net use P: \\computer\folder password /user:username
If you want to disconnect the drive after a period of time, follow the above steps substituting –
net use P: /delete