Friday, 21 August 2015

Shutdown Manager!!



#include<iostream>
#include<conio.h>
#include<windows.h>
#include<iomanip>
using namespace std;
int main()
{
  char cmn,c;
  system("color e");
  cout<<setw(15)<<"l- Log off.\ns- Shutdown the computer.\nr-Full shutdown and restart the computer.\ng- Full shutdown and restart the computer.After the system is rebooted, restart any registered applications.\np-Turn off the local computer with no time-out or warning.\nh- Hibernate the local computer.-:::";
  cin>>cmn;
  switch(cmn)
  {
      case 'l':Sleep(2000);system("shutdown/l");
      break;
      case 's':Sleep(2000);system("shutdown/s");
      cout<<"\na-Abort a system shutdown.-:::";
      cin>>c;

      {
          case 'a':Sleep(2000);system("shutdown/a");cout<<"\nShutdown Canceled";
          break;
      }
      break;
      case 'r':Sleep(2000);system("shutdown/r");
      break;
      case 'g':Sleep(2000);system("shutdown/g");
      break;
      case 'p':Sleep(2000);system("shutdown/p");
      break;
      case 'h':Sleep(2000);system("shutdown/h");
      break;
      default:Sleep(2000);system("color c");cout<<"\n\t\t wrong entry";break;

  }
  getch();
}

No comments:

Post a Comment