Wrox Programmer Forums
|
.NET 4 and Visual Studio 2010 General Discussions For discussing anything about .NET 4, WPF, WCF, the rest of the .NET 4 Framework, and Visual Studio 2010 that isn't about a specific Wrox book. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET 4 and Visual Studio 2010 General Discussions section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 20th, 2010, 01:37 PM
Registered User
 
Join Date: Aug 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Log off windows from code

I have an application with a long running process. When it completes I would like the application to log off the computer. This will automatically close all running apps. I will need to keep the computer running so services can continue.

I''m not sure what Namespace to use. If someone has a simple code sample that would be great.

Thanks,
MFZ
 
Old August 20th, 2010, 08:58 PM
Registered User
 
Join Date: Aug 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The only thing I have found so far..

System.Diagnostics.process.start("shutdown","-L")

Shutdown is a DOS command for XP.

Any better ideas ?

MFZ





Similar Threads
Thread Thread Starter Forum Replies Last Post
Log out of windows from .Net Mzwijacz C# 4.0 aka C# 2010 General Discussion 1 April 13th, 2011 08:41 AM
How to implement 'Log in as another user' feature in asp.net windows authentication? naush83 BOOK: Professional ASP.NET 3.5 Security, Membership, and Role Management ISBN: 978-0-470-37930-1 0 October 19th, 2009 05:16 AM
How to log a user out by code? + asp.net membership chobo2 ASP.NET 3.5 Basics 1 April 5th, 2009 04:28 AM
AppException Class -Log Error to Event Log bekim BOOK: ASP.NET Website Programming Problem-Design-Solution 7 December 7th, 2004 01:01 PM
How do I collect windows log on tray Javascript How-To 2 September 3rd, 2003 02:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.