Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Disabling the X?

DarknessXDarknessX Member Posts: 49
[b][red]This message was edited by DarknessX at 2007-2-3 21:7:58[/red][/b][hr]
Ok, well, I'm making a security program, and it asks for a password and if the password is wrong, logs the user out the first and second time but shuts the computer down the third time.
However, you can easily bypass it by closing the program.. How can I prevent this while still allowing Halt(); to close the program?

ALSO, need to disable the _ to minimize it, F4, and make it go full screen, not the normal half screen I get :( How could I do those?

Comments

  • zibadianzibadian Member Posts: 6,349
    : [b][red]This message was edited by DarknessX at 2007-2-3 21:7:58[/red][/b][hr]
    : Ok, well, I'm making a security program, and it asks for a password and if the password is wrong, logs the user out the first and second time but shuts the computer down the third time.
    : However, you can easily bypass it by closing the program.. How can I prevent this while still allowing Halt(); to close the program?
    :
    : ALSO, need to disable the _ to minimize it, F4, and make it go full screen, not the normal half screen I get :( How could I do those?
    :
    :
    Those things are not possible from within a console application, because it doesn't control the console window. You should change your program into a GUI-based program, with it's own window.
  • DarknessXDarknessX Member Posts: 49
    : : [b][red]This message was edited by DarknessX at 2007-2-3 21:7:58[/red][/b][hr]
    : : Ok, well, I'm making a security program, and it asks for a password and if the password is wrong, logs the user out the first and second time but shuts the computer down the third time.
    : : However, you can easily bypass it by closing the program.. How can I prevent this while still allowing Halt(); to close the program?
    : :
    : : ALSO, need to disable the _ to minimize it, F4, and make it go full screen, not the normal half screen I get :( How could I do those?
    : :
    : :
    : Those things are not possible from within a console application, because it doesn't control the console window. You should change your program into a GUI-based program, with it's own window.
    :

    Is there any workarounds or anything to use that could possibly do it? Or maybe...
    [code]
    before exit check
    if exitcode = 'allow' then Halt();
    if exitcode = 'no' then LogOff; Halt();
    [/code]
    Logoff would be a procedure meant to log the current user off.

    ALSO, one final question, not quite so pascal related.
    How could I make the program boot up BEFORE the start menu and desktop icons and wait for the program to close before loading the desktop icons and start menu? Cause if there is a way I can do that, I can make a workaround for closing the window...

    [code]
    Program 1, has user logged in?
    -if no, do nothing.
    -if yes, write "yes" to file

    Program 2, is user logged in?
    Check file,
    -is yes, do nothing
    -is no, logoff current user
    [/code]
    And it would do that BEFORE everything starts up, so user cannot get past it.
  • zibadianzibadian Member Posts: 6,349
    : : : [b][red]This message was edited by DarknessX at 2007-2-3 21:7:58[/red][/b][hr]
    : : : Ok, well, I'm making a security program, and it asks for a password and if the password is wrong, logs the user out the first and second time but shuts the computer down the third time.
    : : : However, you can easily bypass it by closing the program.. How can I prevent this while still allowing Halt(); to close the program?
    : : :
    : : : ALSO, need to disable the _ to minimize it, F4, and make it go full screen, not the normal half screen I get :( How could I do those?
    : : :
    : : :
    : : Those things are not possible from within a console application, because it doesn't control the console window. You should change your program into a GUI-based program, with it's own window.
    : :
    :
    : Is there any workarounds or anything to use that could possibly do it? Or maybe...
    : [code]
    : before exit check
    : if exitcode = 'allow' then Halt();
    : if exitcode = 'no' then LogOff; Halt();
    : [/code]
    : Logoff would be a procedure meant to log the current user off.
    :
    : ALSO, one final question, not quite so pascal related.
    : How could I make the program boot up BEFORE the start menu and desktop icons and wait for the program to close before loading the desktop icons and start menu? Cause if there is a way I can do that, I can make a workaround for closing the window...
    :
    : [code]
    : Program 1, has user logged in?
    : -if no, do nothing.
    : -if yes, write "yes" to file
    :
    : Program 2, is user logged in?
    : Check file,
    : -is yes, do nothing
    : -is no, logoff current user
    : [/code]
    : And it would do that BEFORE everything starts up, so user cannot get past it.
    :
    The only two workarounds I can see is to rewrite the windows kernel and give console programs control over the console window. The other is changing the your program into a GUI program.
    It is possible to hook programs into the boostrap (virusscanners/firewalls do this also), but I don't know how. Perhaps a google search will give you the answers.
  • DarknessXDarknessX Member Posts: 49
    : : : : [b][red]This message was edited by DarknessX at 2007-2-3 21:7:58[/red][/b][hr]
    : : : : Ok, well, I'm making a security program, and it asks for a password and if the password is wrong, logs the user out the first and second time but shuts the computer down the third time.
    : : : : However, you can easily bypass it by closing the program.. How can I prevent this while still allowing Halt(); to close the program?
    : : : :
    : : : : ALSO, need to disable the _ to minimize it, F4, and make it go full screen, not the normal half screen I get :( How could I do those?
    : : : :
    : : : :
    : : : Those things are not possible from within a console application, because it doesn't control the console window. You should change your program into a GUI-based program, with it's own window.
    : : :
    : :
    : : Is there any workarounds or anything to use that could possibly do it? Or maybe...
    : : [code]
    : : before exit check
    : : if exitcode = 'allow' then Halt();
    : : if exitcode = 'no' then LogOff; Halt();
    : : [/code]
    : : Logoff would be a procedure meant to log the current user off.
    : :
    : : ALSO, one final question, not quite so pascal related.
    : : How could I make the program boot up BEFORE the start menu and desktop icons and wait for the program to close before loading the desktop icons and start menu? Cause if there is a way I can do that, I can make a workaround for closing the window...
    : :
    : : [code]
    : : Program 1, has user logged in?
    : : -if no, do nothing.
    : : -if yes, write "yes" to file
    : :
    : : Program 2, is user logged in?
    : : Check file,
    : : -is yes, do nothing
    : : -is no, logoff current user
    : : [/code]
    : : And it would do that BEFORE everything starts up, so user cannot get past it.
    : :
    : The only two workarounds I can see is to rewrite the windows kernel and give console programs control over the console window. The other is changing the your program into a GUI program.
    : It is possible to hook programs into the boostrap (virusscanners/firewalls do this also), but I don't know how. Perhaps a google search will give you the answers.
    :


    Well, I figured it out.
    Program 1, my security program, is going to be set as a required system service, so it boots even in safe mode, and then another program is going to run hidden in the background upon logon, and it will check if you have authenticated or not. If not, it logs you back out.
Sign In or Register to comment.