How to change executable file rights using Inno Setup?

后端 未结 2 666
终归单人心
终归单人心 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.

提交回复
热议问题