hajo68
Posts: 6
Joined: Wed Mar 02, 2016 4:42 pm

Make a scheduled task to run as Builtin users

Hi,

I'm trying to build a msi that creates a sheduled task that will run as BUILTIN\Users. I have tried many solutions but it will most of the time run as SYSTEM. Please help me!

Best,
John
Nicolae
Posts: 6
Joined: Fri Jul 25, 2014 8:39 am

Re: Make a scheduled task to run as Builtin users

Hi,

Can you please try with the latest Advanced Installer (13.6) version? Some improvements were made to the scheduled tasks to support user groups.

To configure a scheduled task with the BUILTIN\Users logon trigger just use the group name Users, also please be aware of localization issues on non English computers where the Users group may have a different name. To avoid this kind of issues you can use the group SID. E.g The SID for built-in Users group is S-1-5-32-545.

Thank you,
Nicolae
hajo68
Posts: 6
Joined: Wed Mar 02, 2016 4:42 pm

Re: Make a scheduled task to run as Builtin users

Hi Nicolae,

I updated Advanced Installer to 13.6 and build a new msi with one scheduled task. On the Account tab I choose Property based user and type [S-1-5-32-545] into the User box. I have also tried with [Users]. In both cases the tasks ends up with running as SYSTEM.

Regards,

John
Nicolae
Posts: 6
Joined: Fri Jul 25, 2014 8:39 am

Re: Make a scheduled task to run as Builtin users

Hi John,

I forget to mention that your scheduled task should be configured for Windows Vista, Windows 7 or above and I apologies for that. Unfortunately Tasks Version 1(XP configured for) doesn't still support user groups. You can configure the task for Vista or above as in the attached screenshot.
ScheduledTaskGroupSupport.PNG
ScheduledTaskGroupSupport.PNG (15.47 KiB) Viewed 12265 times
Also, if you still need to support XP you need to create two separate scheduled tasks conditioning each one based on the installing operating system.

Can you confirm please if this is the case for you?

Thank you,
Nicolae
hajo68
Posts: 6
Joined: Wed Mar 02, 2016 4:42 pm

Re: Make a scheduled task to run as Builtin users

Hi Nicolae,

I missed the Configured for: bit, but I have corrected that now. Now it says Windows Vista, Windows 7 or above. I'm doing this msi for Windows 10. I build the package again and tried it but the task is still running as SYSTEM. I attache my test aip file for you. Maybe you can see what I have done wrong?

Regards,

John
Attachments
Schedule task test.aip
(16.1 KiB) Downloaded 647 times
Nicolae
Posts: 6
Joined: Fri Jul 25, 2014 8:39 am

Re: Make a scheduled task to run as Builtin users

Hi John,

I looked up over your test AIP file, and noticed that you are using [S-1-5-32-545] instead of just S-1-5-32-545, I apologize that didn't notice this from your previous reply. The option "Property based user" from Account tab has the meaning of a formatted field where you can use plain text or Windows Installer properties to represent the user for the logon trigger. The [S-1-5-32-545] is treated as a windows installer property and resolves to an empty value but the empty value in context of the logon trigger from the scheduled tasks means the SYSTEM account.

Can you retry please with just S-1-5-32-545 or Users (without square braces), and tell me if this resolves your issue?

P.s I noted your feedback and we will review the text label for the "Property based user" radio button.

Thank you,
Nicolae

Return to “Building Installers”