We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

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

How to convert a wix ServiceControl to Advanced Installer?

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: 7853
Joined: Wed Jun 13, 2018 7:49 am

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

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?

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: 7853
Joined: Wed Jun 13, 2018 7:49 am

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

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”