As the documentation says, the IsAdminInstallMode
returns True if Setup is running in administrative install mode. Where the administrative install mode means:
- The
{group}
folder is created in the All Users profile.
- The "auto" form of the directory and Shell Folder constants is mapped to the "common" form.
- The HKA, uninstall info, and font install root keys will be HKEY_LOCAL_MACHINE.
Whether administrator install mode is used depends on the PrivilegesRequired
directive. You basically use the directory to declare, if the installer needs the privileged.
While the IsAdmin
(aka IsAdminLoggedOn
) is true, if the installer has been executed with administrator privileges. So that's something the user controls, not the installer.
IsAdminLoggedOn |
IsAdminInstallMode |
Meaning |
---|
True |
True |
The installer was executed with administrator privileges, and uses them to install the application for all users. |
True |
False |
The installer was executed with administrator privileges, but does not need them and will still install the application for the current user only. |
False |
False |
The installer was not executed with administrator privileges, and does not need them as it will install the application for the current user only. |
False |
True |
Not possible. |
The IsAdmin
is an equivalent of IsAdminLoggedOn
. But usually, you actually want IsAdminInstallMode
, not IsAdminLoggedOn
. That's why the function was renamed and split into these two. It depends on what you test for.