Hi All,
I am trying to create/install Windows Service with dynamic name (name taken from dialog box during installation).
I am using same technique as updating XML file, but its not working
...for instance.....
in the dialog box during installation, I take few properties to update into XML file. For that...I pass value/property as....
[value1], [value2],...so on.
So name/value taken from the dialog box, I need to set that as "Display Name" and the "Service Name" of the service. Such as below....
Display Name: [TestServiceName]
Can you please suggest how that can be achieved.
Your help is really appreciated.
Thank you in advance!

Install Windows Service with dynamic name (name taken from dialog box
Posted 06 May 2017 - 13:34
Posted 10 May 2017 - 16:30
I think the best way to do this would be through a custom action. Using the text input as the input for the service create command in the command line.
If you are setting settings that go beyond just starting a service, you may need to do some extra research for setting dependencies and recovery conditions.
You also need to have an uninstall custom action. Keep in mind the value the user gave you at install time is long since gone. You might want to save it in a registry key for retrieval during uninstall.
There are built in functions in InstallScript for adding and removing services. Not sure how many of the extra settings they can set however.
Posted 11 May 2017 - 19:13
You need to use a proeprty name which has no lower case letters: TESTSERVICENAME
Only such properties keep their value when the installation switches from UI to execute sequence.
Stefan Krüger
InstallSite.org twitter facebook
Posted 15 May 2017 - 08:46
Hi Guys
Really Thanks for your replies.
@deramor: I do create/use in built command lines, for such as starting automatic services, running the services, stop and delete on uninstall and so on. However, I couldn't find any command line for taking the name dynamically.
@Stefan: Currently thats how I was trying to do, but not working as expected. In the post I have written in Caps and Small cases... but in Install shield name is as you have suggested. TESTSERVICENAME.
Best regards
Josef
Posted 15 May 2017 - 13:53
Is TESTSERVICENAME also listed in the property named SecureCustomProperties?
If it still doesn't work, generate a verbose log. It will show anytime the value of the property changes.
Stefan Krüger
InstallSite.org twitter facebook