>I am trying to access data on a machine on my network. I am receinving a message box that says
>
>Incorrect password or unknown username for:
>
>Then it asks for a username and password. This only happens the first time I try and connect to the machine. The system remembers the information after this. Is there any way to accomplish this via code or an API call?
>
Yes - WNetAddConnection2() or WNetAddConnection3() in the Windows API allow you to log into a remote share and specify a user name, domain and password, even without mapping the UNC to a local resource (an example can be found in my NETRESOURCE class); You can use the Wscript.Network MapNetworkDrive method could be used - see the WSH links in my sig block for details, or the command line NET USE command built into Win32 operating systems will allow you to specify a user name and password.