Reputation: 103
I've confirmed that I can successfully run a batch file on my remote machine. However, when I try to run a vbs file remotely it says it starts on the remote server and gives it a process ID, but nothing happens. To test, I made a batch file on the remote server that runs the vbs script (same folder) and it runs successfully. When I then try to run this batch file remotely I have the same issue as when I tried to run the vbs file directly.
psexec -i 2 -d \\server cscript filepath\file.vbs
My test VBScript is just a msgbox. When I run it remotely a black box opens up and the buttons/text are not visible.
Any ideas?
Upvotes: 0
Views: 738
Reputation: 362
I believe you need to set the working directory to get the interaction to work properly.
For example try:
psexec -i 2 -w C:\Temp -d \\server cscript filepath\file.vbs
More information about PSExec switches can be found here: https://learn.microsoft.com/en-gb/sysinternals/downloads/psexec
Upvotes: 1