Do you want to run a special line or two of code inside your batch file for a specific user? Then try this coding.

if NOT %USERNAME%=="USERSLOGINNAME" goto OUT
net use s: \\%servername%\%share%

:OUT

 

**** NOTES ****

do not change the first %USERNAME% in this script

Change the "USERSLOGINNAME" to the users actual login ID without the ""

Change the %servername% to the actual UNC name of you server

Change the %share% to the actual share name of you shared folder.

Also note that is your client PC is 9x you need to also add this to your script anywhere before the code above.

*** You can run any code you want in this section and it will only run for the user specified

Did this info help you? If so, email me and let me know about it or ask a question.