TheRocket
Posts: 31
Joined: Thu Jul 26, 2012 6:55 pm

Error 1939. Service could not be configured. (2008R2)

Hi,

I'm starting to notice an issue when trying to configure a service failure actions, when the target computer is running windows 2008 R2.

I was able to reproduce this issue with Advanced installer 9.7 (not the up to date release :-/) with a new project from scratch. Add a service, and add a failure operation with the default options, linked to that service.

You should get an error when trying to install this on a windows 2008 R2:

Code: Select all

MSI (s) (7C:B8) [15:03:49:152]: Executing op: ServiceConfigureFailureAction(,Name=PrintReportNet.exe,Event=1,ResetPeriod=86400,,Command="",Actions=1,DelayActions=60000)
MSI (s) (7C:B8) [15:03:49:152]: Changing configuration of failure action for service PrintReportNet.exe.
MSI (s) (7C:B8) [15:03:49:152]: Error: 5. Failed to change current configuration of failure action for service PrintReportNet.exe
MSI (s) (7C:B8) [15:03:49:152]: Failed to change configuration of failure action for service PrintReportNet.exe
Error 1939. Service 'Your Service' (PrintReportNet.exe) could not be configured. This could be a problem with the package or your permissions. Verify that you have sufficient privileges to configure system services.
MSI (s) (7C:B8) [15:03:50:182]: Product: Your Application -- Error 1939. Service 'Your Service' (PrintReportNet.exe) could not be configured. This could be a problem with the package or your permissions. Verify that you have sufficient privileges to configure system services.
It seems that other users or installers have this kind of problem in 2011 so that might be an issue in the Windows installer logic itself:
http://windows-installer-xml-wix-toolse ... 15470.html
http://permalink.gmane.org/gmane.comp.w ... user/53618
http://windows-installer-xml-wix-toolse ... 82414.html

I could not find much information about a real fix / workaround to get the failure options working on a 2008 R2 installation. Maybe Windows 7 is also affected.
The Change log of Advanced installed doesn't seems to talk about this issue.

If you have any other information about this, that could help me, including workarounds / conditions to not perform this operation on those systems.

Thanks!
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Error 1939. Service could not be configured. (2008R2)

Hello,

Indeed this behaviour is caused by a known Windows Installer bug, it seems that the MsiConfigureServices standard action is not working properly.

We have added on our TODO list a custom action but we hoped that Microsoft will take care and will fix this bug.
However you can implement your own custom action that will configure the related Service Failure operation. You can take a look on the ChangeServiceConfig2 function article which may help you.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
waertf
Posts: 1
Joined: Thu Apr 10, 2014 10:25 am

Re: Error 1939. Service could not be configured. (2008R2)

i have the same issue.
is there any tutorial to set the setting custom action to fix this problem?
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Error 1939. Service could not be configured. (2008R2)

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

Unfortunately we don't have any tutorial or sample containing the implementation of such a custom action. However, in order to develop an adding service failure operation custom action, you can take a look on "How to create service which restarts on crash" thread which could be useful for you.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jezcooke
Posts: 29
Joined: Mon May 28, 2012 4:34 pm

Re: Error 1939. Service could not be configured. (2008R2)

While I'm sure that the original posters on this thread will have worked around this bug one way or another by now, for anyone experiencing the same issue and finding this thread (like I did) I found a simple solution here:

http://blogs.msdn.com/b/vsnetsetup/arch ... gured.aspx

The upshot is to change the error action from "Restart the service" to "Run a program" and set the program to run to "SC START YourServiceName". Same net affect but without the error (so far - so good!).
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Error 1939. Service could not be configured. (2008R2)

Hello,
While I'm sure that the original posters on this thread will have worked around this bug one way or another by now, for anyone experiencing the same issue and finding this thread (like I did) I found a simple solution here:

http://blogs.msdn.com/b/vsnetsetup/arch ... gured.aspx

The upshot is to change the error action from "Restart the service" to "Run a program" and set the program to run to "SC START YourServiceName". Same net affect but without the error (so far - so good!).
Indeed, using this approach you can avoid the related behavior. Thank you for sharing this with us. Certainly this will help other users in the future.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Error 1939. Service could not be configured. (2008R2)

Hello,

The "Service failure operations" support has been added in version 11.3 of Advanced Installer released on June 17th, 2014.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
andreasw
Posts: 2
Joined: Fri Dec 05, 2014 1:32 pm

Re: Error 1939. Service could not be configured. (2008R2)

I've just made an installer with v. 11.5, and The service failure operation (restart the service) still doesn't not work for Server 2008 R2. Works fine for Win 8
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Error 1939. Service could not be configured. (2008R2)

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

Can you please give us more details about the issue you are encountering? Does the installation process fails? If so, can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

I've tested, on a Windows Server 2008 R2 machine, a setup package which installs a service and adds a service failure operation (restart the service), but the installation succeeded. Also, the service failure operation was correctly set.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
andreasw
Posts: 2
Joined: Fri Dec 05, 2014 1:32 pm

Re: Error 1939. Service could not be configured. (2008R2)

Daniel,

I just tried to recreate my failure operation, and that did the trick! So it works now.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Error 1939. Service could not be configured. (2008R2)

Hello,

I'm glad you got this working. If you encounter any issue in the future just send us (attach here or send by e-mail at support at advancedinstaller dot com) any test case or resources which could help us to replicate and isolate the behavior.

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

Return to “Common Problems”