>>Necesito que aplicacíon se logee a un Dominio Windows NT a traves de codigo. Existe algun mecanismo para realizar esto. El API de Windows, tal vez.
>>Saludos
>>
>>Is posible logon by code in a Windows NT Domain.
>>Sorry my english.
>>Thank you.
>
>You should be able to use a net use connection if you are running Windows NT and connection to an NT box.
>
>Net use * \\anotherserver\sharename /user:othername yourpasswordgoeshere
>
>The above command will allow you to log in to a different domain as a different user. You can swap the asterisk for a drive letter if you prefer.
No, this would attach a specified resource at the UNC, but would not cause a shift of domain context. This may be subtle, but there is a huge distinction between changing domains and attaching the resources of another domain.
The command line you give above would be fired from the RUN command, and would work from NT or Win9x; there's no need to shell to the command line since the equivalent functionality is available from both the API and the Wscript.Network object, without depending ont he availability of the NET USE command in the user's current command line search path.