- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
Windows 7 使用自动机制来检测应用程序是否需要提升的管理员权限。或者应用程序本身有一个 list 。
有没有办法以编程方式查明指定的应用程序是否需要提升管理员权限?我不想启动它来找出它。
谢谢 ;).
最佳答案
实际上只有一种方法可以告诉 Windows 某个程序需要升级,那就是通过 list 文件。 list 文件可以嵌入程序集 (exe/dll) 中,也可以存在于名为 <YOUR_APP>.exe.manifest
的单独文件中。 .这确实是您可以安全检查的唯一方法,也可能是唯一的方法。正式。
Windows 还包含一个用于应用程序兼容性的巨型数据库。如果 Microsoft 测试了某个应用程序并发现它在操作系统升级时崩溃,他们有时会在数据库中创建一个条目以从根本上破解该应用程序。有时他们对当前操作系统版本撒谎,有时他们自动以管理员身份运行,有时他们做一些其他事情。您可以使用 Application Compatibility Toolkit 查看数据库.不知道官方有没有代码查询数据库的方法。 This blog post谈论博主制作但显然从未发布的工具。
最后一个自动提升机制是尝试确定该应用程序是否为安装程序的算法。 According to MSDN检查这些属性:
- Filename includes keywords like "install," "setup," "update," etc.
- Keywords in the following Versioning Resource fields: Vendor, Company Name, Product Name, File Description, Original Filename, Internal Name, and Export Name.
- Keywords in the side-by-side manifest embedded in the executable.
- Keywords in specific StringTable entries linked in the executable.
- Key attributes in the RC data linked in the executable.
- Targeted sequences of bytes within the executable.
The keywords and sequences of bytes were derived from common characteristics observed from various installer technologies.
最后,应用程序可以作为普通用户运行,但 spawn a child process that requires elevated privileges .我不知道是否真的有任何方法可以实际检测到反编译应用程序本身的不足。
关于c# - 查明应用程序是否需要管理员权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7696845/
我想做的是弄清楚如何查看 for 循环中的数据是否满足特定条件。我想使用 if 语句来执行此操作(除非有更好的方法),但我遇到的麻烦是数据位于 for 循环内,并且代码不希望我使用该循环之外的值环形。
我想知道 GL_TEXTURE_2D 在着色器中是否处于事件状态。 我将颜色绑定(bind)到着色器以及事件纹理(如果设置了 GL_TEXTURE_2D)并且需要将这两者结合起来。 因此,如果绑定(b
我正在使用 Google map ,并试图找出一个点是否位于其他两个点之间。到目前为止我所做的方法是制作两个向量。一个在两个“检查”点之间,一个在“检查”点之一与"new"点之间。计算出向量后,我对它
我正在制作一款游戏,您将鼠标悬停在目标上单击(射击)。我想知道如何确定 BufferedImage 是否被点击。 我有这样的代码: import javax.swing.*; import java.
我正在用Java开发一个程序,它使用processbuilder来启动另一个java程序,到目前为止,让另一个程序运行没有问题,但是我需要查明另一个程序是否干净地退出或抛出异常(具体来说)我正在寻找
我通常会检查 if obj.pk 以了解对象是否已保存。但是,如果您在某些字段上设置了 primary_key = True,这将不起作用。例如,我在 UserProfile 上设置了 user =
我正在使用 geyser 的混合 Android 应用程序。我想告知用户,如果他进入我网站的移动版本,就可以下载此应用程序。问题是,应用程序中运行的浏览器可以查看与移动网站几乎相同的内容。 如果我在应
我们正在尝试用某种优惠券作为奖励,只要在设备上完成新安装,就可以在实体店兑换。我们对此做了一些试验,并验证它是一个基于 IMEI 和 IMSI 的新设备。但我们发现人们在一些模拟器上这样做,这些 ID
我试图弄清楚如何查看 MotionEvent 何时完成某个事件(即,用户按下屏幕,四处拖动,然后将手指从屏幕上移开)。在文档中,我只看到 getEventTime 在事件开始时生成,但没有提及如何确定
我需要最快的方法来查看 IP 地址是否可达。在每个 IP 地址上都有一个服务器在特定端口上监听,所以如果您的方法是要查找服务器是否在端口上监听,请告诉我。 这样做的原因是假设我有 10 个 ip 地址
我有很多代码可以做这样的事情 bool GetIsUnique(IEnumerable values) { return values.Count() == values.Distinct()
在 Java 中,当由于缺少空间而无法显示 JLabel 的文本时,文本将被截断并在末尾添加“...”。 我怎样才能轻松找出当前 JLabel 显示的是全文还是截断的文本? 编辑: 我看到有一种方法可
是否可以编写类型特征,例如 is_callable它告诉对象是否有 operator()定义?如果事先知道调用运算符的参数很容易,但不是在一般情况下。当且仅当至少定义了一个重载调用运算符时,我希望特征
我有一个包含一些 HTML 代码的字符串。我想知道 HTML 代码是否代表可见文本或图像。我使用 Java 使用以下正则表达式来解决这个问题(我知道你无法使用 RegExps 解析 HTML,但我认为
如果 3D 空间中的三角形(由其顶点和法线指定)从 3D 空间中的给定点可见(由其 x、y 和 z co 指定),我想编写一个返回“True”的函数rds) 鉴于空间中的其他三角形可能充当“障碍物”,
我有一个从数据库中获取的 Item 的 List。 我做了类似的事情: List list; list.stream() .filter( i -> i.condition() ) .
如果是下面的方法 template void report(std::ostream&str, Args&&... args) { (str void report(std::ostream
我正在构建一个动态古腾堡 block ,需要根据事件插件进行不同的渲染。我知道有PHP函数is_plugin_active 。是否有等效的或“解决方法”可以从 JavaScript 中找到它?或者我需
我构建了一个使用表单例份验证的 ASP.NET 应用程序。在我们的托管帐户控制面板中,我设置了一项自动化任务,每周请求一次网页。页面加载时,会发送出许多电子邮件。 我只是想知道是否有任何方法可以在代码
我有一个自定义的 JDialog,是为了解决一些本地问题(RTL 等)到目前为止,它只有一个“确定”选项,我现在必须修改它才能有一个取消按钮。我就是这么做的。现在唯一的问题是我不知道如何从中获取输入,
我是一名优秀的程序员,十分优秀!