2

How can I use the special character: á in Inno Setup?

For example:

Without special character at Parameters:

Filename: "{sys}\icacls.exe"; Parameters: """{app}\IRs\IRS.FDB"" /grant Todos:F /inheritance:d"; Flags: runhidden shellexec

But, when there is a special character the command doesn't work as below:

Filename: "{sys}\icacls.exe"; Parameters: """{app}\IRs\IRS.FDB"" /grant Usuários:F /inheritance:d"; Flags: runhidden shellexec
Mark
  • 3,609
  • 1
  • 22
  • 33
pedro.olimpio
  • 1,478
  • 2
  • 22
  • 43
  • What do you mean by "doesn't work"? Do you get an error, it doesn't do what you expect it to do, ...? – Luis Mar 13 '14 at 19:31
  • I don't get an error. The script above is to set permission in one archive of Windows Explorer (Set full permission to "Usuários" group). But the script doesn't set the permission because there this char. Did you understand? – pedro.olimpio Mar 13 '14 at 19:41
  • No, I didn't understand which is why I thought more precise information would be required. You have an encoding problem and the way it manifests itself can suggest solutions or workarounds. – Luis Mar 13 '14 at 21:20
  • I already solved my problem. Thanks. See the answer below. – pedro.olimpio Mar 13 '14 at 21:27

1 Answers1

3

I workaround the issue by using the group SID:

Filename: "{sys}\icacls.exe"; Parameters: """{app}\IRs\IRS.FDB"" /grant *S-1-5-32-545:(F) /inheritance:d"; Flags: runhidden shellexec
TLama
  • 75,147
  • 17
  • 214
  • 392
pedro.olimpio
  • 1,478
  • 2
  • 22
  • 43
  • Yes. This seems to be a much better choice because what would be the benefit of granting access rights to a hardcoded personality like `Usuários` ? Me and many people don't have such group in the system. – TLama Mar 14 '14 at 09:52
  • Yes. The SID is universal and works fine to all languages (Usuários / Users ... etc.) – pedro.olimpio Mar 14 '14 at 15:59