I am facing this problem on Windows 2003 and 2008 Server. On XP it works fine.
I have written and Windows Service that takes receives the command and executes tasks such as Logoff, Shutdown, etc.
All the commands except Logoff works fine. I tried following ways to perform the Logoff. However it didnt work.
public static extern int ExitWindowsEx(int uFlags, int dwReason);
Process _currentProcess = new Process();
_currentProcess.StartInfo = new ProcessStartInfo("shutdown", "-l -f");
_currentProcess.StartInfo.UseShellExecute = false;
If I write a simple C# based applicatin (not Service) it works fine for all the tries that I have made.
I am facing this problem only when I put this code
View Complete Post