StartService called twice - Advanced Installer Community
prerak6962
Posts: 112
Joined: Mon Dec 08, 2014 5:26 pm

StartService called twice

In my project, I have a service that is installed and is run by a dedicated user account. I fetch the details of this user account (username/password) during install time in one of the dialog. The password property is marked as "Persistent Property" and "Secure Property". Previously I had some issues, while launching the service as "AI_SecureProperty" action is called before "StartService" by default, hence making the password invalid. However, this was resolved by changing the execution order of actions in "Table Editor". The discussion related to this is here: viewtopic.php?f=2&t=39817

Now, in the same project, I have a weird behavior concerning the same service.
The flow "install" -> "Update" works completely fine.

But the flow "Install" -> "Modify" -> "Update" fails.
During "Modify" I reinstall the feature that contains the service, as I have to update a registry entry.
During the "Update", following things are done concerning the service:
1. Get user password from registry
2. Decrypt user password value using SecureProp.dll
3. InstallService
4. StartService
5. Call AI_SecureProperty

In the logs, I can see the above steps happening but the weird thing is, the actions #3 and #4 are called twice. And as they are called after "AI_SecureProperty", the "StartService" fails with invalid password (obviously, as the password is encrypted now).

I have attached the "Install", "Modify" and "Update" log for the reference.
Is there anything that I am missing here? Or is this is a bug?

Thanks.
Prerak
Attachments
Install_log.log
(417.7 KiB) Downloaded 289 times
Modify_log.log
(90.3 KiB) Downloaded 277 times
Update_log.log
(610.78 KiB) Downloaded 292 times
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: StartService called twice

Hello Prerak,
In the logs, I can see the above steps happening but the weird thing is, the actions #3 and #4 are called twice. And as they are called after "AI_SecureProperty", the "StartService" fails with invalid password (obviously, as the password is encrypted now).
In what regards this, please ignore it. This is how Windows Installer logs the standard action.

In what regards your issue, unfortunately I can not say why this happens. In only for me to further investigate this, could you please forward me the following:

- a download link for the older version of your setup

- a download link for the newer version of your setup

- the .AIP file used to build the older version

- the .AIP file used to build the newer version

- a test case which I can use in order to replicate the behavior

by e-mail at support at advancedinstaller dot com?

Looking forward to hearing from you.

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

Return to “Common Problems”