sony
Posts: 134
Joined: Wed Apr 07, 2010 9:55 am

Service Credentials

Hi Support,

Here is my requirement.

I want the Installer to pop up for user id/password for installing the services. Where the services will run on the target machine with the given credentials. I have found that this can be done by setting the property name in the Username and Password fields in the Services Page. am I right?

Now , I want the Installer to provide a feature to allow the user to use the same credentials for all the services (This feature should be enabled with a check box so that if the check box is checked then installer should use the same credentials for all the services else installer should pop up for user id and password for all the services). Can we acquire this through Advanced installer?

I look forward to hear back from you.

Regards
Sony
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Service Credentials

Hi Sony,
I want the Installer to pop up for user id/password for installing the services. Where the services will run on the target machine with the given credentials. I have found that this can be done by setting the property name in the Username and Password fields in the Services Page. am I right?
Not exactly. A service will run only under the specified user account, it cannot run for the entire machine with custom credentials. A service always uses the credentials of the user account on which it was installed.

To get the username and password you can try using the LogonInformationDlg predefined dialog and a Check If User Exists custom action. After that you can try using the approach from our Install a service for a custom user how-to to install your service for a specific user account. By default a service is installed under the local system account so it can be accessed by all users.
I want the Installer to provide a feature to allow the user to use the same credentials for all the services
The approach I mentioned above uses installer properties for username and password. Simply use these properties for all services you want to install under a custom user account.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sony
Posts: 134
Joined: Wed Apr 07, 2010 9:55 am

Re: Service Credentials

Hi Cosmin,

I am unable to implement your suggestions. Could you please elaborate the steps. Its very confusing.... It would be very helpful if you could provide the sample project for my requirement.

Thanks!
Sony
sony
Posts: 134
Joined: Wed Apr 07, 2010 9:55 am

Re: Service Credentials

Hi Cosmin,

I have tried implementing the steps given in the "Install a service for a custom user" article. I am getting an error privilege error during run time. I have attached the verbose log for your convenience.

Regards
Sony
Attachments
lsample.log
(862.94 KiB) Downloaded 442 times
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Service Credentials

Hi Sony,
Could you please elaborate the steps.
Can you please give me more details about the problem you are encountering? Which steps do you need explained? The articles I linked in my previous post explain how to use the LogonInformationDlg dialog, the check if user exists custom action and how to install a service for a custom user.
I have tried implementing the steps given in the "Install a service for a custom user" article. I am getting an error privilege error during run time.
Can you please send us the .AIP (project) file you are using to support at advancedinstaller dot com so we can investigate it?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sony
Posts: 134
Joined: Wed Apr 07, 2010 9:55 am

Re: Service Credentials

Hi Cosmin,

I have attached the sample project.

Regards
Sony
Attachments
Sample-SetupFiles.zip
(464.19 KiB) Downloaded 452 times
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Service Credentials

Hi Sony,

I'm not sure why this happens. Can you please try running the "ntrights.exe" custom action as "Deferred with no impersonation"? Also, can you install the service when modifying the policy manually?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sony
Posts: 134
Joined: Wed Apr 07, 2010 9:55 am

Re: Service Credentials

Hi Cosmin,

Tried running the "ntrights.exe" custom action as "Deferred with no impersonation" option. But no luck :(

"Also, can you install the service when modifying the policy manually?"


What do you mean by the above statement? I am able to install the service in local system account as well as in the network service account but not in the existing user account.

I look forward to hear back from you soon.

Regards
Sony
sony
Posts: 134
Joined: Wed Apr 07, 2010 9:55 am

Re: Service Credentials

Hi Cosmin,

I am able to install the service in a user account successfully. :D

I have given a wrong user name, so I was unable to install the service. I need your suggestions for the second requirement which I mentioned in my previous mail.

Scenario:
I have "Logon Information" dialog and am setting the user name and password for the service during installation. I also have a checkbox "Install all the services with same credentials" in the same dialog, when the checkbox is checked, same credentials should be set for the rest of the services otherwise another dialog should popup asking for the service credentials.

How can I do this?

Regards
Sony
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Service Credentials

Hi Sony,

Our user guide contains the Display a MSI dialog conditionally how-to which explains an approach for showing a custom dialog based on a checkbox. For the other services you can use different installer properties, for example USER_NAME_OTHER and USER_PASSWORD_OTHER. These properties can be set on your custom dialog which asks for the other service credentials.

When the checkbox is checked you can set them to the original properties (USER_NAME and USER_PASSWORD) by using SetProperty control events. For example, if your checkbox has the property CHECK, you can add these control events on the "Next" button of LogonInformationDlg:

Code: Select all

[USER_NAME_OTHER]        [USER_NAME]       CHECK
[USER_PASSWORD_OTHER]    [USER_PASSWORD]   CHECK
This way the properties are set by LogonInformationDlg through control events or by your custom dialog through custom edit boxes.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sony
Posts: 134
Joined: Wed Apr 07, 2010 9:55 am

Re: Service Credentials

Hi Cosmin,

Thanks alot for your suggestions.

Regards
Sony
sony
Posts: 134
Joined: Wed Apr 07, 2010 9:55 am

Re: Service Credentials

Hi Cosmin,

I have another question.

Can we display a message without "OK" button during the installation using the advanced installer. Please refer to the attachment(2ndscreen.jpg) for reference.

Regards
Sony
Attachments
2ndScreen.JPG
2ndScreen.JPG (85.44 KiB) Viewed 19425 times
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Service Credentials

Hi Sony,

I am afraid this feature is not supported by Advanced Installer. I have added an improvement on our todo list to support this behavior.
In the meantime you can use Windows Installer's own approach to this issue: use an Action Text. Select a cutom action and press the "Action Text" button on the right pane.
The action text will be displayed to the right of the "Status:" field on the ProgressDlg dialog.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
sony
Posts: 134
Joined: Wed Apr 07, 2010 9:55 am

Re: Service Credentials

Hi Gabriel,

Thank you for the suggestion.

Regards
Sony
AnneTheAgile
Posts: 61
Joined: Wed Jun 08, 2011 9:53 pm

Progress Status Indicator?

hi! Is the Progress Status Indicator ability now available in AIP? Thank you again for so many updates.

Return to “Common Problems”