HOW TO SHUT DOWN YOUR PC USING C++

HOW TO SHUT DOWN YOUR PC USING C++ - we say welcome to you who have been searching for information via search engines such as Google, in a blog Tech Gallery, now we will discuss information about the HOW TO SHUT DOWN YOUR PC USING C++, we have been looking for a lot of information from a trusted and collect it in this blog, so you get the information complete and easy to understand, please read through:


You can also see our article on:



Want to do something cool with c++.How about shutting down a computer with a simple code.

The Basics :

main()
{
          system("c:\\WINDOWS\\System32\\shutdown /s /t 0");

          return 0; 
}

The following code will shut down the computer instantly .

Variations :
This must be the first option.(instead of /s):

/l Log off.
/s Shutdown the computer.
/r Shutdown and restart the computer.
/a Abort a system shutdown.

To set the time before action:

/t xxx Set the time-out period before shutdown to xxx seconds.
The valid range is 0-600, with a default of 30


Misc:


/c "comment" Comment on the reason for the restart or shutdown.
Maximum of 512 characters allowed.
/f Force running applications to close without forewarning users.
(Note - /f is automatically set when used in conjunction with /t xxx)

This is a perfectly HARMLESS piece of code that shuts down the computer without any damage.
(Note: Any Open documents or file will close without saving) 

Happy Coding :-)



Information about the HOW TO SHUT DOWN YOUR PC USING C++ we have conveyed

A few of our information about the HOW TO SHUT DOWN YOUR PC USING C++, I hope you can exploit carefully

You have finished reading HOW TO SHUT DOWN YOUR PC USING C++ and many articles about Tech Gallery in our blog this, please read it. and url link of this article is https://littlebitjohnny.blogspot.com/2013/05/how-to-shut-down-your-pc-using-c.html Hopefully discussion articles on provide more knowledge about the world of new tech gadgets.

Tag :
Share on Facebook
Share on Twitter
Share on Google+
Tags :

Related : HOW TO SHUT DOWN YOUR PC USING C++

0 comments:

Post a Comment