It is possible to allow users other than administrators to create symlinks, via modifying the corresponding group policy.
So let's offer this as an option on the "advanced option" page, and for extra goodness, let's use InnoSetup's ExecAsOriginalUser() function to test whether the calling user account is permitted to create symbolic links.
We may need to be careful to handle the case where the installer is run from an elevated account to begin with, in which case the test would be meaningless. We should detect that situation and fall back to the previously chosen setting, defaulting to "false".
Granted, the group policy could be changed later, or other users who lack the permission may run into trouble, but we do need to trust people who run the installer to know what they are doing.
It is possible to allow users other than administrators to create symlinks, via modifying the corresponding group policy.
So let's offer this as an option on the "advanced option" page, and for extra goodness, let's use InnoSetup's
ExecAsOriginalUser()function to test whether the calling user account is permitted to create symbolic links.We may need to be careful to handle the case where the installer is run from an elevated account to begin with, in which case the test would be meaningless. We should detect that situation and fall back to the previously chosen setting, defaulting to "false".
Granted, the group policy could be changed later, or other users who lack the permission may run into trouble, but we do need to trust people who run the installer to know what they are doing.