How to change executable file rights using Inno Setup?

后端 未结 2 657
终归单人心
终归单人心 2020-12-11 11:00

I have created a very simple inno script through a wizard in InnoIDE. However the deployed executable file can be run by normal user. How can I enforce that the user has to

相关标签:
2条回答
  • 2020-12-11 11:31

    easier way To make your application ask for admin permissions:

    add this value in registry key for your executable file:

    [Registry]
    Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\{#MyAppExeName}"; ValueData: "RUNASADMIN"; Flags: uninsdeletevalue
    

    i prefer usually using above code.

    0 讨论(0)
  • 2020-12-11 11:47

    You can't use Inno to change the permissions or manifest of your application.

    To make your application ask for admin permissions, you will need to add the appropriate manifest to it. This is different for each different programming language but many related questions have already been asked and answered.

    0 讨论(0)
提交回复
热议问题