CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 1999
    Posts
    35

    Bypass Winnt Login

    Currently I'm using winnt as my web server.. I need to restart my server from remote that is why i have to make my Nt machine auto login.. How can i do that.. any help is very appreciated.


  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Bypass Winnt Login

    Use the API LogonUser in "Advapi32"

    private Declare Function LogonUser Lib "Advapi32" Alias "LogonUserA" (byval lpszUsername as string,
    byval lpszDomain as Any, byval lpszPassword as string, byval dwLogonType as Long, byval dwLogonProvider as Long, phToken as Long) as Long

    private Const LOGON32_PROVIDER_DEFAULT as Long = 0&
    private Const LOGON32_PROVIDER_WINNT35 as Long = 1&
    private Const LOGON32_LOGON_INTERACTIVE as Long = 2&
    private Const LOGON32_LOGON_NETWORK as Long = 3&
    private Const LOGON32_LOGON_BATCH as Long = 4&
    private Const LOGON32_LOGON_SERVICE as Long = 5&




    For correct use, goto http://www.vbsquare.com/articles/ntvb/index2.html

    Tom Cannaerts
    [email protected]

    The best way to escape a problem, is to solve it.
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured