I'm developing on a server using windows 2008. My c# application launches sub processes with different user credentials , after which it checks the file ownership of the created files.
Due to the following issue, I was forced to turn off the UAC on the system (: http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/c449f0c2-65c3-4083-9279-e3b9a9d099d2/)
While this resolved the process.hasExited() issue, I ran into a problem concerning file ownership. With the UAC turned off, windows is unable/unwilling to display the user as owner of the created files, instead referring to the group to which it belongs.
Is there a workaround for this problem?
I know disabling UAC isn't "good practice", but some problems just persevered...
Hmmm, a sub process was created from one parent process, and the UAC setting will be the same with the parent process. So one solution: elevate the server process, "Run as Admin" or embed the manifest into the server process -