startprocessinfo

How to start a 32-bit process in C# without using shell execute on 64-bit machine?

邮差的信 提交于 2019-12-11 02:18:44
问题 I have an ASP .NET web application on a 64-bit machine that needs to run a legacy 32-bit reporting application. When I run the program with UseShellExecute = false , the program exits with exit code: -1073741502 I can't use Shell Execute because I have to run the process as a different user. Yet, when Shell Execute is true, the process will run fine (although I have to change the user that ASP .NET is executing under). How can I start this 32-bit program using C# without use shell execute?

ProcessInfo and RedirectStandardOutput

孤人 提交于 2019-11-26 22:11:14
I have an app which calls another process in a command window and that process has updating stats that output to the console window. I thought this was a fairly simple operation but I can't seem to get it to work. Am I missing something? string assemblyLocation = Assembly.GetExecutingAssembly().Location; Process process = new Process { ProcessStart = { RedirectStandardOutput = true, UseShellExecute = false, WindowStyle = ProcessWindowStyle.Hidden, Arguments = arg, FileName = assemblyLocation.Substring(0, assemblyLocation.LastIndexOf("\\")) + "\\ffmpeg.exe", CreateNoWindow = true } }; process

ProcessInfo and RedirectStandardOutput

元气小坏坏 提交于 2019-11-26 08:12:57
问题 I have an app which calls another process in a command window and that process has updating stats that output to the console window. I thought this was a fairly simple operation but I can\'t seem to get it to work. Am I missing something? string assemblyLocation = Assembly.GetExecutingAssembly().Location; Process process = new Process { ProcessStart = { RedirectStandardOutput = true, UseShellExecute = false, WindowStyle = ProcessWindowStyle.Hidden, Arguments = arg, FileName = assemblyLocation