AdminUser Property - Advanced Installer Community
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

AdminUser Property

Hello,

I am creating an installer that is designed to run as Per-user only. However, I am also setting the Updater. On the Updater Execution I have set up a schedule task for the silent updater. However, since this is run as per-user only, the installer shows a access denied message. I decided to set the condition to "AdminUser = 1" in the schedule task. This is not being detected by the installer when running without "Right-click > Run As Administrator".

What I want is, if the user who runs the installer has administrator privileges then set the updater schedule task. Otherwise, not. How can do that?

:)
K
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: AdminUser Property

Hi,

I'm not sure why you encountered this behavior. I've tested your scenario on a Windows 7 machine and it worked as expected.

The condition seems correct, although you can use just AdminUser parameter in the Condition field for the schedule task.

On a Guest account and I wanted to create a schedule task without any parameter in the Condition field of the schedule task and I get the access denied message. Which is correct.
Then I've added the AdminUser parameter and I didn't get the related access denied message because my installation package didn't try to create my schedule task because the condition was false. Also my installation package was successfully installed.

On an Administrator account when I create the schedule task using the AdminUser parameter in the Condition field, then my schedule task was properly created.

So, can you please give us more details(maybe exemplify)?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Re: AdminUser Property

Hello,

Thanks for your help so far. What I mean is when the running installer is Per-user only and the running user is Administrator, it does not take the value to AdminUser property. Only when the installer is set to run with Per machine only with admin rights, the AdminUser property takes the value either 1 or not. If Per-user only and running as Administrator then 1 is not passed. Do I need to send my AIP file?
K
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: AdminUser Property

Hello,

Please note that the AdminUser property is 1 when the LogonUser has administrator privileges and this property is empty otherwise. Please keep in mind that this scenario is working as expected only if the UAC is off.
So, can you please make sure that the UAC is off?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Re: AdminUser Property

I see. You mean the Run as administrator in Install Parameters needs to be unchecked?

:)
K
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: AdminUser Property

Hello,

It doesn't matter if the Run as administrator option from "Install Parameters" page is enabled or disabled in order to set the AdminUser property properly.
In order to have this scenario working as expected the UAC needs to be off ( Never notify ). In order to disable the UAC you can take a look on the Turn User Account Control on or off article.

Please let us know if you have other questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Re: AdminUser Property

Thanks for your support.

:D
K
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: AdminUser Property

You're welcome.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Re: AdminUser Property

OK Thanks.

:D
K

Return to “Common Problems”