问题描述
我有一个系统,使用UAC将其设置为普通系统,然后在我的delphi环境中编译名为ka.exe的项目,并为此创建一个installshield项目.
I have a system, I set it up as a normal with UAC, and in my delphi environment I compile my project named ka.exe, I create a installshield project for it.
设置完成,一切顺利!但是每当我启动程序时,它都需要提升并且我不知道为什么.
setup and everything completes ok!but whenever I start my program, it requires elevation and I don't have any clue why.
为了确保installshield不会在我身上玩游戏,我编译了一个新的.exe,然后将其手动复制到我的联网计算机上.
just to be sure installshield is not playing mindgames on me, I compiled a new .exe, and copy it manually over to my networked computer.
该图标看起来相同,并且上面还带有此UAC屏蔽.
the icon looks the same, and it also have this UAC shield on it.
我的项目内部有一些功能,可能与网络共享名称通信,而与SQL数据库通信...
my project has some functions inside that might be talking with a network shared name, and talking with a SQL database...
那为什么我的应用程序需要提升高度才能运行?
so why does my app need elevation to run ?
推荐答案
首先,如果可以使用Delphi,请使用asInvoker
添加嵌入式清单.如果不能,请制作一个外部文件并将其与exe放在同一文件夹中.如果盾牌消失了,那就太好了.
First, if you are able to with Delp add an embedded manifest with asInvoker
. If you can't, then make an external one and put it in the same folder as the exe. If the shield disappears, great.
如果没有,那么事情变得更加晦暗.有时,当您运行一个应用程序时,Windows随后会显示可能不起作用;您要使用推荐的设置重试吗?".如果您说确定,则存储了一个组策略,该组策略将在其余时间内提升该应用程序的性能.看来,如果您重命名exe,则组策略的作用会停止.您可以尝试一下.
If not, then things get murkier. Sometimes when you run an app, Windows comes along afterwards and says "that might not have worked; would you like to try again with recommended settings?". If you say ok, there is a group policy stored away that will elevate that app for the rest of time. It does appear that if you rename the exe the effect of the group policy stops. You could try that.
这篇关于新编译的应用程序需要UAC/高程吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!