Restart your computer

By A^1^T^E^A^M on Jan 27, 2009

Simple program which restart your computer in 10 seconds.

#include <iostream>

using namespace std;

int main ()
{
          system("shutdown -s -t 10");
          system("PAUSE");

          return 0;
}

Comments

Sign in to comment.
A^1^T^E^A^M   -  Jan 28, 2009

Also you can restart your computer with simple batch file.
Open notepad and type:

shutdown -r -t 10

and save as name.bat . To abort this progress type:

shutdown -a

in Run :)

 Respond  
PuNkTuReD   -  Jan 28, 2009

cool thnx for that A^1^T^E^A^M

 Respond  
A^1^T^E^A^M   -  Jan 28, 2009

@jonsey44
If you, or your victim run this program his computer will be restart in 10 seconds.

@punkTuReD
Its Cpp code and you will need Dev-Cpp, or some another program for that. But, Dev-Cpp is my opinion, and also its comming with compailer.
Start program -> enter this code -> compile and will got .exe file :)

 Respond  
PuNkTuReD   -  Jan 28, 2009

so i save this as a .exe ?
a little instructions would be nice

bbreck3  -  Jun 24, 2014

@PuNkTuReD
"a.exe" is the default output c++ executable file name. In other words if you compile your source code and give name specifics as to the name by default the c++ compiler will give it "a" for the name.

if you open command prompt and navigate to the directory where your code is, then type: "a.exe" it will run the program....
or just simply click on the executable for it to run.

if you want to give your program a name simply specify the name before you compile the .cpp file:

so...: g++ .cpp -o

of course omit the the greater than or less symbol respectively. "-o" stands for output. It specifies the output name for the executable it returns.

Sign in to comment

Aucun50   -  Jan 27, 2009

shutdown -s -t 10 -c "I own!" :)

 Respond  
guest598594   -  Jan 27, 2009

jonesy I believe it "waits 10 seconds" to reboot.

 Respond  
Jonesy44   -  Jan 27, 2009
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.