Click here to Skip to main content
15,881,139 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Running VB6 SP6 on Windows 10, 64 bit.

I'm trying to script a telnet session from VB.

I open telnet to an address and port as follows:

telnetpath = "telnet 192.168.0.91 9999"

Shell telnetpath, vbNormalFocus

This works when the program is executed from within the VB IDE, but it doesn't work in the compiled code. I get an error saying that it can't find the telnet program.

I know telnet is enabled, as I can open a session from a command window. Also, this worked in Windows XP, but not on Windows 10.

I tried to make a batch file to do this and shell to the batch from my program, but the result is the same; it works if I execute the batch from a command window or the VB IDE, but not if I call the batch from compiled VB. Something tells me this is related to 64/32 bit, but don't know how to overcome it.

Joe

What I have tried:

Shell, Shellexecute, cmd, batch
Posted
Updated 8-Dec-17 1:11am
Comments
CHill60 8-Dec-17 7:23am    
You are not actually running that VB6 exe on 64bit - it runs under the Windows-on-Windows 64 emulator. Telnet will be running under Windows. Running scripts between 32 and 64 bit is a known issue. The only article I can find at the moment is this one Run 32-bit applications on x64 Windows servers[^] - sorry you have to "register" (free) to read the content.
Richard MacCutchan 8-Dec-17 8:52am    
Most likely because you have not given the shell the full path to telnet.exe

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900