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.
Printable View
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.
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.