Microsoft KB Archive/131202

From BetaArchive Wiki
Knowledge Base


How To Perform Programmatic Logon from Windows for Workgroups

Article ID: 131202

Article Last Modified on 7/2/2004



APPLIES TO

  • Microsoft Windows Software Development Kit 3.11



This article was previously published under Q131202

SUMMARY

I_AutoLogon is the only documented API for doing a programmatic logon from Windows for Workgroups. This API requires the user to type a user name and password. There aren't any other documented functions for performing logons. In particular, there is nothing documented to:

  • Perform a programmatic logon using a specific user name and password.
  • Perform a programmatic logon to a particular domain.


MORE INFORMATION

It is possible to perform a logon in an indirect fashion by executing a batch file that calls NET LOGON. For example, you might have a file named LOGON.BAT that contains:

   REM batch file that performs a logon
   NET LOGON <username> <password> /DOMAIN:<mydomain>
                

You can use WinExec to execute the batch file:

   WinExec( "LOGON.BAT", SW_HIDE );
                

REFERENCES

For more information, please see the Windows for Workgroups SDK Help file.

Keywords: kbhowto kbapi kbnetwork KB131202