MSI Installation hangs while Starting Service - Advanced Installer Community
Ruben
Posts: 57
Joined: Fri Apr 10, 2015 2:35 pm

MSI Installation hangs while Starting Service

The installation of a minimum, Hello-Worldish MSI file hangs reproduceably while starting a service.

These 5 steps reproduce it:
  • 1. Create new Project
    2. Under "Files and Folders"/Application Folder, add a single exe file. I simply took the Windows/System32/ping.exe of Windows XP.
    3. Create a new Service, select the ping.exe. In Context/Arguments, add this:
    -n 100 127.0.0.1
    That should run ping in a loop. Leave anything else at its default values.
    4. Build the project.
    5. Install it.
    Result: Installations hangs while "Starting Services". The Service Manager (services.msc) shows the service is "starting".
    After several minutes, installation times out with the "Verify that you have sufficient privileges to start service" message.
Attached are project + installation log + the ping.exe of Windows XP.


I can't believe this simple scenario does not work. Which crucial little thing am I missing ?

Thank you very much,
Ruben

---
AdvancedInstaller 12.0.5 Enterprise
Installation was tested with both Windows 7/64Bit and Windows XP/32Bit
Attachments
ping.exe.zip
(7.91 KiB) Downloaded 361 times
install.log
(190.94 KiB) Downloaded 357 times
Service-minimum.aip
(11.42 KiB) Downloaded 422 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: MSI Installation hangs while Starting Service

Hello Ruben,

Please note that you should not use the "ping.exe" Windows tool to install it as a service. I doubt that the "ping.exe" tool was designed/built to run as a service.

For testing purposes only you can try to manually install and start the ping.exe as a service and see if this can be accomplished, but I strongly believe this cannot be done. For instance, you can try to use SC.exe tool.

If you want to test a service installation setup then you can use the sample attached to our "Creating a Java Service Installation" tutorial. Also, you can try to first develop your own sample service application and then create a setup package for it using AI.

If you have any question just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Ruben
Posts: 57
Joined: Fri Apr 10, 2015 2:35 pm

Re: MSI Installation hangs while Starting Service

Of course, we don't run ping as a service in production :-)
I've got another exe that hangs when starting as a service. I'm about to find out why.

The question probably boils down to:

"Does AdvancedInstaller wrap any exe as a service ? That seems possible. For example, nssm (http://nssm.cc) does.
Or must the exe satisfy some defined requirements, and which ?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: MSI Installation hangs while Starting Service

Hello,
"Does AdvancedInstaller wrap any exe as a service ? That seems possible. For example, nssm (http://nssm.cc) does.
No, we do not have such feature. Also, I'm not sure how this can be possible without a proper design of your EXE application which as I said it must satisfy the service application development requirements.
Or must the exe satisfy some defined requirements, and which ?
Yes, the EXE application should meet all the development requirements of a Windows service application. Please take a look on the "Introduction to Windows Service Applications" and "Services" articles which should help you get a better understanding about how a service can be developed and used.

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

Return to “Common Problems”