Turning off user specific PC access based on stimulus?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brad Markisohn

    Turning off user specific PC access based on stimulus?

    Is there a way to log a non-administrative user off a PC or prevent them
    from accessing the PC based on some external test? We can assume that the
    OS is either Win 2k or Win XP.

    TIA
    Brad


  • Nikolay Petrov

    #2
    Re: Turning off user specific PC access based on stimulus?

    remove the non-administrative users ;-)

    Comment

    • Nikolay Petrov

      #3
      Re: Turning off user specific PC access based on stimulus?

      remove the non-administrative users ;-)

      Comment

      • Peter Huang [MSFT]

        #4
        RE: Turning off user specific PC access based on stimulus?

        Hi

        I agree with Nikolay's suggestion.
        Also to logoff the current user, we can use the ExitWindowsEx API, if you
        wants to logoff another user, e.g. you have the admin right on an terminal
        server., we can use the WTSLogoffSessio n API.

        If you wants to prevent certain user from logon, I think it would be better
        to disable his account even delete the account.

        If you still have any concern please feel free to post here.


        Best regards,

        Peter Huang
        Microsoft Online Partner Support

        Get Secure! - www.microsoft.com/security
        This posting is provided "AS IS" with no warranties, and confers no rights.

        Comment

        • Brad Markisohn

          #5
          Re: Turning off user specific PC access based on stimulus?

          Peter and Nikolay,

          Thank you for the responses, however I don't think that I've explained my
          problem very clearly. What I'd like to do is programatically log off or
          disable a user based on some critieria. Here's an example of what I'd like
          to do: My son's bed time is 10:00 PM. At 10:00 PM he should log off of the
          computer and go to bed. I'd like to run an application, possibly a windows
          service, that keeps track of time then logs him off when it's time to go to
          bed. This doesn't have any other impact on the current user other than to
          log them off. Is this something that I can do via the ExitWindows API?

          Thanks again.

          Brad


          ""Peter Huang" [MSFT]" <v-phuang@online.m icrosoft.com> wrote in message
          news:ac3JvzYDFH A.3744@cpmsftng xa10.phx.gbl...[color=blue]
          > Hi
          >
          > I agree with Nikolay's suggestion.
          > Also to logoff the current user, we can use the ExitWindowsEx API, if you
          > wants to logoff another user, e.g. you have the admin right on an terminal
          > server., we can use the WTSLogoffSessio n API.
          >
          > If you wants to prevent certain user from logon, I think it would be[/color]
          better[color=blue]
          > to disable his account even delete the account.
          >
          > If you still have any concern please feel free to post here.
          >
          >
          > Best regards,
          >
          > Peter Huang
          > Microsoft Online Partner Support
          >
          > Get Secure! - www.microsoft.com/security
          > This posting is provided "AS IS" with no warranties, and confers no[/color]
          rights.[color=blue]
          >[/color]


          Comment

          • Nikolay Petrov

            #6
            Re: Turning off user specific PC access based on stimulus?

            for this u can also use WTSLogoffSessio n API

            it works on WIn XP

            Comment

            • Peter Huang [MSFT]

              #7
              Re: Turning off user specific PC access based on stimulus?

              Hi

              I agree with Nikolay's suggestion, because ExitWindowsEx API is used to log
              off current user(The caller).

              For detailed information, you may take a look at the MSDN.

              The ExitWindowsEx function returns as soon as it has initiated the shutdown
              process. The shutdown or logoff then proceeds asynchronously. The function
              is designed to stop all processes in the caller's logon session. Therefore,
              if you are not the interactive user, the function can succeed without
              actually shutting down the computer.
              ExitWindowsEx

              e/exitwindowsex.a sp

              Also here is link about WTSLogoffSessio n in vb6, I think it will be
              migrated to vb.net easier.
              BTW: Long in vb6 means 32bit while in vb.net long means 64bit. So in the
              vb.net you can use int32 to replace the long in vb6.

              Monolithic TS API Wrapper


              If you still have any concern, please feel free to post here.

              Best regards,

              Peter Huang
              Microsoft Online Partner Support

              Get Secure! - www.microsoft.com/security
              This posting is provided "AS IS" with no warranties, and confers no rights.

              Comment

              Working...