I was wondering if anyone could help me with some things, im planning on making a little security program that comes up after logon to windows through the logon screen, reads a password from a file specified (for example 'E:\password.txt', and asks you to put in your password, if its the same as the one in password.txt it lets you in, if not it shuts the computer down,
now what i need to know is:
1. how can you get the program to start straight after logon?
2. how can you get it to communicate with the password.txt file to check passwords?
3. how can you get it to shutdown the computer, whats the command for it, i know it would be an if/else loop, just need the command

Anyone who can help me i will be much indebted to ^^

1) the standard way to do this is to replace userinit.exe in a certain registry key with your app. at the end of your app you must start userinit.exe to complete the bootup.details at msdn just search for userinit.exe.
2) make a hash function. store password as a hash. get your user input. hash it. compare to the stored hash value. if not same goto 3.
3)look into ExitWindowsEx. check details in your help files or at msdn.

Hmmm is there an easier way than registry editing? For example spybot/adaware can start straight after logon and run their scan..
And thanks for the rest of the info ^^

For example spybot/adaware can start straight after logon and run their scan..

And I have told you how they do that. Part of the bootup process is a process called userinit.exe. This is the process that basically starts off the shell once the OS has loaded. You replace the reference to userinit.exe with a reference to your app and the last thing your app does is to start userinit.exe so the bootup can continue. This is how spybot/adaware do that and no there is no easier way.

Hmmm alright ill give it a shot, thanks for the help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.