Debug user and service creation: password different than the chosen one - Advanced Installer Community
scambias
Posts: 29
Joined: Tue Nov 19, 2019 3:26 pm

Debug user and service creation: password different than the chosen one

Hi all,

I have a setup that creates a user and install a service run by that user.
I use properties to create user (username and password are with properties) and to create the service too (the same properties plus, in this case, the domain one, which is requested).

The setup shows a logon form where (all these properties are) I added one extra textfield to re-type the password.
Actually I create a new set of properties where I copy the textfields' ones at the "next" click event: that's the set of properties I will use for user and service credentials definition.

The run does go fine for the user creation (I can double check it by a simple runas dos command) but the service credentials are not good (in fact I get a problem of logon).
I then finally set again the logon credentials of the just created service (while the message box is still there) and then hit retry and it all goes fine too.

How can I get the actual password that is provided to the ServiceInstall procedure?

Thanks a lot in advance.
Silvio
scambias
Posts: 29
Joined: Tue Nov 19, 2019 3:26 pm

Re: Debug user and service creation: password different than the chosen one

Hi all,

I got the issue solved so there's no need to debug. It was due to a property I set during the dialog phase which becomes unset during the execution.
I still miss the reason why some properties set during the dialog phase are not kept during the execution (someone may help on this?) but I changed the behavior differently using the property linked to the textfields and it works fine.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Debug user and service creation: password different than the chosen one

Hello Silvio,

I am glad everything works as expected now.

In what regards your question, please have a look over the following article:

How to access installer properties from deferred custom actions

Basically, long story short, this is the default behavior offered by Microsoft.

During the deferred stage of the installation process (when your setup modifies the target machine - e.g. installs a service, write registry entries, copy files, etc. - the properties are not available).

Hope this information is helpful.

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

Return to “Common Problems”