Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logoff windows a nice way

Status
Not open for further replies.

gareth001

Technical User
Feb 4, 2003
43
GB
Hi All,

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top