TonyLugg
Posts: 3
Joined: Sat Mar 16, 2013 11:13 pm
Location: Edmonton, AB
Contact:  Website

How to Create an Installation Package for a Windows Service

Fri Dec 06, 2013 12:42 am

I used to use Visual Studio 2010 to create Windows services and the Setup and Deployment project to build installation packages. This involved first adding a ProjectInstaller to the Windows service project, and creating custom actions in the setup project.

I purchased AI Pro so that I could move to VS2012/2013 and build installation packages in AI. However, I cannot find a single walkthrough or tutorial on how to do it. I contacted AI support and they gave me a Java Service example to follow stating it would be the same. Well it does not work for me.

Any help would be appreciated.

Thanks,

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to Create an Installation Package for a Windows Serv

Fri Dec 06, 2013 10:10 am

Hi,

In order to install a Windows Service you can follow the steps below:
- go in the Files and Folders page and add the .exe file that you want to install as a service
- go in the Services page and click on the [Service] toolbar button
- from the newly appeared dialog select the .exe file that you want to install as a service
- you can configure the "service to install" and the related "control operations" that was automatically added, as you need
- then build and run the project

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

TonyLugg
Posts: 3
Joined: Sat Mar 16, 2013 11:13 pm
Location: Edmonton, AB
Contact:  Website

Re: How to Create an Installation Package for a Windows Serv

Fri Dec 06, 2013 3:05 pm

Thank you for your reply Eusebiu. I had tried that but the EXE was not showing up in the list when trying to use New Service Installation. I went back to my Visual Studio project and added a ProjectInstaller class, rebuilt, and then my service executable showed up under New Service Installation in AI. I'm not sure if this step fixed the problem or if it was something else that caused it, but it is working, and easier than using the old Visual Studio Package and Deployment project. It would be nice if they had a clear explanation from Visual Studio right through to deployment for Windows services.

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to Create an Installation Package for a Windows Serv

Mon Dec 09, 2013 9:34 am

Hi,

Indeed, the executables do not show up in the list when try to install a new service because of an Advanced Installer issue. A fix will be available in a future version of Advanced Installer.

Until then, as a workaround, in the "Select Installed File" dialog you can set the "Files of Type" field to "All Files" and then choose your EXE file.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: How to Create an Installation Package for a Windows Serv

Fri Jan 24, 2014 9:27 am

Hello,

This was fixed in version 10.9 of Advanced Installer released on January 23, 2014.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

vikasb
Posts: 9
Joined: Thu May 28, 2020 11:20 am

Re: How to Create an Installation Package for a Windows Service

Thu May 28, 2020 11:25 am

Don't we need InstallUtil.exe for installation purpose?
Do we need to give reference of it in project?

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

Re: How to Create an Installation Package for a Windows Service

Thu May 28, 2020 11:55 am

Hello,
Don't we need InstallUtil.exe for installation purpose?
Do we need to give reference of it in project?
No, there is no need for that. Please see my answer to your other thread here:

viewtopic.php?f=5&t=45458&p=116449#p116449

Hope it helps.

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

vikasb
Posts: 9
Joined: Thu May 28, 2020 11:20 am

Re: How to Create an Installation Package for a Windows Service

Thu May 28, 2020 1:50 pm

Thanks Catalin,

It really helped me and solved my query.

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

Re: How to Create an Installation Package for a Windows Service

Fri May 29, 2020 8:53 am

You are always welcome!

I am really glad you got this working!

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

Return to “Building Installers”