Shutdown | Restart | Abort Shutdown (WINDOWS)

I'm Using Dev C++

------------------------------------------------------------------

Code To Shutdown The System 

------------------------------------------------------------------

#include <stdio.h>
#include <stdlib.h>
int main()
{
   printf("Bye!");
   system("C:\\WINDOWS\\System32\\shutdown /s /t 30");
   return 0;
}

------------------------------------------------------------------

Code To Restart The System

------------------------------------------------------------------

#include <stdio.h>
#include <stdlib.h>
#include<conio.h>
#include<iostream>
int main()
{
printf("Bye!");
    system("C:\\WINDOWS\\System32\\shutdown /r /t 20");
    getch();
}

-------------------------------------------------------------------

Code To Abort The Restart Or Shutdown Of The System

-------------------------------------------------------------------

#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
main()
{
system("c:\\windows\\system32\\shutdown /a"); 
    getch();
}

-----------------------------------------------------------------

Follow Me On Instagram And Subscribe Me On YouTube 

Comments

Popular Posts