I'm using Inno Setup to install documents/files rather than an application, and this is primarily for Windows 7 users. As such my DestDir
is based on {userdocs}
so that all files will be installed in a folder below that user's Documents library.
The problem arises when I use the same installer to install a TTF font. This requires elevated privileges (admin
or superuser
). The problem I'm seeing is that if a non-admin user runs the install, they are correctly prompted via UAC for the admin/superuser password...but at that point the DestDir
for the installation changes to the Admin documents folder rather than the user's documents folder. Is there any way to work around this or prevent this from happening?
Example, non-Admin account Fre
has a documents path of:
C:UsersFredMy Documents
And if I do not include the TTF font as part of the installation, this is what the installer will use as the base path for the installation {userdocs}
and it works perfectly.
If I DO include the TTF font as part of the installation with same non-Admin user Fred, by the time the install is done {userdocs}
has become
C:UsersAdminUserMy Documents
...which is not the intended result...just need Admin privileges for the font installation piece and need the files installed into the actual user's documents area.
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…