I need help in this internet cafe app which made in order to watch out users what are they donig

Answered I need help in this internet cafe app which made in order to watch out users what are they donig

  • Wednesday, August 22, 2012 2:35 PM
     
     

    hi all

    I have made an app which help internet cafes owner to disable some features from computers to prevent  harm uses to cafe's computers

    but one thing still standing infront of me

    that how to make it not close by users only admin can close it

    ok I need 2 buttons

    buttons#1 code of make my app not to close by users

    buttons#2 code of make my app to close by admin

    so I can make main interface to my app install in admin computer and other computers that connected to the main computer will install sub interface of my app so admin can enale and disable my app at anytime

    thanks advance


    • Edited by omanxp45-2 Wednesday, August 22, 2012 2:38 PM
    •  

All Replies

  • Thursday, August 23, 2012 4:10 AM
     
     

    If Environment.UserName < >"Administrator" then

    **** code to not close ****

    else

    **** code to close ****

    end if

  • Thursday, August 23, 2012 11:40 AM
     
     

    If Environment.UserName < >"Administrator" then

    **** code to not close ****

    else

    **** code to close ****

    end if

    could you please give me more explain for this code

    and how to use it and how could I remove my app from start up programs


    • Edited by omanxp45-2 Thursday, August 23, 2012 11:50 AM
    •  
  • Thursday, August 23, 2012 1:37 PM
     
     
    Why dont you create a login to the control panel of the program?
  • Thursday, August 23, 2012 2:46 PM
     
     Answered

    If Environment.UserName < >"Administrator" then

    **** code to not close ****

    else

    **** code to close ****

    end if

    could you please give me more explain for this code

    and how to use it and how could I remove my app from start up programs


    If the user is not administrator then place in do first otherwise if administrator do other code.

    You could make the app invisible if the username is not in the administrators group if using active directory. The other alterative if not on active directory is to figure out if the current logged on user is an administrator instead of checking the username only.

    I have found this article to demostrate what im talking about:

    http://www.dreamincode.net/forums/topic/153113-detect-if-user-has-admin-privileges/

    Very useful because the 3-4 lines of code someone posted their does the job. Note: to use the code in above link run as administrator or if using task scheduler to run on multiple computers from your adminstrator computer make sure the account running the program  is an administrator and it displays not gui (have Me.Visible = false in load up form unless administrator that way the person cannot change settings).

    The above does not check if the user has admin privileges but the linked to code does. You could be logged on as an assistant to the administrator and not have administarive privileges and have an account named administrator (however unlikely) or administrator account might be disabled.


    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering - Yoda. Blog - http://www.computerprofessions.co.nr