运行所需的权限:ExecNotificationQueryAsync [英] Permissions required to run: ExecNotificationQueryAsync
问题描述
我被引导到本节:https://social.microsoft.com/Forums/en-US/3095c554-7606-4164-be06-81065c8db968/vbscript-forum?forum=whatforum
I was directed to this section via: https://social.microsoft.com/Forums/en-US/3095c554-7606-4164-be06-81065c8db968/vbscript-forum?forum=whatforum
这是一个VBScript程序,无法通过任务计划程序运行非特权用户。我试图在Windows Server 2016域控制器上使用以下代码:
This is a VBScript program that is failing to run an an unprivileged user via Task Scheduler. I'm trying to get the following bit of code to work on a Windows Server 2016 Domain Controller:
Set objWMIServiceRoot = GetObject("WinMgmts:\\.\root\cimv2")
Set objSink = WScript.CreateObject("WbemScripting.SWbemSink","objSink_")
objWMIServiceRoot.ExecNotificationQueryAsync objSink, "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA 'Win32_Process'"
它失败于:
ExecNotificationQueryAsync
错误:
-2147217400
无效参数
当我以管理员身份运行任务时这很好用但我不希望程序拥有管理权限。
With the error:
-2147217400
Invalid parameter
This works fine when I run the task as an administrator but I do not want the program to have administrative rights.
有什么建议吗?
谢谢!
Any suggestions?
Thanks!
推荐答案
只告诉他们这些证据,他们对微软产品知之甚少。
The ones who tells this proof only that they know few from Microsoft products.
这是官方的Microsoft脚本论坛
This is the official Microsoft Scripting Forum
https://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG
这篇关于运行所需的权限:ExecNotificationQueryAsync的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!