Inno设置 - 允许数据库修改

时间:2018-04-28 12:44:19

标签: inno-setup

我的应用程序包含db,用户可以通过GUI将数据添加到db。所以我需要授权用户修改db。我尝试了post中的所有选项,但仍然不允许授权。 在这里,这是我尝试实现的内容的说明(在"允许"列中选中了修改权限):

enter image description here

这是我目前的代码:

#define MyAppName "aaa"
#define MyAppVersion "1.0"
#define MyAppExeName "aaa.exe"

[Setup]
AppId={{...-...-...-...-...}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
OutputDir=C:\...\output
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Dirs]
Name: "{app}\Logs"; Permissions: everyone-modify

[Files]
Source: "C:\...\aaa.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\...\list_files\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Permissions: everyone-modify
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

如何通过设置的创建过程向用户提供数据库访问权限?谢谢

1 个答案:

答案 0 :(得分:0)

[Files]
Source: "C:\...\aaa.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\...\folder_files\*"; DestDir: "{localappdata}\name_application\folder_files\"; Flags: ignoreversion recursesubdirs createallsubdirs