We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

adamdc78
Posts: 76
Joined: Wed Mar 19, 2014 7:42 pm

Populate listbox with stdout of attached console app

Background
I'm authoring an installer during which the user can select an installed entity certificate for use with SSL encryption (they can also choose to generate a new one, but that is outside of the scope of this problem as it is working correctly). I have a C# console application which does all of the certificate work included as a Temporary file. It performs various functions during installation and is also run as an attached file near the beginning of un-installations under certain circumstances to clean up the generated certificates.

The problem
I need to present the user with the list of available certificates from the Windows certificate store, which is easily accomplished in my console application and I can send the formatted data for a listbox to stdout to be read in via VBScript; the issue is that it has to run before the user sees the certificate selection dialog, which occurs before temporary files are copied.

Potential, yet undesirable, solution
I can launch the .exe as an attached file and have it write to a file instead of stdout, then have another custom action read that file and set the property. I don't really want to do it this way if I don't have to (I'd much rather keep it all in memory than write it to disk, then have to delete it shortly thereafter).

Thank you,

- Adam
adamdc78
Posts: 76
Joined: Wed Mar 19, 2014 7:42 pm

Re: Populate listbox with stdout of attached console app

I ended up implementing a C# custom action as this particular action doesn't require access to external .dlls, which was actually rather straightforward.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Populate listbox with stdout of attached console app

Hi Adam,

I'm glad you got this working by yourself. If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”