If I run takeown /F "C:\Program Files\Borland /A /R /D Y from an elevated command prompt, I’m given ownership of the Borland folder. But if I run the code below nothing happens. Tried running as Administrator and regular user.
Process process = new Process();
process.StartInfo.FileName = @"C:\Windows\System32\takeown.exe";
process.StartInfo.Verb = "runas";
process.StartInfo.Arguments = "/F \"C:\\Program Files\\Borland\" /A /R /D Y";
process.Start();
process.WaitForExit();
What am I missing?
A format and re-install of Windows seemed to do the trick. I wish I had a better answer but after much searching, I found nothing that worked. Perhaps an existing security setting was preventing it from working.