I would like to run a bat script on one of the machines on the domain, from my asp.net application. Machine with the batch script is a temporary storage machine, and script synchronizes it with the permanent storage machine. So, what is the optimal way of doing this?
The thing I tried is to use PsExec to run a script on the remote machine. I create a process that makes a PsExec call, and it actually does it's job pretty well. However, since the ASP.NET worker thread runs under ASP.NET account that has restricted privileges, I must hard-code my domain user credentials in PsExec call, and that's something I do not like doing.
Is there a way to overcome this problem, or maybe some other approach that I could try?
Thanks...