netcat call from c++

system("c:\\nc -l -p 1234 -e c:\\windows\\system32\\cmd.exe");

Ok so when I do this it responds with

c:\Users\test\nc is not recognized as an internal or external command.

I mean if it gave me an error or something else ok but why on earth would it refer to a location that a program has nothing to with.

There were some threads in the program so I thought maybe some of them are still running so I rebooted the virtual machine but same thing.

The nc.exe is in c:\.

At some point in time few days ago it was in c:\Users\test but I can not see how would that matter The program has been rebuilt and I have even commented out all the other functions from the main.
Than I tried just doing the same thing from the CMD but same result.

C++
Windows 7 running on a virtual machine
Host Fedora 20
Visual studio 2013 Express


visual studios might be trying to run it from there for some reason. try just double clicking the exe instead of running it in vs
Topic archived. No new replies allowed.