#! tclsh
# -*- tcl -*-
# Test 'exec' on Windows for applications with spaces in the path.
# Example: p4.exe (Perforce)

set fullpath 0

if {$fullpath} {
    # This should be ok
    puts "full path ..."
    puts [exec "c:\\Program Files\\Perforce\\p4.exe" help]
} else {
    # And this fails.
    puts "no path, searching ..."
    puts [exec p4.exe help]
}
