A common scenario when testing SharePoint is to switch between multiple user accounts to imitate different user roles. A normal way to do this is to use SharePoints “sign in as a different user” function or right click on a browser/program and use the “run as a different user” function in windows.
The first method can result in you are sign in as the current user when you are browsers other resources dependent on your internet explorer settings.
The second will solve this problem. But you need to enter username and password each time you start a new browser session.
To overcome you need to enter username and password each time. You can use the “runas” program call from a .bat file. With the syntax like this, can you indicate the username. And you only need to enter the password the first time you run the .bat file:
runas /user:[domain\username] /savecred “[path to browser/program]”
runas /user:domain\SP13TestAO1 /savecred "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
And create a .bat file for each user role, it is easy to switch between user session: