问题标签 [elevated-privileges]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
inno-setup - 如何使用 Inno Setup 在文件上设置“以管理员身份运行”
我正在使用 Inno Setup 创建安装程序。作为安装过程的一部分,我正在安装 Tomcat。在 Windows 7 上,我遇到了这里描述的问题:
http://blog.paulbouwer.com/2010/10/23/the-case-of-the-annoying-tomcat-6-monitor/
我可以通过手动设置“以管理员身份运行”来修复它tomcat7w.exe
(问题和根本原因与 tomcat7 相同),但我不知道如何通过 Inno Setup 来解决。
我正在寻找解释some_program.exe
以管理员身份运行的线程,但是这里程序是在 Tomcat 服务启动时启动的(例如在机器启动时),所以我需要一种方法来使用 Inno Setup 将其标记为“以管理员身份运行”而不是实际运行它。
windows - 如何从 vbs 以管理员身份运行 vbs?
任何人都可以帮助我从自身运行 vbs 但具有管理员权限吗?我需要通过 VBScript 使用 Windows 8 重命名计算机,但只有通过管理员命令行(CMD → 以管理员身份运行 → runScript.vbs)运行我的脚本才有可能。如果我使用经典 CMD 启动脚本,则计算机不会重命名。
我的想法是我以用户权限启动脚本,不带参数,如果没有参数,脚本会以管理员权限和参数作为标识符“我是管理员”重新运行。
有谁知道我该怎么做?
编辑:
我试过这个:
c++ - 在 MacOSX 下用 C 语言启动特权应用程序
我正在为 MacOSX(使用 Qt 和 C++)编写安装程序/自动更新程序。我需要升级权限才能覆盖 app 文件夹中的旧文件。
我的升级代码基于以下示例: http: //www.michaelvobrien.com/blog/2009/07/authorizationexecutewithprivileges-a-simple-example/ 我尝试使用管理员权限重新启动我现有的应用程序,如下所示:
但是,我收到错误 -60031(无法启动工具)。问题:
a) 为什么会失败?我怀疑是因为工作文件夹设置不正确...?(我可以以某种方式设置工具的工作文件夹吗?)
编辑: 好的,想通了: args[] - 数组本身需要以 NULL 结尾。已经在上面的代码中修复了。
b) 其他互联网消息来源称,AuthorizationExecuteWithPrivileges 功能已被弃用,出于安全考虑不应使用。有人可以举例说明如何以更好的方式做到这一点吗?
ruby - Ruby: gem win32-service: Create a service with Admin privileges
I am using the win32-service
gem to create a Windows service using Ruby (1.9.3-p429, MRI).
This snippet of code works.
The problem I have is that the service needs to run with Administrator privileges, but the entity which calls this code snippet runs as the Local System Account, and that is the default privilege.
I can open up up the Services GUI (services.msc) and go in and stop the service, raise the privileges via the "Log On" tab of the service (myservice) properties, and use Administrator/adminpasswd as the user/password. It then runs the service with sufficient privileges.
However, when I try to call Service.create
with the :service_start_name
and :password
set to exactly the same values (by uncommenting the lines in the code snippet) as I used in the Services tab, it doesn't work. This server is an Amazon EC2 server running Windows 2008r2 Datacenter Edition and is not a part of any Windows domain that I know of (because I started it).
What do I need to do differently to get this Windows service running with Administrator privileges?
powershell - Powershell v2 Get-Eventlog:试图执行未经授权的操作
我正在使用 Powershell v2 这是我的脚本
代码唯一有效的情况是我传入当前服务器的 IP 地址。
我使用我的管理员凭据登录到该服务器,我什至选择了 Run-As Administrator 来运行 powershell。
为什么在使用可以 ping 并具有管理访问权限的其他 IP 地址时出现以下错误:
@Adi Inbar
远程注册表服务正在运行,并且防火墙已关闭。然而它不起作用。
当我尝试使用服务帐户运行时,它也不起作用。
但奇怪的是,当我使用服务帐户运行并输入我自己的 IP 地址时,我得到了错误,
silverlight - Silverlight 5 在浏览器中受信任的应用程序
我正在研究 Silverlight5 应用程序。我们必须从客户端 PC 中打开一个 Exe。当我们尝试使用 In Browser Trusted Application 并且它在 Localhost 中工作但我们尝试使用 IP 地址而不是 Localhost 然后再次应用程序无法打开 Exe。
我们尝试使用测试证书签署应用程序并安装在受信任的根证书颁发机构和受信任的发布者中
现在它正在使用本地主机以及 IP 地址,但在我的电脑中,但在网络电脑中不工作。
请建议我,我缺少什么或我必须做什么
c# - 在 Win7 上为使用 Visual Studio C# 2008 创建的程序显示友好的默认提升提示
当我在 Windows 7 上的 Visual Studio 2008 C# 中创建程序并将其编译为可执行文件时,我经常需要包含一个清单以使程序要求管理员权限。当我这样做并使用清单构建可执行文件时,它不会显示“友好”的海拔提示,而是显示带有警告感叹号的黄橙色提示。如果我为 Microsoft 或其他程序员完成的任何常用工具选择“以管理员身份运行”,它会向我显示一个“友好的”蓝绿色对话框,提示我该程序需要管理员权限。在我的个人程序中出现了这些黄橙色的“类似警告”对话框。如何将这个橙色对话框与看起来不错的绿蓝色对话框交换?
我是新手,所以我会很感激有关如何执行此操作的分步说明。
powershell - Powershell - 脚本由第 3 方调用,如何硬编码提升的凭据
好的,我了解创建加密凭据并将其存储在 powershell 脚本中的概念
但是,当第三方程序自动调用 powershell 脚本时,如何使用提升的凭据运行它?
下面是当我手动使用“run-as”时运行良好的代码,我让最后一个用户登录
但是,如果我不使用 Run-As 手动调用 powershell,我会收到以下错误
输出是 userId=Unknown/UserID
如何解决这个问题???
编辑:
所以我在调用 Get-WmiOjbect 时尝试包含 -Credential
现在它提示我输入密码。但是,当我运行脚本时,会出现其他错误:
powershell - Powershell - 启动 hello world 的启动进程不起作用
我试图弄清楚如何使用提升的凭据运行 powershell 脚本,并被告知最好的方法是使用 Start-Process
而这个网站,http ://social.technet.microsoft.com/Forums/windowsserver/en-US/132e170f-e3e8-4178-9454-e37bfccd39ea/startprocess-verb-runas-credential也是很好的参考
但我仍然有麻烦。
我创建了一个脚本用于测试目的,hello.ps1
它本身运行良好
然后,我创建了另一个脚本来使用提升的凭据调用 Hello World
我得到错误:
编辑
@Adi Inbar
我更新了代码如下
但是现在弹出一个 cmd 窗口并且输出为空白,而不是预期的“Hello World”
编辑
而且我读到如果包含-Credential,则必须包含-FilePath,但代码仍然无法正常工作:-(
它只是弹出cmd窗口,powershell_ise.exe GUI中没有输出