In this SAS online training video, you'll see how to setup the autoexec feature of SAS.
Once you have the libname statements in a .sas file then simply right click on your SAS icon, click Properties, then in the Target field, add a space, then "-autoexec", another space, and then your path, e.g. "C/libnames.sas"
So the final Target path might be:
D:/SAS 9.2/sas.exe -autoexec "C/libnames.sas"
visit http://www.BIexamAcademy.com for more SAS online training!