Q: I'm trying to send a small .wav file to a remote Windows 2000 workstation using alternate credentials . I searched the Web and found some code (see Listing 1) that I though would help. However, the code fails on the last line, and I receive an Access Denied message. The problem doesn't lie with the credentials. When I type the IP address in a Microsoft Internet Explorer (IE) session and enter the username and password, I successfully gain access to the machine. I posted this problem on ScriptingAnswers.com (http://www.scriptinganswers.com). The person who responded told me that the FileSystemObject object and Windows Management Instrumentation (WMI) are two different things and that there isn't any support for alternate credentials when you're trying to copy files with the FileSystemObject object. The person said that I didn't need to use WMI and suggested using a batch file instead. He said the batch file should specify the alternate credentials with the Net Use command, map a drive to the remote computer, copy the .wav file, then remove the mapped drive. I created such a batch file, but it runs slowly and produces inconsistent results. Can you help?
—Rick Bates . . .