Skip to content
Tcl Source Code Artifact [4db3097d92]
Login

Artifact [4db3097d92]

Artifact 4db3097d92a12aaf66b5d533fbbb70d8b434fd91:

Ticket change [4db3097d92] - New ticket [224021ffffffffff|224021ffff] <i>search path of exec command under C:\Program Files </i>. by nobody on 2000-12-01 10:17:17.
D 2000-12-01T10:17:17
J assignee nobody
J cmimetype text/plain
J comment #------------------------------------------------------------------------------\n#\s\s\sFile:\s\s\s\s\s\s\sexec_test.tcl\s\s\n#------------------------------------------------------------------------------\n#\ssimple\stest\sproc\sto\sshow\sthe\sbehaviour\sof\sexec\sand\sits\ssearch\spath\son\swindows\sNT\n#\n#\s1.\sCopy\sthe\sscript\sto\ssome\sdirectory\se.g.\sC:\\My\sDocuments\n#\s\s\s\sadd\sa\sprogram\se.g.\secho.exe\n#\n#\s2:\sobserve,\sthat\sthe\sfunction\sworks\sas\sexpected.\sAll\stest\scases\sare\ssuccessful\n#\n#\s3.\scopy\sthe\sscript\sand\syour\sprogram\sunder\sc:\\Program\sFiles\n#\n#\s4.\ssee\sthat\sthe\sscript\sfails\sin\sCASE1\sand\sCASE2!!\n#\n###############################################################################\n\n#\sdefine\sa\sprogram\swhich\sis\slocated\sin\sthe\ssame\sdirectory\sas\sthis\sscript\nset\sprog\secho\n\n#\sshow\sthe\sconsole\nconsole\sshow\n#\smake\ssure\sthe\ssearch\spath\sis\sset\s\nset\senv(PATH)\s"$env(PATH);[pwd]"\n\n##-----------------------------------------------------------------------------\n##\sBegin:\stest\scase\sfind\sthe\sprogram\sthrough\ssearch\spath\n##-----------------------------------------------------------------------------\nif\s{[catch\s{set\sout\s[exec\s$prog\s"CASE1:\sfound\sthe\sprogram"]}\sres]}\s{\n\s\s\sputs\s"CASE1:\sERROR:\s$res"\n\s\s\sputs\s"ENV:\s$env(PATH)"\n\s\s\s\n}\selse\s{\n\s\s\s\sputs\s$out\n}\n\nif\s{[catch\s{set\sout\s[exec\s$prog.exe\s"CASE2:\sfound\sthe\sprogram"]}\sres]}\s{\n\s\s\sputs\s"CASE2:\sERROR:\s$res"\n\s\s\sputs\s"ENV:\s$env(PATH)"\n}\selse\s{\n\s\s\s\sputs\s$out\n}\n\nif\s{[catch\s{set\sout\s[exec\s[pwd]/prog.exe\s"CASE3:\sfound\sthe\sprogram"]}\sres]}\s{\n\s\s\sputs\s"CASE3:\sERROR:\s$res"\n}\selse\s{\n\s\s\s\sputs\s$out\n}
J foundin obsolete:\s8.3
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 62.\s(unused)
J title search\spath\sof\sexec\scommand\sunder\sC:\\Program\sFiles\s
J type Bug
K 224021ffffffffffffffffffffffffffffffffff
U nobody
Z 5bd0ad79682bad3d6d02b078c26af8d0