Replies: 4 comments
-
Warn or block? An exe written in any language doesn't have access to the MSI handle so can never really do anything more then warn. Even then it would have to have it's own UI since it can't communicate directly back to MSI. I'd recommend looking into C/C++ or C#/DTF custom actions wire up to publish (control event) of your pushbutton (call the action first) and next button (block if invalid, proceed to next dialog if valid) |
Beta Was this translation helpful? Give feedback.
-
Thank you for your advice. I have dedicated the whole day to make work a solution. But still cannot make it work.
Here comes the PushButton:
And here is C# code:
It logs something into textfile with explicit path because I cannot log session of immediate custom action (SO says that) At the same time in installation log I can see that parameters are OK on UI side:
My question is: |
Beta Was this translation helpful? Give feedback.
-
Immeadiate execution custom actions can read any MSI property so there is no reason to set TestConnectionAction property. Simply read session["MONGODBHOST"] inside the c# side. MSI custom actions can also write to the MSI logfile but there is a bug or limitation in MSI that immeadiate custom actions scheduled as Control Events cannot write to the log file. What people usually do in that scenario is set a meaningless property ( session["LOGPROP"] = 'some data you want logged.'; ). This will result in MSI logging a line that the property was changed with the value. Silly, I know but it is what it is. What was your MSI logging? Be sure to do verbose. /l*v. I should see additional stuff between Invoking remote custom action and return value 1. I also can't see what you wrote to your custom log file on y:. Be advised that if you put a messagebox inside your code you can use Visual Studio to attach a debugger to it (look for process hosted by rundll32 with mixed types of native and managed ) and step through and see what's going on. I'd be happy to spend one hour with you in a screen share providing mentoring. |
Beta Was this translation helpful? Give feedback.
-
Thank you, Christopher! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have spent a couple of days searching a possible solution for my problem.
wixtoolset.org/docs, SO and github have not given me an obvious advice of what I should do exactly.
I use wix4. I have customized UI for my installation wizard. On a custom dialog I have some Edits for user to fill parameters: database host, port, username and password. I also have PushButton "Test connection".
I have python script compiled into executable which can test database connection with these 4 parameters given.
And actually that's it.
I want UI to be able to test connection and warn end user if connection cannot be established.
Is it possible with wix4?
P.S. Actually I have implemented database initialization as a step of InstallExecuteSequence. But it works only if user entered all parameters correctly (otherwise I have "value 3"). Now I would like to validate parameters BEFORE user clicks the final Install button.
Beta Was this translation helpful? Give feedback.
All reactions