I got this scenario and I want to check with you any opinion in order to create a better script.
I got the credentials to authenticate (more than 500 users) into a intranet webpage in a excel file. I must read this file, extract the username and create a batch file (it could be a .vbs file also) with a sentence to run a service with the username, not with the user I'm scripting which is actually an admin user. Once the service is running I can open the webpage and proceed with the authentication...
I was thinking to:
1. Read excel file.
2.Extract the username and password, create a .vbs file with the sentence to run the service, something like:
set oS= Wscript.CreateObject("WScript.Shell")
oS.Run "runas /profile /user:XXX\YYY ""C:\Program Files\AAAs\Service.exe"""
where YYY is the username
3. Run this file
4. The service is running so I can launch the browser and authenticate, script continues...
I must repeat these steps for the 500 users...
Do you think is there any other better approach?