Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8134129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:54:11+00:00 2026-06-06T09:54:11+00:00

I was originally trying to run an executable ( tftpd32.exe ) from Expect with

  • 0

I was originally trying to run an executable (tftpd32.exe) from Expect with the following command, but for some unknown reason it would hanged the entire script:

exec c:/tftpd32.351/tftpd32.exe

So, decided to call a batch file that will start the executable.

I tried to call the batch file with the following command, but get an error message stating windows cannot find the file.

exec c:/tftpd32.351/start_tftp.bat

I also tried the following, but it does not start the executable:

spwan cmd.exe /c c:/tftpd32.351/start_tftp.bat

The batch file contains this and it run ok when I double click on it:

start tftpd32.exe

Any help would be very much appreciated.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T09:54:15+00:00Added an answer on June 6, 2026 at 9:54 am

    The right way to run that program from Tcl is to do:

    set tftpd "c:/tftpd32.351/tftpd32.exe"
    exec {*}[auto_execok start] "" [file nativename $tftpd]
    

    Note that you should always have that extra empty argument when using start (due to the weird way that start works; it has an optional string in quotes that specifies the window title to create, but it tends to misinterpret the first quoted string as that even if that leaves it with no mandatory arguments) and you need to use the native system name of the executable to run, hence the file nativename.

    If you’ve got an older version of Tcl inside your expect program (8.4 or before) you’d do this instead:

    set tftpd "c:/tftpd32.351/tftpd32.exe"
    eval exec [auto_execok start] [list "" [file nativename $tftpd]]
    

    The list command in that weird eval exec construction adds some necessary quoting that you’d have trouble generating otherwise. Use it exactly as above or you’ll get very strange errors. (Or upgrade to something where you don’t need nearly as much code gymnastics; the {*} syntax was added for a good reason!)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to run the following ruby code from IRB but am unable
I'm trying to launch Cygwin version of ruby.exe from a .NET application, but I'm
I am currently trying to run some R code that originally ran under 2.11.0
I'm trying to run a program originally tested on Matlab 6.5 on a new
I am trying to run this update statement but informix doesn't allow me to.
I am trying to run following HTML in every browser: Opera, FF, IE, Chrome
I am trying to run delayed_job using monit, but its failing to run as
I'm trying to compile an old project that was originally designed for Visual Studio
We are trying to replace a COM server originally written for a VB6 application
Edited again because it originally wasn't clear that I'm trying to initialize the arrays

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.