tags:

views:

81

answers:

2

I am looking for a way to block a user from opening new IE or firefox windows. Is there a way to do this using c#. I am looking at system.diagnostics

A: 

How about making a group policy for the "testing account" that excludes most of the start menu and the desktop. Make your program the only one that can run.

It won't guarantee that another process won't be started, but it will certainly make it more difficult.

Seth
+2  A: 

You could use a windows service since it runs on background and use this code to terminate a process (the code terminates a detected running internet explorer process)

while (true)
        {
            StartLoop:
            try
            {
                foreach (System.Diagnostics.Process process in System.Diagnostics.Process.GetProcesses())
                {
                    if (process.ProcessName.ToUpperInvariant().Equals("IEXPLORE"))
                        process.Kill();
                }
            }
            catch
            {
                goto StartLoop;
            }
        }
Jojo Sardez