Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Auto login a user in XP, after logoff

Auto login a user in XP, after logoff

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++questionlearning
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SummerBulb
    wrote on last edited by
    #1

    Hi there. I'm trying to write an aplication that will automaticaly initiate a user login, if the user is logged off for a given period of time. (right now it's in c#, but it may as well be in C++) I've tried using the ADVAPI32.DLL's function LogonUser, but apparently that is used for impresonation (am i wrong?). So, how is that done? In addition, i failed to find a way to check if a specific user is logged on or not. Any idea? If there is an easier way to do the auto-login, i will of course be glad to hear it. Thanks, SummerBulb

    _ 1 Reply Last reply
    0
    • S SummerBulb

      Hi there. I'm trying to write an aplication that will automaticaly initiate a user login, if the user is logged off for a given period of time. (right now it's in c#, but it may as well be in C++) I've tried using the ADVAPI32.DLL's function LogonUser, but apparently that is used for impresonation (am i wrong?). So, how is that done? In addition, i failed to find a way to check if a specific user is logged on or not. Any idea? If there is an easier way to do the auto-login, i will of course be glad to hear it. Thanks, SummerBulb

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      Windows uses a registry key to enable auto-login. Look at this article - How to turn on automatic logon in Windows XP[^]

      «_Superman_» I love work. It gives me something to do between weekends.

      S 1 Reply Last reply
      0
      • _ _Superman_

        Windows uses a registry key to enable auto-login. Look at this article - How to turn on automatic logon in Windows XP[^]

        «_Superman_» I love work. It gives me something to do between weekends.

        S Offline
        S Offline
        SummerBulb
        wrote on last edited by
        #3

        Been there. That configuration is only good for the first logon (when you turn on the computer). If a logged-on user logs off, it won't log him back on.

        S 1 Reply Last reply
        0
        • S SummerBulb

          Been there. That configuration is only good for the first logon (when you turn on the computer). If a logged-on user logs off, it won't log him back on.

          S Offline
          S Offline
          SummerBulb
          wrote on last edited by
          #4

          I take my words back and aplogise. It works perfectly. Thanks!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups