Hi friends,
I must be doing something wrong but I just don't know what!
I have downloaded PsTools and put the PsExec in my project folder as well as in System32.
I am trying to execute a DOS command on a remote machine and I'm trying like this:
Here I 've already shortened the command to no parameters, yet I'll always get "file not found" at the Shell line.
It seems it cannot find PsExec.
I've also tried with:
but to no avail. Always "file not found".
the command itself works fine if executed from a command line.
ponder
By the way, this is what I actually want to achieve, in case anyone knows how to do this with WMI or whatever:
I am trying to query the VNC status of that remote machine with a simple
where M is a mapped drive that is reachable as "M" from any computer in our domain.
After that I want to query the resulting text file to know
a) whether any client is connected and
b) which clients are connected.
With this info, I would like to create some sort of "VNC traffic lights". That is why I do this from VB6; I need a form to display further information.
Any idea what's up here?
Thanks & greetz!
MakeItSo
[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
I must be doing something wrong but I just don't know what!
I have downloaded PsTools and put the PsExec in my project folder as well as in System32.
I am trying to execute a DOS command on a remote machine and I'm trying like this:
Code:
Dim Serv As String
Dim checker As String
Dim theCommand As String
Serv = "\\[remote machine] "
checker = "netstat"
theCommand = "psexec " & VNCServ & checker
Shell Chr(34) & theCommand & Chr(34)
DoEvents
It seems it cannot find PsExec.
I've also tried with:
Code:
theCommand = App.Path & \psexec.exe " & ...
the command itself works fine if executed from a command line.
ponder
By the way, this is what I actually want to achieve, in case anyone knows how to do this with WMI or whatever:
I am trying to query the VNC status of that remote machine with a simple
Code:
netstat -an | find ":5900" >M:\temp\temp.txt
After that I want to query the resulting text file to know
a) whether any client is connected and
b) which clients are connected.
With this info, I would like to create some sort of "VNC traffic lights". That is why I do this from VB6; I need a form to display further information.
Any idea what's up here?
Thanks & greetz!
MakeItSo
[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell