I am trying to run a VBS script on many PC on my network at the same time. I am admin on all of them, but the instruction needs to run under SYSTEM account. I have opted to use PsExec (v.2.11) from Systernals. The problem I am having is that I keep getting the dreaded “Access is denied” message.

Just to keep it simple in this post, my VBS script is msgbox “TEST” For debugging purposes I have added the cmd /k command and argument to see the message. Finally, I have the code in a shared folder.

PsExec \\TargetPC -s -i -h cmd /k cscript "\\SharedFolder\temp\PSTools\test.vbs"

This is what I have tried:

  • I have tried to add the following key to the registry: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] "LocalAccountTokenFilterPolicy"=dword:00000001

  • I removed the Security Update KB2893294 on the target PC, but still doesn’t work. I have even tried using the –u argument with my
    user and password, but the same.

  • I can run the command net use \\TargetPC /user:myUser fine.

  • Firewall is off.

1 Answer 1


Without starting PSEXEC with explicit username and password, it will not have network access.

You can either first copy the vbs to the remote host or use a batch file to construct the vbs at runtime on the remote host. With such a batch file you can use -f -c options with the batch file to copy and run command remotely.

  • See your point on which you mentioned that you tried it with -u and -p. Was that still with the -s? Commented Jul 22, 2015 at 14:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .