Detect Service is not working if its execution time is "defe - Advanced Installer Community
nirs
Posts: 42
Joined: Wed Aug 13, 2014 2:46 pm

Detect Service is not working if its execution time is "defe

Hi,

After the problem reported on thread:http://www.advancedinstaller.com/forums ... =2&t=28930


I debugged it and I noticed that when the execution timeof detect service is after the system is deferred the AI_SERVICE_STATE property is an empty string.
I attached a small aip file which should detect the service 'Dnscache' and display it on message box.
It always display an empty string.

Please advice.
Thanks
Attachments
Your Application.aip
Application to reproduce the problem
(12.4 KiB) Downloaded 377 times
nirs
Posts: 42
Joined: Wed Aug 13, 2014 2:46 pm

Re: Detect Service is not working if its execution time is "

If it only can be run 'Immediate' so I have the following questions:
1) Why can it be enabled?
2) How can I detect the service status if I install a service during my installation after the system is deferred?

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

Re: Detect Service is not working if its execution time is "

Hi,
1) Why can it be enabled?
It can be enabled because of an Advanced Installer issue that was fixed in the 11.1 version, but it shouldn't.
2) How can I detect the service status if I install a service during my installation after the system is deferred?
In order to achieve this you can create a custom action that verifies the following registry key to see the status of the service:

Code: Select all

HKLM\System\CurrentControlSet\Services\<ServiceName>\Start
You can take a look on the Detect Service Disabled (or not) thread which debates a similar problem.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nirs
Posts: 42
Joined: Wed Aug 13, 2014 2:46 pm

Re: Detect Service is not working if its execution time is "

Hi,
I see on the thread http://www.advancedinstaller.com/forums ... 010#p64373 that you recommended to go in the Search page and create a registry search.
Correct me if I'm wrong, but aren't the search phase is being executed before the system is deferred?

I should detect the service state after the system is deferred.

Thanks again
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Detect Service is not working if its execution time is "

Hi,

Indeed, on that thread I recommended to the user to create a search in the "Search" page, but that case was a little bit different than yours. So, in your case, you need to create a custom action and run it as deferred, when the system is being modified.

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

Return to “Common Problems”