Hi All,
I've got an application which I want to be able to logoff windows with. I currently use the following code:
I know it's probably not the best way to run the Logoff.exe but it works. The problem I have is that in Windows XP this executable does not show the nice friendly logoff window that a user would normally get if they were to logoff the normal windows way.
How can I get windows to display this logoff screen via VB?
Thanks in advanced for your help
A quote is the epiphany of intelligence
I've got an application which I want to be able to logoff windows with. I currently use the following code:
Code:
Dim MyProcess As New System.Diagnostics.Process
MyProcess.StartInfo.CreateNoWindow = True
MyProcess.StartInfo.UseShellExecute = True
MyProcess.StartInfo.WorkingDirectory = "C:\WINDOWS\SYSTEM32"
MyProcess.StartInfo.FileName = "Logoff.exe"
MyProcess.Start()
I know it's probably not the best way to run the Logoff.exe but it works. The problem I have is that in Windows XP this executable does not show the nice friendly logoff window that a user would normally get if they were to logoff the normal windows way.
How can I get windows to display this logoff screen via VB?
Thanks in advanced for your help
A quote is the epiphany of intelligence