How is your application being run? Is it under windows scheduler or something?
Say it's running under scheduler, you can define a set of credentials at this point. This will form the security context that the application will run under.
Now check your backup machine. Go to 'Manage my Computer' and check under groups \ users. The security context you're using when running your program (e.g MYDOMAIN\AUser) needs to be granted access so that it has rights to the machine.
If all that is OK, you won't need 'log on' via explorer. Windows will negotiate this for you and determine that your program has rights to the machine and allow access.
Don't forget to use full UNC rather than shared drive names which are specific to user profiles. So instead of using
Use something like
You can try setting the thread to the current windows principal, have this happen right at the start of your program
You'll need using System.Security.Principal;
and using System.Threading;
WindowsIdentity identity = WindowsIdentity.GetCurrent();
WindowsPrincipal principal = new WindowsPrincipal(identity);
Thread.CurrentPrincipal = principal;
If you're running this within a domain, you should be able to access the other machine no probs.
Can you confirm this?