问题描述
在我的项目中,我有一个TInputDirWizardPage
,用户可以在其中选择用于数据库备份的目录。因此它可以是任何驱动器。我需要将NETWORK SERVICE
帐户添加到此目录的用户列表中并进行修改。
是否可以在[Dir]
部分中进行设置?如果没有,我该如何实施?
解决方法
是的,[Dirs]
section可以设置“网络服务”的权限:
[Dirs]
Name: {code:GetDir}; Permissions: networkservice-readexec
[Code]
var
InputDirPage: TInputDirWizardPage;
function GetDir(Param: string): string;
begin
Result := InputDirPage.Values[0];
end;