cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Barbara
Level 7

Launch a C# Console Application

I want to launch a C# console application with a custom action "Launch an executable", Commit execution in system context. Launching the console applications fails in that way, that no console window opens. Doing the same with a c# windows forms application works. But I want to use the console application because no user interaction should be possible, only the display of some messages.
Are this two application types handeled differenty by the Windows Installer?

Thank you for your comments.

Barbara
Labels (1)
0 Kudos
(3) Replies
Christopher_Pai
Level 16

Why would you want to display a modal ui during the commit phase execution? What would happen during a silent install? Would you want the information logged during silent?

I'd suggest refactoring your EXE into a DLL using C# DTF custom actions.

Depending on what you are displaying a message, you could possibly do your check as part of your AppSearch / Costing and display the message more cleanly in your UI via MSI or send it to the log depending on the UILevel.

You can also handle errors this way.
0 Kudos
Barbara
Level 7

There are some tricky requirements which I cannot change and I am doing some research for it. One thing is: Use a MSI to deploy silent, then call a C# Exe from this MSI package which in turn installs some other MSIs.
So I cannot use a DLL, the only way I was able to accomplish it so far was to call a C# Windows Forms Exe wit a commit CA,asynchronous (dont wait for execution). With a C# DLL it was not possible, because I dont have the option asynchronous (dont wait for execution).
The logging is done by the C# exe and the MSIs. Chaining is for now not an option. So for me the onliest way is to call a C# EXE which has no user interface.

Barbara
0 Kudos
Christopher_Pai
Level 16

If it was me I'd tell the person who wrote the requirements that they don't know what they are talking about and that they need to stop fighting against how MSI works. I do this all the time at work and I don't lose my job and the quality of the installers improve.
0 Kudos