private void AddManifestFileSecurity(string installPath, string addAccountName) { string filename = Path.Combine(installPath, DeployManifestFile); if (File.Exists(filename)) { try { FileHandler.AddFileSecurity(filename, addAccountName, System.Security.AccessControl.FileSystemRights.ReadAndExecute, System.Security.AccessControl.AccessControlType.Allow); } catch (Exception ex) { throw new Exception(string.Format("Couldn't add the account \"{0}\" to the ACL of the file {1}.", addAccountName, DeployManifestFile), ex); } } }