gpt4 book ai didi

Windows UAC 不弹出(拒绝访问)

转载 作者:可可西里 更新时间:2023-11-01 10:29:37 27 4
gpt4 key购买 nike

我使用 izpack 制作了一个安装程序,它被打包为一个可执行的 jar 文件。

通常,当我双击 jar/installer 文件时,会弹出 Windows 7 UAC 框,我在安装应用程序时授予临时管理员权限(我的 UAC 级别是第二低的)。

但由于某种原因,当我双击 jar 文件时,此框不再弹出。因此,当安装程序尝试安装 Windows 服务时,我收到错误“拒绝访问”(在此过程中,注册数据库中设置了一些 key )。

关于如何让 Windows 将 jar 文件识别为安装程序并像以前一样弹出 UAC 框的任何想法?

如果我在管理员模式下打开 cmd 并 cd 到 jar 文件并从那里运行它,它工作正常。但让它以另一种方式(正确的方式)工作可能会很好。

最佳答案

Izpack/izpack2exe 将 prompt for UAC privilege elevation如果你add the element <run-privileged/> to the <info> section of the config file .

或者,if you name the installation executable to include "setup.exe" or "install.exe", Vista and Win7 should automagically prompt for UAC privs . (但这并非万无一失,因为最终用户可能会下载您的应用程序并更改名称,或者如果您使用 JAR 分发...)

关于Windows UAC 不弹出(拒绝访问),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3877156/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com