简体   繁体   English

VBscript错误代码800A0046权限被拒绝

[英]VBscript error code 800A0046 permission denied

I am currently trying to create a script that does a bit of remote scripting that triggers a simple messagebox to appear on the screen of a remote user to let a user on a domain network alert every other user that there is a threat in the building. 我目前正在尝试创建一个脚本,该脚本执行一些远程脚本操作,触发一个简单的消息框出现在远程用户的屏幕上,让域网络上的用户提醒每个其他用户该建筑物中存在威胁。 I run the script that is supposed to send the warning to every other users but I get the above mentioned error. 我运行应该向其他所有用户发送警告的脚本,但是我得到了上面提到的错误。

Line: 9 Char: 2 Error: Permission denied Code: 800A0046 行:9个字符:2错误:权限被拒绝代码:800A0046

I have tried locating the script in a public network share folder so all users can reach it and have highest permissions to reach it. 我已尝试在公共网络共享文件夹中找到该脚本,以便所有用户都可以访问它并具有最高权限来访问它。

I have tested to make sure they can read the pclist file which is just a file with the computer name of every computer in the building that needs to alert. 我已经测试过以确保他们可以读取pclist文件,该文件只是一个文件,其中包含建筑物中需要提醒的每台计算机的计算机名称。

Dim oFSO, oTSin, oController, oRemote, sComputer
Set oController = CreateObject ("WSHController")
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oTSin = oFSO.OpenTextFile("I:\Public\PCLIST.txt") 'List of PC's

Do Until oTSin.AtEndOfStream
 sComputer = oTSin.ReadLine
 'Location of script to make run below between ""
 Set oRemote = oController.CreateScript("I:\Public\VBS\Alert.vbs", sComputer)
 oRemote.Execute

WScript.Echo "Finished script on " & sComputer

Loop
oTSin.Close
WScript.Echo "Finished all computers"

As state above all I really want is just a remote messagebox and maybe a echo char 7 to play over every users computer from like a panic button script. 最重要的是,我真正想要的只是一个远程消息框,可能是一个echo char 7,可以像恐慌按钮脚本一样播放每个用户计算机。 If there is a better way someone please let me know. 如果有更好的方式有人请告诉我。

https://www.repairwin.com/fixed-permission-denied-800a0046-windows-script-host/ https://www.repairwin.com/fixed-permission-denied-800a0046-windows-script-host/

This is a typical error when you try to run a program on a remote computer. 当您尝试在远程计算机上运行程序时,这是一个典型的错误。 It is due to the permissions you have on those machines. 这是由于您在这些计算机上拥有的权限。 You must be administrator of all, even if you are fail many times. 即使您多次失败,您也必须是所有人的管理员。 What I do is to send through the Languard application a rar auto-run file to all the machines. 我所做的是通过Languard应用程序向所有机器发送一个rar自动运行文件。 I explain the file you want to run on each machine I send it in rar format but auto-run. 我解释了你想在每台机器上运行的文件,我以rar格式发送它但是自动运行。 When it arrives at that machine the autorun opens giving way to the autorun of for example yours, Alert.vbs I don't know how to send you here a file, or your Alert.vbs file in rar-exe format. 当它到达那台机器时,自动运行打开让位于例如你的自动运行,Alert.vbs我不知道如何在这里发送一个文件,或rar-exe格式的Alert.vbs文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM