Visual Installer: Does SETPERM change folder permissions also for sub folders?

With the SETPERM script command in Visual Installer’s script language you can change permissions for a folder on the user’s hard disk during an installation. But what happen with the sub folders? Are the folder permissions inherited?

Yes. They are normally. But if you really want to be sure that all sub folders have the same permission settings as the main folder, you can set the permissions for them separately. For example like this:

SETPERM %DESTDIR\Documents, PERM_ALL
SETPERM %DESTDIR\Documents\Text, PERM_ALL
SETPERM %DESTDIR\Documents\Word, PERM_ALL

With this method you can also give a sub folder another folder permissions than the main folders. For example like:

SETPERM %DESTDIR\Documents, PERM_ALL
SETPERM %DESTDIR\Documents\Pdf, PERM_READ

See also
> How to give a standard user write permission to a folder in Program Files
> Visual Installer’s Scripting Language

Leave a Reply