Tate Admin
Posts : 208 Reputation : 17 Join date : 2009-09-19 Age : 27
| Subject: Console App that starts on windows startup (to keep ppl off) Sun Nov 29, 2009 9:50 am | |
| I use this to keep my parents off my computer (because the windows automated login for windows xp isnt secure): - Code:
-
#include <windows.h> #include <fstream> #include <winable.h> #include <iostream> #include <stdio.h> using namespace std;
int main(int argc, char *argv[]) { keybd_event(VK_MENU,0x36,0,0); keybd_event(VK_RETURN,0x1c,0,0); keybd_event(VK_RETURN,0x1c,KEYEVENTF_KEYUP,0); keybd_event(VK_MENU,0x38,KEYEVENTF_KEYUP,0); string password; cout << endl << endl << endl; cout << "Password :" << endl; getline(cin, password); if(password == "Actionhacks") { cout << "Good! That's the password!" << endl << endl; cout << "Play gratz music?" << endl; string yesno; getline(cin, yesno); if(yesno == "Yes") { Beep(50,50); Beep(100,100); Beep(150,150); Beep(150,150); Beep(100,100); Beep(150,150); Beep(200,200); Beep(200,200); Beep(150,150); Beep(200,200); Beep(250,250); Beep(250,250); Beep(200,200); Beep(250,250); Beep(300,300); Beep(300,300); Beep(300,300); Beep(300,300); Beep(500,500); Beep(500,500); Beep(500,500); Beep(300,100); Beep(400,400); } } else { cout << "Wrong! That's not the password!" << endl; cout << endl << endl << endl; BlockInput(true); } system("PAUSE>null"); return 0; } If you have a question, just post, Ill try to answer it
Last edited by Tate on Sat Dec 05, 2009 12:24 pm; edited 3 times in total | |
|
Super Girl General Member
Posts : 31 Reputation : 0 Join date : 2009-11-26 Location : Ireland
| Subject: goooood job tate Sun Nov 29, 2009 4:36 pm | |
| you no you could, make it more simpler not saying you have to but i find it easier to simplify this stuff. on the other hand very good job | |
|
TheFallen General Member
Posts : 8 Reputation : 0 Join date : 2009-10-22
| Subject: Re: Console App that starts on windows startup (to keep ppl off) Wed Dec 02, 2009 9:54 am | |
| ok i just had to respond to this ctrl+alt+delete or simply close the app in order to do this full proof you would have to catch windows messages and send messages to widows to do this | |
|
Tate Admin
Posts : 208 Reputation : 17 Join date : 2009-09-19 Age : 27
| Subject: Re: Console App that starts on windows startup (to keep ppl off) Wed Dec 02, 2009 10:04 am | |
| - TheFallen wrote:
- ok i just had to respond to this ctrl+alt+delete or simply close the app
in order to do this full proof you would have to catch windows messages and send messages to widows to do this Try it At least on my computer, you can't do alt+f4 or ctrl+alt+delete (but if you leave it up for like, 30 mins, it does go off) so like every 10 minutes it should do a message that says "Are you going to enter your password?" It's foolproof on my computer | |
|
Sponsored content
| Subject: Re: Console App that starts on windows startup (to keep ppl off) | |
| |
|