TC 18.00 x64 issue with lua io.popen()

We just upgraded from TC 15.00 x64 to TC 18.00.18 x64. We have some lua scripts that execute .bat files via io.popen(). The argument to popen() is a table, with the first entry being a quoted string of the full path to the .bat file with Unix style slashes. Subsequent arguments are parameters to the batch file. Something like this:

args[0] = '"D:/dev/bin/SyncP4Changelist.bat"'
args[1] = 'option1'

They worked fine under TC 15.00 but don't from a 18.00 TC Prompt.

We see this error message when the popen() call is made:

TCC: Unknown command "D:"

If I enable UNIX/Linux-style paths I get this error:

TCC: Unknown command "D:/dev/bin/SyncP4Changelist.bat option1"

If I remove the double quotes from args[0] it works. I'd prefer not to have to do that as it may break compatibility with other shells and there are a lot of lua scripts I'd have to change.

Thanks.
 

rconn

Administrator
Staff member
May 14, 2008
12,356
150
We just upgraded from TC 15.00 x64 to TC 18.00.18 x64. We have some lua scripts that execute .bat files via io.popen(). The argument to popen() is a table, with the first entry being a quoted string of the full path to the .bat file with Unix style slashes. Subsequent arguments are parameters to the batch file. Something like this:

args[0] = '"D:/dev/bin/SyncP4Changelist.bat"'
args[1] = 'option1'

Not sure exactly what you're doing here -- are you quoting the arguments with both outer single quotes and inner double quotes?

Are you using the TCC internal Lua support or an external Lua interpreter?
 
Sorry, should have been clearer. Those lines are cut from the Lua script, so the outer singe quotes are part of the Lua script and consumed by the Lua interpreter. The inner double quotes are part of the string itself. The string in memory ends up as exactly "D:/dev/bin/SyncP4Changelist.bat".

We're using an external Lua interpreter. Although I better check that to be 100% sure.

Thanks.
 
Similar threads
Thread starter Title Forum Replies Date
Fross Win7 x64 Dialog Size Issue Support 3
S Issues with version v26.02.42 x64 Support 0
fishman@panix.com 27.00.17 x64 will not install for me!! Support 4
K Fixed Prompt display will be shifted after use dir to display a filename with Chinese. (v25.00.28 x64) Support 18
DrusTheAxe TCMD 24.02.49 x64 crashed due to DivideByZero :-( Support 4
Joe Caverly Help not launching in CMDebug v23.00.14 x64 Support 1
C Del /W999 2gbFile.ext / latest build / Win7 x64 / MSE / Everything Support 5
thorntonpg 21.00.15 x64 to .16 failed Support 4
Joe Caverly Windows x64 Support 4
C sendmail in v20.00.25 x64 Support 7
Craig Fitzgerald problem with executable extensons with TCC version 19.10.51 x64 Support 3
gentzel Fixed dirs +n bug in 20.0.12 x64 Support 2
J How to? 20beta: How to install x86 on x64 Support 2
Alpengreis [v19.0.32 (x64)] Problem with [Options, Tabbed Toolbar, Add Button] in german language Support 1
bwawsc2 Can't install updates to TCMD x64 Support 5
Alpengreis [Bug?] View (V) Prefs Error (TC 18.00.27 x64) Support 4
I Take Command 18 x64 Install Hang Support 2
P MS VS2013 vsdevcmd.bat fails to run with tcmd 17 x64 Support 10
B Documentation Reference/Windows X64: Redundant text at the end Support 0
S Install TC 17.00.37 x64 expires immediately & invalidates registered TCmd v16.03.55 Support 3
G How to? Trying to create TCC shortcut that opens with blue background (on Windows 8.1 x64) Support 1
C SafeChars x64 plugin under Win7 x64 Support 2
P WAD TC 15.0.1.58 x64 crasches with a simple dir command Support 18
C WAD @index not working in v16 x64 Support 14
MickeyF problem using COM object in VBScript from v16 x64 TCC but not from v15 32-bit TCC Support 4
B Take Command x64 15.01.55 Error: Update installation failed Support 7
samintz Can't install 15.01.54 on Win7 x64 Support 6
C Latest TCMDx64 fails on XP Pro x64 Support 1
gschizas Installation folder for TCMD x64 15.1 is wrong Support 5
B tpipe and MSVCR110.dll TCC x64 Build 44?? Support 19
greyfairer Very slow startup since last Windows 7 Update (14.03.59 x64) Support 9
W /g option (%) on MOVE cmd appears broken TCC 14.03.57 x64 Support 8
7 TCC startup crash in Windows 8 Pro x64 Support 20
Frank problem with environment variable x86 vs. x64 Support 2
W Custom colors not saved in TCC 14 / Windows 7 x64 Support 4
S Fixed View and V do not work in new 13.04.52 x64 installation Support 11
P WAD Bug in TC v 13.03 build 39 x64 Support 1
G Problem with TC 13 x64 Support 7
jason404 I would like to buy TCC x64 Support 1
K_Meinhard x64 Installation Support 0
S Location of tcmd.ini in x64 Support 4
fromano Invalid parameter 12.0.34 x64 Support 1
G TCMD x64 Build 28 Crashing Support 5
mscheuner WINDOW doesn't work under TCMD v11 x64 b40 ? Support 4
Juanma Barranquero list /c fails for attached TCC on TCMD 11 x64 Support 0
Juanma Barranquero Several nitpicks and a crash in TCMD 11 x64 / Windows 7 Support 17
fpefpe plugin and x64 Support 2
mscheuner Background color not "sticking" in TCMD v11 x64 on Win7 Support 3
rconn v11.0.28 x64 reuploaded Support 1
rconn Seeking Take Command x64 beta testers Support 0

Similar threads