Run .bat file through C# code as different user silently
问题 I am running one batch file every few seconds to do timesync with server using following code: Process process = new Process(); process.StartInfo.WorkingDirectory = Environment.GetFolderPath(Environment.SpecialFolder.System); process.StartInfo.FileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "cmd.exe"); process.StartInfo.Arguments = @"/C C:\TimeSync.bat"; process.StartInfo.CreateNoWindow = true; process.StartInfo.UseShellExecute = false; process.StartInfo