【问题标题】:Modify selected directory access permission in Inno Setup在 Inno Setup 中修改选定的目录访问权限
【发布时间】:2020-11-07 15:27:35
【问题描述】:

在我的项目中,我有一个TInputDirWizardPage,用户可以在其中选择一个目录进行数据库备份。所以它可以是任何驱动器。我需要在这个目录的用户列表中添加NETWORK SERVICE账号并修改。

是否可以在[Dir] 部分进行设置?如果没有,我该如何实现?

【问题讨论】:

    标签: inno-setup file-permissions acl pascalscript network-service


    【解决方案1】:

    是的,[Dirs] section 可以为“networkservice”设置权限:

    [Dirs]
    Name: {code:GetDir}; Permissions: networkservice-readexec
    
    [Code]
    var 
      InputDirPage: TInputDirWizardPage;
    
    function GetDir(Param: string): string;
    begin
      Result := InputDirPage.Values[0];
    end;
    

    【讨论】:

      猜你喜欢
      • 2021-02-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多