JasonZhang
Posts: 4
Joined: Fri Oct 29, 2021 4:13 am

How to convert a wix ServiceControl to Advanced Installer?

Fri Oct 29, 2021 4:23 am

Hi, I'm working on a convert work, from a wix project to Advanced Installer.
I'm having trouble installing a service.
In Wix project, the ServiceControl looks like below:
<DirectoryRef Id="XXX">
<Component Id="XXXDLLComponent" Guid="**************">
<!-- Static GUID across all installs -->
<File Id='XXXVlibDLL' Name='XXX_1234.dll' DiskId='1'
Source='$(var.SourcePath)..\..\References\XXX_1234.dll' KeyPath='yes'/>
<ServiceControl Id='ResetXXX' Name='XXXlms' Start='both' Stop='both' Wait='yes'/>
</Component>
</DirectoryRef>

how to convert it in Advanced Installer?

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: How to convert a wix ServiceControl to Advanced Installer?

Fri Oct 29, 2021 3:17 pm

Hello Jason and welcome to our forums,

I am not quite sure I fully understand your scenario here.

If you simply want to add a "Control Operation" for your service in Advanced Installer, all you need to do is:

- add the service executable in the "Files and Folders" page

- go to "Services" page --> "New service" --> select the executable

For more information about this, please refer to the following article:

Service Control Operations

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

JasonZhang
Posts: 4
Joined: Fri Oct 29, 2021 4:13 am

Re: How to convert a wix ServiceControl to Advanced Installer?

Mon Nov 01, 2021 9:01 am

Catalin wrote:
Fri Oct 29, 2021 3:17 pm
Hello Jason and welcome to our forums,

I am not quite sure I fully understand your scenario here.

If you simply want to add a "Control Operation" for your service in Advanced Installer, all you need to do is:

- add the service executable in the "Files and Folders" page

- go to "Services" page --> "New service" --> select the executable

For more information about this, please refer to the following article:

Service Control Operations

Hope this helps!

Best regards,
Catalin

Hi Catalin,

Thanks for your reply first. I reviewed my wix codes and requests. I realize my actual request is how to start/stop a system service.
And I realized that I worked in Service page is not correct, I think the Services page is used to install a service.
Do you have any suggestion for how to start a exsited service? Should I achieve it in Custom Action?

Thanks,
Jason

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: How to convert a wix ServiceControl to Advanced Installer?

Mon Nov 01, 2021 1:55 pm

Hello Jason,

Thank you for your followup on this.

Indeed, you are right, the "Services" page can be used to install a service and then start/stop the installed service.

This page can not be used for services outside of your package.
Do you have any suggestion for how to start a exsited service? Should I achieve it in Custom Action?
In this case, yes, we can make use of a custom action. For instance, you could use the "Start Service" predefined custom action.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”