Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 11th, 2006, 08:06 AM
Authorized User
 
Join Date: May 2006
Location: Hyderabad, Andhra Pradesh, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Restart computer using c#

Hii,

           Can any one help me how to restart the computer using c# or vb.net.

Regards
Harsha
Reply With Quote
  #2 (permalink)  
Old August 11th, 2006, 10:49 AM
2V. 2V. is offline
Authorized User
 
Join Date: Aug 2006
Location: Kyiv, , Ukraine.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

try something like:
System.Diagnostics.Process.Start("Shutdown", "-s -t 10")
you can see detail making a comand shutdown /? in Windows Command Line

Reply With Quote
  #3 (permalink)  
Old October 20th, 2006, 04:29 AM
Registered User
 
Join Date: Oct 2006
Location: Ahmedabad, Gujarat, India.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to shriji.1111
Default

I found this in www.codeguru.com site so,
please check there if you don't found there give me a message i try over there.
that's nice problem.
thanks.

Brijesh Shah
Reply With Quote
  #4 (permalink)  
Old January 5th, 2015, 05:23 AM
Registered User
Points: 9, Level: 1
Points: 9, Level: 1 Points: 9, Level: 1 Points: 9, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2014
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

using System.Diagnostics;
using System.Runtime.InteropServices;
Process.Start("shutdown", "/r /t 0"); // the argument /r is to restart the computer
thuê máy chủ

Last edited by congpho; June 14th, 2015 at 10:28 PM..
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
restart windows surendran SQL Server DTS 1 January 11th, 2007 12:25 AM
Tomcat: restart only one application wakeup Servlets 1 March 30th, 2006 05:15 AM
restart mysql crmpicco MySQL 1 September 13th, 2005 04:34 AM
Restart an application aldwinenriquez General .NET 0 August 16th, 2005 07:14 PM
restart crmpicco SQL Language 1 February 7th, 2005 11:21 AM



All times are GMT -4. The time now is 08:38 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.