i am writing visual basic application in visual studio 2012 to turn of the computer. i have used syntaxes like
1. System.Diagnostics.Process.Start("Shutdown", "-s")
2.System.Diagnostics.Process.Start("Shutdown", "/s")
3. Process.Start("shutdown", "/s /f /t 01")
4. Shell("shutdown -s -t 00")
but all instead of shutting down reruns the same application again and computer dont shutdown only.what might be the solution for it so that it will work
thanks in anticipation
Rename your application executable file from shutdown
to something else because in case of the name shutdown
, it hides system wide shutdown
command.