
ganesh.srinivasan1.5524909074489421E12 asked a question.
automating user name and password for a service
My InstallScript MSI project under InstallShield 2009 Professional is working fine with a windows service component in one of the features successfully installed with a fixed User Name and Password set in the Component's Advanced Settings | Install NT Service property. Now I need to be able to dynamically set these values during the installation. I am able to prompt the user for these values via SdLogonUserInformation function. But the challenge is setting these values in to the component property at run time. Any ideas? The closest thing I found was the FeatureSetData() function. But its nInfo parameter does not have a corresponding numeric value for these settings (user name, password). Any pointers or sample code will be appreciated.
Thanks in advance.
My InstallScript MSI project under InstallShield 2009 Professional is working fine with a windows service component in one of the features successfully installed with a fixed User Name and Password set in the Component's Advanced Settings | Install NT Service property. Now I need to be able to dynamically set these values during the installation. I am able to prompt the user for these values via SdLogonUserInformation function. But the challenge is setting these values in to the component property at run time. Any ideas? The closest thing I found was the FeatureSetData() function. But its nInfo parameter does not have a corresponding numeric value for these settings (user name, password). Any pointers or sample code will be appreciated.
Thanks in advance. "
If you find a more advanced way I'd love to hear it, but the method I'm currently using is to install my services as LocalSystem, then after InstallServices I execute a custom action that updates the service using the windows "sc.exe" tool.
the syntax is:
[CODE]sc.exe config [SERVICENAME] obj= [USERNAME] password= [PASSWORD][/CODE]
It would be nice to be able to simply update the formatted data for user name and password in the msi service table from within installscript.
Thanks again.