How would you recommend programmatically transferring files across untrusted domains without mapping drives? RRS feed

  • Question

  • I'm trying to improve automated software deployment processes. One of the greatest weaknesses with deploying to remote, untrusted domains is that there are very few legal ways to pass network credentials. We've been working with a substandard solution for years involving mapped network drives.

    In one of our applications, we're actually running out of drive letters due to the number of servers which must be deployed and the unreliability of unmapping drives. As a hack, I wrote scripts to clear up drive letters throughout the deployment, but servers are constantly being added.

    Is there any other way to programmatically copy local files to window network shares between untrusted domains?

    SFTP seems inappropriate due to requiring the server software installed and also losing Windows ACLs. I'd prefer to stick to native Windows protocols which come with Windows XP and later.

    I have no problem coding a custom solution using Windows protocols. I already looked at WMI and was able to retrieve information from a remote host on an untrusted domain without mapping drives, but couldn't find a native copy command within WMI. Are there any APIs I could access that would enable me to both connect to the untrusted domain and transfer files without mapping any drives to drive letters?

    Tuesday, January 24, 2012 6:20 PM