yanzickp
Posts: 4
Joined: Wed Mar 18, 2015 4:02 pm

Log On As A Service not being set

Hello,

I have the trial version of AI and am seeing if it will work for us. Thus far, it seems to be working well, other than some bugs here and there.

The final issue that I can't seem to get past however is that the installer installs some services. I have "Log on as a service" selected for both services, and have custom commands to start the services at the end of setup. The services don't start, says the account doesn't have permission basically.

If I look, it never set the account to log on as a service. The account is a domain account (for example, testdomain\administrator) and if I manually add that account to the local policy, the services start up fine. So it seems it is something that AI is or isn't doing to set the permissions of that user on the installed system appropriately.

Here is what the install log has:

CustomAction STARTCORE returned actual error code 1069 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (c) (04:70) [13:03:38:913]: Note: 1: 1722 2: STARTCORE 3: C:\Users\ADMINI~1\AppData\Local\Temp\2\MSI3E79.tmp 4: /RunAsAdmin SC start VCore
Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action STARTCORE, location: C:\Users\ADMINI~1\AppData\Local\Temp\2\MSI3E79.tmp, command: /RunAsAdmin SC start VCore
MSI (c) (04:70) [13:05:00:051]: Product: ICE Connection Broker -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action STARTCORE, location: C:\Users\ADMINI~1\AppData\Local\Temp\2\MSI3E79.tmp, command: /RunAsAdmin SC start VCore

Action ended 13:05:00: STARTCORE. Return value 3.
MSI (c) (04:70) [13:05:00:051]: Doing action: FatalError
Action 13:05:00: FatalError.
Action start 13:05:00: FatalError.

I also find this above that:

Action ended 12:53:03: CostFinalize. Return value 1.
MSI (s) (C4:E0) [12:53:03:818]: Doing action: AI_ResolveLogOnAsService
Action 12:53:03: AI_ResolveLogOnAsService.
Action start 12:53:03: AI_ResolveLogOnAsService.
MSI (s) (C4:74) [12:53:03:818]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI902B.tmp, Entrypoint: ResolveServiceProperties
MSI (s) (C4!0C) [12:53:03:818]: PROPERTY CHANGE: Modifying AI_LOGON_AS_SERVICE_ACCOUNTS property. Its current value is '[USER_NAME]'. Its new value: 'testdomain\administrator'.
Action ended 12:53:03: AI_ResolveLogOnAsService. Return value 1.

So it seems to be getting the account name to do its thing.

I also find the property for setting log on as a service (AI_SetLogOnAsService) seems to be set correctly. Finally, I also find this:

MSI (s) (C4:E0) [12:53:56:611]: Executing op: ActionStart(Name=AI_SetLogOnAsService,,)
Action 12:53:56: AI_SetLogOnAsService.
MSI (s) (C4:E0) [12:53:56:626]: Executing op: CustomActionSchedule(Action=AI_SetLogOnAsService,ActionType=3073,Source=BinaryData,Target=LogOnAsAService,CustomActionData=testdomain\administrator)
MSI (s) (C4:EC) [12:53:56:626]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI5E71.tmp, Entrypoint: LogOnAsAService
MSI (s) (C4:E0) [12:53:56:689]: Executing op: ActionStart(Name=WriteRegistryValues,Description=Writing system registry values,Template=Key: [1], Name: [2], Value: [3])
Action 12:53:56: WriteRegistryValues. Writing system registry values

Any help or insight on what I need to do would be much appreciated! Thanks!
Bogdan
Posts: 2791
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Log On As A Service not being set

Hi,

Maybe the custom action we built to set the log on as a service policy is failing silently. Have you tried this package on another
test machine to see if it behaves the same way?

Another option to set the policy for your user account is with a custom action, as in the following thread:
http://www.advancedinstaller.com/forums ... f=2&t=8562

Can you try that and see if this works for you?

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
yanzickp
Posts: 4
Joined: Wed Mar 18, 2015 4:02 pm

Re: Log On As A Service not being set

Hello,

I have indeed tried the installer on a different machine, received the same error. Both belonged to the same domain, and the nature of the software requires a domain account so I have not tried a local account. Maybe that is making the difference?

Thanks for the link, I will give that a shot. That was the route I was going to go initially, but I saw the log on as a service option, so wanted to use that since it seemed a lot cleaner. I will give that a shot.

Thanks
Paul
yanzickp
Posts: 4
Joined: Wed Mar 18, 2015 4:02 pm

Re: Log On As A Service not being set

Hello,

I am giving this a shot today, although it seems ntrights is working via command line so it should do the trick. Running into another problem though, putting in another post for that...

Thanks
Paul
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Log On As A Service not being set

Hello Paul,

This is just a heads up.

We tested the scenario and this seems to be an issue with our Log On As A Service support. We apologize for the inconvenience. It seems the domain accounts are added as local accounts under this policy and not as roaming profiles as they are. This is an Advanced Installer issue. A fix will be available in a future version of Advanced Installer, thank you for bringing it to our attention.

We will notify you when a fix will be out. Until then, as a workaround, you should indeed try to use your own custom action to set this policy.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Log On As A Service not being set

Hello,

This was fixed in version 14.4 of Advanced Installer released on October 26st, 2017.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shellm
Posts: 13
Joined: Thu Sep 28, 2017 2:04 pm
Contact: Website

Re: Log On As A Service not being set

Thank you guys, after reading this it sounded like a problem which would have happened 80% of the time for me, but with this fix I'm fine again :)
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Log On As A Service not being set

You're always welcome.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
schwarzsurfer
Posts: 49
Joined: Wed Feb 10, 2016 11:06 am

Re: Log On As A Service not being set

Dan wrote:Hello,

This was fixed in version 14.4 of Advanced Installer released on October 26st, 2017.

Best regards,
Dan
Well, that's funny. It worked for me all the time in the last months, but now it doesn't anymore. The "Log on as a service" right is not set anymore. The option is checked in the project, the custom action is executed, but the right to log on as a service will not be set.

Greetings
Marian
Attachments
3.PNG
3.PNG (21.69 KiB) Viewed 11211 times
1.png
1.png (52.95 KiB) Viewed 11211 times
Ich weiß, dass ich nichts weiß!
shellm
Posts: 13
Joined: Thu Sep 28, 2017 2:04 pm
Contact: Website

Re: Log On As A Service not being set

I can confirm that. In the current 14.4.1 the logon as a Service right is not being set for the user automatically, therefore the installation fails.

Had the same problem and worked around it by telling my colleagues they have to manually change the logon and start the service.
Not a nice workaround tho.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Log On As A Service not being set

Hello,

Thank you for bringing this to our attention. Indeed, this seems to be an issue in our application starting with version 14.4 of Advanced Installer. We will try to include a fix for this in the future. As soon as a fix will be out we will update this thread.

Until then, as a workaround you can set the "Username" field like this:

Code: Select all

[ComputerName]\<local user account>
All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Log On As A Service not being set

Hello,

This was fixed in version 14.6 of Advanced Installer released on February 19th, 2018.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shellm
Posts: 13
Joined: Thu Sep 28, 2017 2:04 pm
Contact: Website

Re: Log On As A Service not being set

Thank you for the information, I will test it out soon.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Log On As A Service not being set

You are always welcome. Just let us know if there is something not working as expected.

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

Return to “Building Installers”