My NAnt build runs as a non-admin as part of CruiseControl. But we have an NCover task which needs to run as an Administrator. For this we are thinking about using RunAs with an admin account.
The problem is that RunAs returns directly and doesn't wait for the process to exit.
Is there a way to block the NAnt build until NCover has finished?
Tnx
So far I have found that using psexec works for this. The command I am using is:
psexec -w directory file_to_run -u myusername
With an optional -p password
The one concern I have is that psexec's EULA appears to forbid what I want to use it for. But I am not sure. The phrase I am worried about is:
You may not:
I want to replace the runas usage in our installer with psexec. Psexec would be on a cd, and I could just run it from there, or make a copy and delete it when I am done.
Would these uses violate this agreement?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With