简体   繁体   中英

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

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.

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. If there is a better way someone please let me know.

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. I explain the file you want to run on each machine I send it in rar format but auto-run. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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