| | |
shutdown.exe (Question)
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
If i were tto implement somthing like this
cmd \k shutdown.exe -r
on a button click would that saftley restart y comp. from that app. if not how would i do this
cmd \k shutdown.exe -r
on a button click would that saftley restart y comp. from that app. if not how would i do this
Firefox
Ewido
Tune up windows
Get detailed system information
My Fixes
Member - Alliance of Security Analysis Professionals - Since 2006
Ewido
Tune up windows
Get detailed system information
My Fixes
Member - Alliance of Security Analysis Professionals - Since 2006
google is letting me down
Firefox
Ewido
Tune up windows
Get detailed system information
My Fixes
Member - Alliance of Security Analysis Professionals - Since 2006
Ewido
Tune up windows
Get detailed system information
My Fixes
Member - Alliance of Security Analysis Professionals - Since 2006
try this:
C# Syntax (Toggle Plain Text)
using System.Diagnostics; ProcessStartInfo startinfo = new ProcessStartInfo("shutdown.exe","-r"); Process.Start(startinfo);
•
•
•
•
Originally Posted by plazmo
try this:
C# Syntax (Toggle Plain Text)
using System.Diagnostics; ProcessStartInfo startinfo = new ProcessStartInfo("shutdown.exe","-r"); Process.Start(startinfo);
hmmm the r stands for restart so is l logoff?
Firefox
Ewido
Tune up windows
Get detailed system information
My Fixes
Member - Alliance of Security Analysis Professionals - Since 2006
Ewido
Tune up windows
Get detailed system information
My Fixes
Member - Alliance of Security Analysis Professionals - Since 2006
C# Syntax (Toggle Plain Text)
-i Display GUI interface, must be the first option -l Log off (cannot be used with -m option) -s Shutdown the computer -r Shutdown and restart the computer -a Abort a system shutdown -m \\computername Remote computer to shutdown/restart/abort -t xx Set timeout for shutdown to xx seconds -c "comment" Shutdown comment (maximum of 127 characters) -f Forces running applications to close without war ning -d [u][p]:xx:yy The reason code for the shutdown u is the user code p is a planned shutdown code xx is the major reason code (positive integer le ss than 256) yy is the minor reason code (positive integer le ss than 65536)
-l would be logoff
Tahnk you and is thissafe for the computer?
Firefox
Ewido
Tune up windows
Get detailed system information
My Fixes
Member - Alliance of Security Analysis Professionals - Since 2006
Ewido
Tune up windows
Get detailed system information
My Fixes
Member - Alliance of Security Analysis Professionals - Since 2006
•
•
•
•
Originally Posted by plazmo
yeah its safe, its no different then going to cmd and using it
lol ok thanks so i guess its safe there
Firefox
Ewido
Tune up windows
Get detailed system information
My Fixes
Member - Alliance of Security Analysis Professionals - Since 2006
Ewido
Tune up windows
Get detailed system information
My Fixes
Member - Alliance of Security Analysis Professionals - Since 2006
•
•
Join Date: Mar 2008
Posts: 2
Reputation:
Solved Threads: 0
•
•
•
•
C# Syntax (Toggle Plain Text)
-i Display GUI interface, must be the first option -l Log off (cannot be used with -m option) -s Shutdown the computer -r Shutdown and restart the computer -a Abort a system shutdown -m \\computername Remote computer to shutdown/restart/abort -t xx Set timeout for shutdown to xx seconds -c "comment" Shutdown comment (maximum of 127 characters) -f Forces running applications to close without war ning -d [u][p]:xx:yy The reason code for the shutdown u is the user code p is a planned shutdown code xx is the major reason code (positive integer le ss than 256) yy is the minor reason code (positive integer le ss than 65536)
-l would be logoff
... when using the following commands, what is the correct way to input it?
following the example code given earlier, I typed:
ProcessStartInfo startInfo = new ProcessStartInfo("shutdown.exe", "-m \\COMPUTERNAME");
upon clicking the button this code was written for, nothing happened on the computer I was trying to shut down, though (unfortunately) my computer restarted after approximately 30 seconds. I don't think I input it correctly, or I was attempting to do something -m wasn't meant to do?
Also, when I typed "-t 10" (wanting the computer to shut down 10 seconds after the button was clicked, nothing happened.
Wat am I doing wrong?
Thanks for the help
j4nu5
![]() |
Similar Threads
- Remote Computer Shutdown (Windows NT / 2000 / XP)
- Update.exe question (Windows NT / 2000 / XP)
Other Threads in the C# Forum
- Previous Thread: Music on my website
- Next Thread: Gridview Paging Problem.
| Thread Tools | Search this Thread |
Tag cloud for C#
.net access ado.net algorithm array barchart bitmap box broadcast buttons c# chat check checkbox class client color combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees development draganddrop drawing encryption enum event excel file files form format forms ftp function gdi+ httpwebrequest image index input install java list listbox listener login mandelbrot math mouseclick mysql networking object operator oracle path photoshop picturebox pixelinversion post programming radians regex remote remoting resource richtextbox save saving server sleep socket sql statistics stream string table tcp text textbox thread time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml






