PDA

View Full Version : Install Windows Service with dynamic name (name taken from dialog box during install)



imorrison
05-06-2017, 05:26 AM
Hello There,

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 someone please suggest how that can be achieved.
Your help is really appreciated.

Thank you in advance!

ch_eng
09-18-2017, 09:40 AM
imorrison,

We do this in an InstallScript Only project via the following code. If this is for Basic MSI, I don't have an answer.


// Register Windows Service
ServiceAddService( strServiceName,
strServiceDisplayName,
strServiceDescription,
szPath ^ strFilename,
TRUE,
""
);

HTH