I have a very simple code, which I am using to test if I can open a specific file. Till now, this is the code I have
string filename = "C:\\anu.txt";
Process myProcess = new Process();
myProcess.StartInfo.FileName = filename;
myProcess.StartInfo.UseShellExecute = true;
myProcess.StartInfo.RedirectStandardOutput = false;
myProcess.Start();
This code starts a notepad process perfectly, but as user "DefaultAppPool". So, I can see the process in Task manager, but the notepad window doesn't show up. I have no idea what I can do here to fix this. I tried running it as different user, but it still shows up with "DefaultAppPool" user id.
Edit:
Apparently this is a security feature in Vista and higher. :/ So, can't do this anymore. Oh well, time to find a workaround.