Expect support for Windows 7

Posted by rmbartis on 2012-09-07 06:42
Forums: Expect discussion | OS: Windows 7

I regularly develop standalone utilities to simplify, make more efficient and mitigate the chance for errors during my customer support activities. These utilities make heavy use of the TclDev kit libs and Expect. Its my understanding Expect is not supported on Windows 7 which is becoming more and more restrictive. Are there any plans to support a Windows 7 native Expect lib?

ActiveState Staff
Wed, 2012-10-24 16:08

Expect is supported on Windows 7, but there is only a 32-bit version available. If you're working with a 32-bit Win 7, just make sure you have a recent (2011/20012) version of Expect to get the patch that allows Expect to work with UAC.

A 32-bit Expect will work on a 64-bit Windows 7, as long as you make allowances for the limitations of WoW emulation. You will not be able to control any 64-bit processes from a 32-bit Expect. This frequently is encountered when Expect tries to telnet out. To telnet, you need a 32-bit telnet client, but the Microsoft Windows 32-bit telnet client is unusable because WoW emulation remaps the libraries in a way which can't be worked around. There are several forum postings that describe how to use a 32-bit Putty client instead of a 32-bit telnet, but a Putty based solution will require that Putty be installed on the target system, so they are not as stand-alone as might be desirable.

There are currently no plans for a 64-bit Windows Expect. Windows does not support Tty devices, and Expect works as a Man-in-the-middle of a Tty session. The 32-bit Windows version takes advantage of a debugger hack. This hack no longer works with a 64-bit Windows.

harsha.thamma | Mon, 2013-10-07 05:10

I am trying to send commands to a access point using telnet. So I used tcl script as follows:

exp_spwan telnet

exp_send "\r"

So when I was trying to read the expect buffer (say expect_out(buffer)), it is filled with \u0007(bell characters), which is causing my tcl shell and command windows unresponsive.

I am seeing this issue only in Windows 7 (it is working fine with Windows XP)

The problem happens when I turn on expect logging which is very much required for my testing.

I am stuck at this point, so please let me know any solution for this problem.

OS Details:
Windows 7 Professional 32 bit

Tcl version: 8.4.9
Expect version: 5.43

ActiveState Staff
Mon, 2013-10-07 09:28

Old versions are unsupported. Newer operating systems must use newer versions of software.