Put your programming skills to the test in these challenges.


Post by 323LORDofWAR323 on Sun Mar 17, 2013 7:49 pm
([msg=74592]see ANIT-shutdown[/msg])

I know the system command in C++ to abort shutdown is
system("shutdown.exe -a")

what im wondering:
Write a program that i run on startup, and i someone attempts to shut my computer down, this program will stop them.
so far ive got this:

#include <iostream>
#include <windows.h>

using namespace std;

int main()
int a=1;

system("shutdown.exe -a");

Is there a better way to do what I'm trying to do. LOL i know there is help me out guys
This works...but eventually it stops responding. Is there a way to intercept the shutdown command before it is implimented, and a way to accomplish my goal without munching so much RAM

Any help appreciated :mrgreen:
New User
New User
Posts: 8
Joined: Fri Mar 08, 2013 7:56 pm
Blog: View Blog (0)

Re: ANIT-shutdown

Post by static_cast on Tue Apr 09, 2013 3:52 pm
([msg=75015]see Re: ANIT-shutdown[/msg]) ... restarting
That may help. [In my might there may be some sort of DLL thing you could do.
New User
New User
Posts: 1
Joined: Tue Apr 09, 2013 3:45 pm
Blog: View Blog (0)

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests