Now NCover.Console.EXE has the admin bit set. Also UAC is set to allow elevation to requested operation without asking user. If I set VS2008 NOT as an administrator but in an account that has admin privileges, the coverage works. But if I run FB NOT as an administrator it fails. If I run FB as an administrator it works
I don't want to run FB as an administrator because I use checkouts using SVN and Pagent. The User key will not work when run as an admin. (And if I run Pagent as an admin, the key will not work with everything else.)
So is there a solution to this problem? A little check box that says run as administrator?
This is proving to be a bit of a challenging problem as it requires us to launch the child processes with elevation but just about all the resources that we’ve found point to using ShellExecute, which we can’t use as you can’t redirect standard output, or COM. Vincent is working on it now and we’ll let you know as soon as we have a working solution.
The only workaround that I know of (besides running FinalBuilder with administrator privileges) is to use the “Shell Execute” action to run NCover and add the following script to the action’s BeforeAction script event:
Action.Action = “runas”;
This will launch NCover with administrator privileges.
I just spent the last 2 days on this… and got basically nowhere! The problem is that microsoft decided not to provide any reasonable means to create a process with elevated privileges and still be able to capture stdout. We have found a way to do this, however it requires a major code change, and one that I am not prepared to inject into the product at this time. The risk of breaking our process execution code is too high, it’s used in nearly every action, however we cannot possibly dedicate the time to test the change (we would have to test every action) in FB6. We will revisit this for FB7, as we will need to test everything again anyway.
The only suggestion I can give at this time, is to run FinalBuilder as administrator, and to figure out the issues with SVN and Pagent.
Thanks for the effort. I can deal with it by run pagent as administrator and everything else I do. It makes me type in a password if I use explorer.
We ran into a similar problem. When spawing a command line, the command line shares the resources with the calling program. So we ran it in its own shell, but then couldn't communicate with it via stdin/out I'm glad to know it wasn't just our ignorance that couldn't find a way to communicate!