I know that this may at first glance look like a question that you saw before: Know when an external process window is displayed
But that is a little different.
I have a C # asp.net web application that helps people create an installer for their programs. (The developers here are mostly mechanical engineers who build equations in some calculation tools, they are not software users, so we donβt want them to spend time studying wix, debugging installers, GUID GUIDs between releases, etc.)
The console application "heat.exe" (the tool that comes with the wix tools) will be launched on the server to collect dll registration information, etc., if and only if they have a dll in their repository ..
I do it like this:
public int runHeat(string filePath, string outputFile, ref string response) { response += "run heat.exe to harvest file data" + '\r' + '\n'; string args = "file " + '"' + filePath + '"' + " -srd -out" + '"' + outputFile + '"'; string command = Path.Combine(WixBinariesPath, "heat.exe"); string workPath = Path.GetDirectoryName(filePath); StringBuilder outputBuilder; ProcessStartInfo processStartInfo; Process process; outputBuilder = new StringBuilder(); processStartInfo = new ProcessStartInfo(); processStartInfo.CreateNoWindow = true; processStartInfo.RedirectStandardOutput = true; processStartInfo.RedirectStandardInput = true; processStartInfo.UseShellExecute = false; processStartInfo.WorkingDirectory = workPath; processStartInfo.Arguments = args; processStartInfo.FileName = command; processStartInfo.ErrorDialog = false;
I thought it worked. He passed the tests, he worked for some time without problems, and then suddenly the developer called that the created webtool no longer creates wix xml for him.
When I logged in to the server, I found this dialog box:

and then click [OK] - then the web application continued, and you created xml and everything was processed.
Now I have found a dll that causes heat to throw this error. It really does not need to be logged (typically right?). So I could probably just write a timeout to kill heat.exe if necessary, and thus unlock the waiting script (and basically fix the problem until it repeats with the dll that really needs in registration). But this does not actually detect an error, that is, it simply detects that the material takes time ...
In this error, I would like to continue the script, but warned the user that heat.exe could not be started in this particular file. But for this, I need my asp.net application to know that this error was caused, and delete it so the script can continue.
as *? I get information that this error occurred at runtime, so I can deal with it from a script server?
Have you tried using the -sreg command line option to heat up?
Now I have it, and as a result, heat.exe no longer processes it, but this is not a solution, since the heat also avoids collecting the registry information that I need to auto-update the DLL that comes with this code.