Copy file to network path using Windows Service using cmd file
问题 I am trying to copy the xml file from the local folder to shared path using C# code in my Windows Service. It is calling the CMD file and returns Access Denied . But same is works if I try copying to local. private void CopyFile(string path) { try { Process process = new Process(); ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.UseShellExecute = false; startInfo.FileName = Path.Combine(Environment.CurrentDirectory, "Batch", "Run.cmd"); startInfo.Arguments = "/c " + path;