"Manually" Start A Service And Display Error Message - Advanced Installer Community
sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

"Manually" Start A Service And Display Error Message

The goal is: try starting our service, if it fails to start don't rollback the installation but put up an error dialog box saying something like "the service failed to start please check the log file at...".

I know I can use my own custom action to manually Start Service but unfortunately AI's stock "Detect Service" can only run in immediate mode as would any other CA that would set a property so an error dialog could be conditionally displayed.

Thoughts?

Scott
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: "Manually" Start A Service And Display Error Message

Hi Scott,

The installation won't rollback. The default "Error control" when adding a service from the Services page is "Display and error message and continue". The other possibilities are "Ignore the error" and "Display an error and restart the computer".

That specific error text can be configured in the dictionary from the Translations page -> Default Strings tab, its ID is Error.1920.

Maybe I'm missing something, what exactly do you mean by "Manually"? Can you give me an example?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Re: "Manually" Start A Service And Display Error Message

Mihai,

We've gone through this before on other threads... that default "Error control" you speak of effects/configures how an INSTALLED service is configured NOT how the service behaves on install / failed install!

Hence this is my issue... I need a way to start a service, determined it's failed to start and then display an informative error message BUT continue the install.

A failed to start service will cause a rollback using AI's service wizard/panels.

"Manually" means I run a command prompt based custom action, e.g. sc start CiceroClientService
Scott Jeslis
Senior Software Engineer
Cicero, Inc.

Return to “Common Problems”