Hi,
I am building an installer to install our Transport Agent for Exchange Server. As part of the installation process, I'd like to conditionally stop the MSExchangeTransport service, install our DLL, register the DLL (requires two commands to be executed in the Exchange Powershell) and the re-start the MSExchangeTransport service.
I have been able to make some progress:
- I can successfully detect the state of the MSExchangeTransport service: http://www.advancedinstaller.com/user-g ... rvice.html (this is working very nicely)
- I have created a custom dialog that prompts the user if they wish to stop and re-start the service (using the AI_SERVICE_STATE property); this populates a property using a radiobutton group.
However, I am having trouble getting much further. The next step as I see it is to stop the service if the user has so elected. To that end, I was going to use a Launch file as Administrator custom action... I have created the action but I'm unable to insert it anywhere in the Installation Sequence. Ideally, I'd it to go in the Preparing stage. Likewise, I'd like a second custom action in the Finish Execution stage to re-start it. So...
1) How do I insert my Custom Action in these stages? Perhaps I have missed how to use the UI?
2) How can I make my Custom Actions execute conditionally based on the property populated on my dialog?
Next, I'll need to be able to run the two Exchnage Powershell commands to register the Transport Agent:
- Register-TransportAgent ...
- Enable-TransportAgent ...
Could you give me some guidance on how I might accomplish this?
Many thanks,
Ben