0

I'm currently exploring WiX v4 and I'm facing a small challenge in my scenario.

My scenario: I've developed an installer for a Windows service. Prior to the installation of this service, I need to execute a custom script (e.g. a batch script), and the output generated from this script needs to be used for configuring the Windows service (specifically, I pass this output as an argument to the service). So I assume the value from the script has to be somehow dynamically saved to the variable.

The script is currently in the WiX project DIR.

I would very much appreciate any guidance on the best approach to handle this situation.

1 Answer 1

0

You will need to write a DLL based custom action which gets access to the "installation session handle". With the session handle you can set Properties that can be used as arguments to your service.

Executable custom actions (including batch files that are run by cmd.exe) do not have access to the session handle.

Sign up to request clarification or add additional context in comments.

1 Comment

Rob, thank you very much for replying. To be honest, I was hoping you would see my question because my knowledge of WiX is 100% your job! Could you please point me to an example of this approach, if you have one?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.