I'm building a Windows app and I'm stumped on a simple copy operation. Here is the scenerio:
I want to copy c:\temp\somefile.txt to \\remoteserver\c$\temp\somefile.txt
Now my local machine is on one domain and the remote server is on another domain. Typically when you use Windows Explorer to copy you get prompted for your remote domain credentials. No problem, I'm an admin on the remote domain.
I've tried:
fso.copyfile <- This doesn't allow for remote credentials
wmi <- Provides remote credentials however no UNC's
system.io.file.copy <- Uses local credentials
I would prefer to use system.io.file.copy. How do I provide remote credentials through my application?
Note: This is a Windows application NOT ASP.
I want to copy c:\temp\somefile.txt to \\remoteserver\c$\temp\somefile.txt
Now my local machine is on one domain and the remote server is on another domain. Typically when you use Windows Explorer to copy you get prompted for your remote domain credentials. No problem, I'm an admin on the remote domain.
I've tried:
fso.copyfile <- This doesn't allow for remote credentials
wmi <- Provides remote credentials however no UNC's
system.io.file.copy <- Uses local credentials
I would prefer to use system.io.file.copy. How do I provide remote credentials through my application?
Note: This is a Windows application NOT ASP.