cvk
7th April 2004 15:57 UTC
Get directory permissions
We're currently having some trouble with users who haven't got administration privileges.
Is it possible to block the "MUI_PAGE_DIRECTORY" dialogue's "Next" button if the user hasn't got write permission on the selected folder?
Kind regards,
Chris
Yathosho
7th April 2004 16:14 UTC
i guess a combination of the Access Control Plugin and this script might work, though you might need to modify it (the script might only work for custom pages, i havn't tried).
cvk
7th April 2004 16:17 UTC
That won't work, as the installer has to run on Win9x, NT, 2k and XP :-(
Chris
Joost Verburg
7th April 2004 16:49 UTC
You can easily skip the check for Win9x.
cvk
7th April 2004 17:09 UTC
Yes, I can skip 9x, but according to the doc, the ACL plugin doesn't work on NT4 as well.
As I need to complete the code within the next 30 minutes, I just use UserInfo::GetAccountType to check for Admin privileges and set the $InstDir to something under $APPDATA if the user hasn't got admin rights. If he still insists on installing the application somewhere he hasn't got write access I simply don't care.
Thanks for your help,
Chris
krisbg
9th May 2007 14:54 UTC
Hello! I want to check if the user, who is running the setup, has permissions in the $INSTDIR, and if he doesn't have enough permissions, to warn him to choose another folder or that if he keeps installing into $INSTDIR, the permissions of that folder will be changed automatically by the setup. So I know how to change the permissions with the Access Control plugin, but I don't know how to find whether the current user has enough permissions in a given folder.
Any help?
krisbg
9th May 2007 15:00 UTC
Actually I need to know whether a given folder has full access rights for all users, not only for the current...
kichik
23rd May 2007 18:24 UTC
You can write a plug-in that uses AccessCheck to check for that. It'd probably be simpler to just add the privileges you need in any case.