Monday, May 24, 2010

How to shutdown and restart a system using visualbasic coding?

the coding is to be very simple

How to shutdown and restart a system using visualbasic coding?
The Code is :


Shell("Shutdown.exe -s -t 2")





Paramaters:


-l : Log off the User


-s : Shutdown the computer


-r : Restart the computer


-a : Abort a system shutdown


-t xx : Set timeout for shutdown to xx seconds


-c "comment" : Shutdown comment (maximum of 127 characters)


-f : Forces running applications to close without warning
Reply:providing this information is not giving a loaded gun to a child.





There are legitimate reasons to want to know how to do this.


Such as writing an installer.





A quick search in google will help you find sites that have an answer.... from my searhc I'd start looking at this site:


http://www.a1vbcode.com/app-3442.asp
Reply:There is no legitimate reason to do that. It is possible, and it is simple, but to tell you how would be like giving a gun to a child.

state flower

No comments:

Post a Comment