search cancel

How can I set permissions on folders?


Article ID: 179550


Updated On:


Symantec Products




How do I add NTFS security permissions to folders installed by my .MSI installation? 


During an installation, you may need to give additional file, folder, or registry access rights to a user in order for the application to function properly. The LockPermissions table in Windows Installer lets you set specific security permissions for your installation. By using the tips provided in this article, you can define security settings for files, folders and registry keys with ease.

By configuring the permissions for files, folders or registry keys, you are actually replacing the computer's or user's current permission settings. If you need to add to the current security permissions for files, folders, or registry keys, you must specify the current information as well as the permission changes.

Setting Folder Permissions:

  1. Open Wise for Windows Installer, Wise for Visual Studio .NET, or Windows Installer Editor in Wise Package Studio.
  2. In Setup Editor, click the Features tab.
  3. In the left pane, right-click the feature to which you want to set permission.
  4. From the right-click menu, select New > Create Folder. The Create Folder Details dialog appears.
  5. Select the directory in which you want to create the new folder from the Directory drop-down list. To enter a new directory, type a backslash (\) at the end of the existing path followed by the new folder name.
  6. On the Permissions tab click the Add button. The Lock Permissions Details dialog appears.
  7. Enter the following information in the fields on the Lock Permissions Details dialog:
    • Domain: Enter the appropriate domain. To specify the domain for a local computer user, enter [ComputerName], or to specify the current user's domain, enter [%USERDOMAIN].
    • User: Enter the appropriate user. You can specify a group name (such as Users or Everyone, or a specific username. To specify the current user's ID, enter [LogonUser].
  8. Click OK to save your changes.

Similar to the registry keys, you cannot control the order folders create during installation. Because Windows Installer cannot ensure that a parent folder installs first, you cannot count on a child folder inheriting the security permissions of the parent. To avoid folder access issues, be sure to give every folder in a section explicit security permissions when setting permissions for that folder segment.

Using the above information, you can add and modify any permissions that Windows Installer allows you to define. By setting security permissions, you can make certain that your installed application runs effectively and properly.