
vlusardi asked a question.
Need to start only the services that were not omitted in the custom setup dialog.
I have a checkbox in the last dialog of my basic MSI install (SetupCompleteSuccess dialog) that, when checked, starts the services via a C custom action. Currently, the CA starts all services. But, if the user disabled some of the services in the custom install dialog, i need to be able to start only those services that remain. I'm relatively new to IS, and can't figure out how I can access the list of services (or features) that the user has chosen to keep. IS must keep a collection of these for its own purposes when the StartServices CA is run, so I'm guessing it's a matter of finding this. Or maybe i could just call StartServices in my own CA and it would be that simple...?? Ha...
Hoping this is possible. Thanks in advance for your input.
Feature states are tracked by the operating system and the MSI engine.
Everything a person needs to know is here.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa368012(v=vs.85).aspx
In a nutshell the Condition for the ServiceControl will be "&MyFeature=3" where you replace "MyFeature" with the name of your feature.
I hope that is somewhat helpful.
WiX seems to do the right thing automatically, if you read the Start attribute description here.
http://wixtoolset.org/documentation/manual/v3/xsd/wix/servicecontrol.html
Chad
I've done plenty of searching online and I've seen where the (DTF) Deployment Tools Foundation is used by calling OpenDatabase() and other functions using a reference to the Microsoft.Deployment.WindowsInstaller assembly. The issue I have is that this assembly appears to be available only with a WIX Toolset install, and i don't want to rely on another deployment tool outside of InstallShield to complete the task. I also see that InstallScript has functions to do this as well, so I will investigate that option further. Would really rather develop in C if at all possible.
Thanks in advance for any suggestions.
Best of luck!
Chad