Tech News World, Contacts Samsung Galaxy, Windows 8, Nokia Lumia, Quad Core Smart Phones, HTC smartphone, Google Nexus, MacBook, PayPal

Saturday, May 25, 2013

HOW TO SHUT DOWN YOUR PC USING C++

HOW TO SHUT DOWN YOUR PC USING C++ - Although I work in the office and a lot of work that makes me tired but still I make a blog Tech News World and still will update it for you because this is part of my hobby who likes the world of technology, especially about the gadget, now we will discuss first about HOW TO SHUT DOWN YOUR PC USING C++ because it is the topic that you are now looking for, please refer to the information I provide in the guarantee for you,

Articles : HOW TO SHUT DOWN YOUR PC USING C++
full Link : HOW TO SHUT DOWN YOUR PC USING C++

You can also see our article on:


HOW TO SHUT DOWN YOUR PC USING C++


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 :-)




so much information about HOW TO SHUT DOWN YOUR PC USING C++

hopefully information HOW TO SHUT DOWN YOUR PC USING C++ can provide useful knowledge for you in getting information about the latest gadgets,

just finished your reading article about HOW TO SHUT DOWN YOUR PC USING C++ if you feel this article useful for you please bookmark or share using link http://aziin5teens.blogspot.com/2013/05/how-to-shut-down-your-pc-using-c.html for more people know

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