473,320 Members | 2,161 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Command Prompt

How do I do a "shutdown -i" from the command prompt.

ive tried this method but it doesnt work

System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = "explorer";
proc.StartInfo.Arguments = "shutdown""-i";
proc.Start();
proc.WaitForExit();
Nov 16 '05 #1
2 1203
It should be

proc.StartInfo.FileName = "shutdown.exe";
proc.StartInfo.Arguments = "-i";

-vJ

"Hareth" <ab******@hotmail.com> wrote in message
news:Ol**************@TK2MSFTNGP09.phx.gbl...
How do I do a "shutdown -i" from the command prompt.

ive tried this method but it doesnt work

System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = "explorer";
proc.StartInfo.Arguments = "shutdown""-i";
proc.Start();
proc.WaitForExit();

Nov 16 '05 #2
Thanx

"Vijaye Raji" <no*************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
It should be

proc.StartInfo.FileName = "shutdown.exe";
proc.StartInfo.Arguments = "-i";

-vJ

"Hareth" <ab******@hotmail.com> wrote in message
news:Ol**************@TK2MSFTNGP09.phx.gbl...
How do I do a "shutdown -i" from the command prompt.

ive tried this method but it doesnt work

System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = "explorer";
proc.StartInfo.Arguments = "shutdown""-i";
proc.Start();
proc.WaitForExit();


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: msuk | last post by:
All, I am trying to use Regasm from the command prompt and have to keep putting the full file path of where my assembley is located. Does anyone know how to set it up so wherever I run the...
3
by: Rog | last post by:
Yes, I am guessing that typing cmd in the run windows will bring up the command prompt, but not the vs.net command prompt. Is there a switch(s) for accessing the vs.net command prompt? Or...
4
by: glenn | last post by:
I keep reading all sorts of books on VS that keep telling me to click on Tools/Visual Studio Command prompt to run this program or that program. However, I do not have such a menu choice. Where is...
4
by: Thomas Johnson | last post by:
I am trying to find out how to access the VS 2003 .Net command prompt. I am trying to execute the 'csc' command against a module but have no idea where to find the command prompt. Here's a stupid...
6
by: Jwolf | last post by:
I have .net 2002 edu version and when it installed there was a shortcut to the .net command prompt. My CLR disk is scratched so I can't reinstall and so I just downloaded express. I dont know...
6
by: Shooter4Life8 | last post by:
Hi, I am having trouble figureing out the best way to open a command prompt then write lines to it in VB.NET. Currently I have this code, but it execute's too fast I think because Dim psi As...
9
by: Endless Story | last post by:
My last version of Python was 2.4, running smoothly on XP with path c: \Python24 - no need even to include this path in PATH; everything worked as it's supposed to at the command line. Just...
4
by: Peter Nimmo | last post by:
Hi, I am writting a windows application that I want to be able to act as if it where a Console application in certain circumstances, such as error logging. Whilst I have nearly got it, it...
3
by: kimiraikkonen | last post by:
Hi experts, I just want to ask a simple procedure of my simple form. My form has a input textbox and a button. I want this if you can help me: Application user types a command prompt command...
7
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.