Sending data from main function to custom dialog

Aug 22, 2016 at 12:57 PM
Hi, Oleg!
I have ManagedProject.
I want to send string data from main function where I create ManagedProject and build MSI to load event handler of custom dialog.
How can I do it?
Aug 23, 2016 at 2:04 AM
You cannot do this.

The "main function where you create ManagedProject" is executed during the build msi procedure and your custom dialog is hosted by this MSI during install. Any data that you want to pass to the dialog needs to be obtained at run-time (not compile-time) in the dialog itself.

If the data your dialog needs need to be generated at compile time then you need to push it into the MSI property during the build and read from this property when your dialog is instantiated at run time.
Aug 23, 2016 at 1:48 PM
I don't understand where I can push data into MSI property. In main function?
Aug 24, 2016 at 2:58 AM
var project =
    new Project("MyProduct",
        new Dir(@"%ProgramFiles%\My Company\My Product",
            new File(@"Files\Bin\MyApp.exe")),
            new Dir(@"Docs\Manual",
                new File(@"Files\Docs\Manual.txt") { NeverOverwrite = true }),
        new Property("<prop name>", "<prop value>"));