Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 4db3097d92a12aaf66b5d533fbbb70d8b434fd91
Ticket: 224021ffffffffffffffffffffffffffffffffff
search path of exec command under C:\Program Files
User & Date: nobody on 2000-12-01 10:17:17
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    #------------------------------------------------------------------------------
    #   File:       exec_test.tcl  
    #------------------------------------------------------------------------------
    # simple test proc to show the behaviour of exec and its search path on windows NT
    #
    # 1. Copy the script to some directory e.g. C:\My Documents
    #    add a program e.g. echo.exe
    #
    # 2: observe, that the function works as expected. All test cases are successful
    #
    # 3. copy the script and your program under c:\Program Files
    #
    # 4. see that the script fails in CASE1 and CASE2!!
    #
    ###############################################################################
    
    # define a program which is located in the same directory as this script
    set prog echo
    
    # show the console
    console show
    # make sure the search path is set 
    set env(PATH) "$env(PATH);[pwd]"
    
    ##-----------------------------------------------------------------------------
    ## Begin: test case find the program through search path
    ##-----------------------------------------------------------------------------
    if {[catch {set out [exec $prog "CASE1: found the program"]} res]} {
       puts "CASE1: ERROR: $res"
       puts "ENV: $env(PATH)"
       
    } else {
        puts $out
    }
    
    if {[catch {set out [exec $prog.exe "CASE2: found the program"]} res]} {
       puts "CASE2: ERROR: $res"
       puts "ENV: $env(PATH)"
    } else {
        puts $out
    }
    
    if {[catch {set out [exec [pwd]/prog.exe "CASE3: found the program"]} res]} {
       puts "CASE3: ERROR: $res"
    } else {
        puts $out
    }
    
  4. foundin changed to: "obsolete: 8.3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "62. (unused)"
  10. title changed to:
    search path of exec command under C:\Program Files 
    
  11. type changed to: "Bug"