Windows UAC Security With Exe

前端 未结 2 1808
春和景丽
春和景丽 2021-01-29 12:00

I have an exe created with an old Borland C++ compiler. It needs administrator privileges to function correctly. Since the app will run at startup, I do not want the user prom

2条回答
  •  耶瑟儿~
    2021-01-29 12:36

    I am writing this because although CherryDT's answer is a good approach, longer-run depending on context it may be a little inflexible.

    Another option (depending on the context) may be to refactor into two components:

    1. A system service which runs at startup and does everything that needs admin access
    2. A client program that communicates with the service and does not need admin access.

    This avoids the annoying prompt but it is more work. Based on your description it is not clear this is the right way to go here, but it may be down the road (and for others finding this ticket) so I figure it is worth mentioning separately.

提交回复
热议问题