Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Install and Use on W2K

Posted by MarkTChristy (MarkTChristy), 21 February 2005

Hi,
New forum member here. And - lame question #1.

I just installed expect-5.21r1b1-setup.exe on my Windows 2000 box to help automate changing passwords (every 3 months) on over 100 NW devices. Ugh.

I installed the above build and it seems to install correctly. I added the path for the executables to my windows env vars, and they are there. I can call expect.exe or tclsh80.exe - and they run.

But...  

I cannot 'spawn' anything. I use the absolute pathname, or not, same error. I can't even do a 'cd' from the script... Here is what the error looks like...

C:\PROGRA~1\Expect-5.21>type test1
spawn c:/winnt/system32/nslookup.exe

C:\PROGRA~1\Expect-5.21>expect test1
spawn nslookup
couldn't execute "c:/winnt/system32/nslookup.exe": no such file or directory
   while executing
"spawn c:/winnt/system32/nslookup.exe"
   (file "test1" line 1)

Am I the only one that has ever seen this problem, if so I'll go away -- but maybe someone else has fixed this -- tell me how please!?  

Posted by admin (Graham Ellis), 22 February 2005
Hi, Mark.  Yes, it's frustrating what that sort of thing happens.  Which "Expect" are you running - is that the current ActiveState version that they license, or one of the more mature implementations?  Your reference o "tclsh80" tells me that you may be running Tcl version 8.0 which isn't exactly recent.

Having said that ... no immediate answer but some things to try that may lead you towards an answer:

a) Does the command you spawn work if you run it outside expect from the command line?
b) Have you tried running it with a true \ based file path (rather than using / - yes I KNOW it should work, but). Remember the need to double the backslash
c) Have you tested it our spawning anything else - try a dir for example

Posted by MarkTChristy (MarkTChristy), 23 February 2005
Graham -- thanks for you input   I discovered that I had a bad install. I have now installed ActiveStates TCL and Expect demo and can spawn processes.

I still have many questions - but I'll search the forum first for some of the answers and/or create a new topic.

To be more specific, I installed ActiveStates 8.4.9.0 TCL and thier 1.0.1 expect. It is working now.

--Mark  

Posted by admin (Graham Ellis), 23 February 2005
Good.  Appreciate you letting us know ... see you with other questions in due course!  

- Graham



This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho