Hard to explain, just click here.

closed account (Gz64jE8b)
Need to create something where a box appears after logging in that asks you for a password - you can't do ANYTHING until the correct password is entered.

The "can't do ANYTHING until the correct password is entered" part is the one I need help with.

And making the program launch on start up (saves me some Googling time if you tell me here).

(This whole thing may seem redundant to some people because you can password your user account but whatever, yo.).
Here's a stupid solution......
All what you can do with a computer is two things, clicking a keyboard and clicking a mouse.
When the program starts, it sets the mouse pointer to a certain area possessed by itself. It then captures all signals produced by mouse or keyboard. In this way, you have to input the correct password or you've got to shut down the computer.
I'm not sure whether this works for special keys like 'ctrl' or the Windows key.
I'm also interested in this topic.
Tell me if you find a better solution:)
Good Luck:)
Wow seriously chenqi - stop giving bad advice. That's seriously messed up.

Just create a dialog box with an input field for the password, and only create the main window if the right password was entered.
@ chenqi07: Your entire post can be summed up in four words "write a keyboard hook". If you had just written that you would have been fine. But you are incorrect when you say things like "All what you can do with a computer is two things [sic]..." since I can remotely kill any running process with taskkill, pskill, VNC, etc. thus eliminating this "security" measure.

@ OP: You need to do what hanst99 suggested but also pause the execution of 'explorer.exe' and NOT allow it to continue until your application says it is OK even if your application is killed. A Keyboard and Mouse hook would also be useful since it would prevent the user from pressing 'Ctrl + Alt + Del' to try to kill you app, or 'Alt + Tab' to switch to another window and a few other things that are slipping my mind at the moment but would still be prevented with the proper hooks in place. There are a great number of things that a user can still do to get around these measures but as far as a prank this should be enough to annoy most end users. Good luck, raise hell.
Last edited on
closed account (Gz64jE8b)
I know how to make the box and handle the password.

By 'Not doing anything' I mean not being able to interact with anything except the dialog box.
@ OP: We know what you mean* and we've pretty much answered this part of your question. If you are looking for someone to give you the code then try posting over in the 'Jobs' section, I'm sure you'll be able to hire someone for a one time project like this. Otherwise the purpose of this site is education, we will help you get started, we will revise and edit your code if necessary but most of us won't just hand the code over to you for nothing.

If your target platform is Windows XP then a simple image hook at explorer.exe will be enough to accomplish your task. If you are targeting Vista or 7 then you need a different approach, I suggest marking your application for something called "Admin Approval Mode" (Look up UAC for Vista and 7) and explicitly denying access to it for all except members of a specific security group. This would require the user to enter in a seperate set of credentials in order to enter the desktops UI. After words you would have to make sure that explorer.exe launched for the user to get their desktop.

*: You want to lock the PC after the user logs in until they enter a valid password, there is commercial software availible for this but it isn't cheap so I imagine this is why you are trying to write it yourself.

EDIT: If you are still having trouble with your project all I can say is that more specific questions will yield more specific answers.
Last edited on
~~!
Calm down, guys~~2012 is still several months away.

I just googled "windows screen lock", and I think this might be helpful.
http://www.dreamincode.net/forums/topic/151305-screen-lock/
closed account (Gz64jE8b)
I'm not looking for someone to write my code for me, I never said I did. Don't assume things without any information to back it up.

I want ideas on how to make it possible.
The report was a little uncalled for IMO, if my answers are frustrating you then I'll leave. I honestly meant my suggestion, crowd-sourcing an option that people\smaller organizations often over look and you haven't offered any clue of your intent. So I'll be leaving this thread now. I'd say good luck but I really don't think you'll get this accomplished.
closed account (Gz64jE8b)
You were unhelpful and still remain to be.

So yes, do leave the thread and try not to insult any more people.



The thread is still open to any suggestions.
Last edited on
That report was indeed uncalled for. Computergeek may have been out of line implying that you wanted a complete solution, but reports are reserved for more serious offenses. Just so you know.

Cheers.
http://stackoverflow.com/questions/6793728/qt4-making-fullscreen-window-impossible-to-get-around-a-lock-screen

-Albatross

Last edited on
CompterGeek01: You want to lock the PC after the user logs in until they enter a valid password, there is commercial software availible for this but it isn't cheap .

All software is free in China ~~!
You just download it:)
closed account (Gz64jE8b)
I'm not using QT just straight C++
You could create many "toy" screen locks, but the matter of fact is: They all run in the user's desktop, meaning they can be killed. Assuming that you have a valid reason to do this (which I highly doubt because most needs can be covered with Microsoft-provided solutions), what you need is either a custom GINA in Windows XP or a custom credential provider in Windows 7 or Vista. Those will run in the secure desktop and cannot be killed or bypassed.
Topic archived. No new replies allowed.