SCRIPT makes TCC disappear.

May 20, 2008
Syracuse, NY, USA
This script works (to get the timestamp of

v:\> ifiletime.vbs
Sun, 21 Nov 2021 20:18:22 GMT

Both of these make TCC disappear (at least back to v24).

script ifiletime.vbs
script /e VBScript ifiletime.vbs

It's a stack buffer overrun in NTDLL.DLL. I have a .DMP file if it'll help.

Here's the script.

Dim h
Dim lastmod
Set h = CreateObject("MSXML2.ServerXMLHTTP")
    h.Open "HEAD", "", False
    lastmod = h.getResponseHeader("Last-Modified")
Hi @vefatica,

@rconn says "SCRIPT is pretty much obsolete; Microsoft has abandoned the technology."

All of the COM objects that I have written work with SCRIPT, but a few of the Microsoft COM Objects do not. In your script, the problem is the MSXML2.ServerXMLHTTP object.

Try running your .vbs script in TCC 18 or earlier, and it should work.

Fortunately, PowerShell does not have this problem;
r:\>type ifiletime.ps1
$h = new-object -com "MSXML2.ServerXMLHTTP"
$h.Open("HEAD", "")
$lastmod = $h.getresponseheader("Last-Modified")

r:\>pshell ifiletime.ps1
Sun, 21 Nov 2021 20:18:22 GMT

In my PowerShell Profile, I have the following;
function CreateObject($progID)
     new-object -com $progID

This emulates the VBScript CreateObject, so my PowerShell code can now look like;
$h = CreateObject("MSXML2.ServerXMLHTTP")
$h.Open("HEAD", "")
$lastmod = $h.getresponseheader("Last-Modified")

May 20, 2008
Syracuse, NY, USA
I can only try v18 in Windows 7. There I get this.

\\jj\v$\ifiletime.vbs(6, 5) msxml3.dll: An error occurred in the secure channel support
May 20, 2008
Syracuse, NY, USA
100% a Windows bug - it's crashing inside the Windows IActiveScript code (after that code helpfully removes the TCC exception handler to ensure that the app will crash).
Well, I don't know much about it. CSCRIPT.EXE and WSCRIPT.EXE do OK. Do they use the same technology?
Hi @vefatica,
No, CSCRIPT.EXE and WSCRIPT.EXE are their own engines, just like the SCRIPT command in TCC is its own engine.

Microsoft has kept CSCRIPT.EXE and WSCRIPT.EXE updated and working in Windows 10;


Thus, CSCRIPT/WSCRIPT are the ways to run .vbs files in TCC, especially if you are using any COM object.

If you are doing non-COM object scripting, SCRIPT should run them with no problems.

May 20, 2008
Syracuse, NY, USA
I guess I can run TCCv18 ... directly from its home on the remote machine. There, script ifiletime.vbs gives this.


and wscript //h:cscript ifiletime.vbs gives

Hi @vefatica,
I tried running the ifiletime.vbs script in TCC 15 under Windows XP, and it returned;

TCC  15.01.40   Windows XP [Version 5.1.2600]

[R:\]cscript ifiletime.vbs
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

R:\ifiletime.vbs(6, 1) msxml3.dll: The message received was unexpected or badly formatted.

Hey @vefatica,
WScript.Echo does not work with the SCRIPT command. It can't, as it has no idea what WScript means, since that only works with the CSCRIPT/WSCRIPT engines.

Instead, try using;
TakeCommand.tcommand("echo whatever")

Thus, CSCRIPT/WSCRIPT have no idea what TakeCommand.tcommand means, as that is only in the engine for the SCRIPT command.

I still don't understand (but that's OK). Why do all three have an option to specify the engine?
There are many script engines.

VBScript, JScript, Perl, Python, Fortran, etc.

VBScript is the default.

I think the confusion might be in my terminology, as I have always referred to them as engines.
The interfaces to Active Scripting engines are public, so any developer can create applications that are programmable in Active Scripting languages as well as engines for additional languages.

Similar threads
Thread starter Title Forum Replies Date
Joe Caverly SCRIPT and GetObject Support 3
vefatica SCRIPT ... TCC disappears Support 2
T How can I send a simple parameter to a script, in tc 25? Support 2
vefatica PSHELL: How pass arguments to script? Support 15
EDerH Powershell call from script Support 24
Joe Caverly .PS1 script does not work with PSHELL Support 11
MickeyF running program from script and (not) returning to script Support 12
T Fixed Echo randomly activated in script Support 4
fpefpe How to? script error Support 1
fpefpe How to? script error Support 0
vefatica @SCRIPT bug persists Support 4
D Catching the result of an evaluated script expression Support 0
Joe Caverly Non-conforming @Script Support 6
M The Matrix: a useless script ... Support 5
fpefpe How to? LUA script Support 0
T Change language in script Support 4
Steve Pitts Documentation Script errors invoking help Support 15
R How to? Launch and execute commands in tcmd.exe through MSBuild Script. Support 3
Joe Caverly @SCRIPT does not like all comments Support 2
Mordachai Help! How to set parameters for script I'm debugging?! Support 6
fpefpe How to? Script support Support 8
JohnQSmith "SCRIPT" Support 7
rconn Script kiddies on the attack Support 4
krischik Stop Script after Syntax Error. Support 6
H Ruby - Running External Ruby script crashes TCC Support 11
Joe Caverly SCRIPT Command Support 2
T Obfuscating passwords in script Support 14
Stefano Piccardi IDE.exe start toobar button fails when % in script path Support 0
lassevk exit(1) in a python script exits console, by design or bug? Support 1
R break script on syntex error Support 7
K iftp script copy deletes target files Support 17
R script problem with mapped network drive Support 1
J goto compat issue makes all node/npm wrapper scripts fail to run... Support 2
vefatica CD_ENTER makes wacky things happen Support 10
Peter Murschall PIPE Fittings makes Errors Support 3
S Setting Tabs=Bottom makes text turn black Support 6
vefatica WAD TPIPE /SPLIT makes extra 0-byte file Support 8
C Attaching PowerShell changes its colors and makes it hard to read Support 15
MickeyF TCC suddenly crashing (not TCC's fault) Support 2
Z CMDDebug - TCC unknown command Support 2
rconn News Take Command / TCC / CMDebug / TCC-RT 28.02.17 Support 0
vefatica TCC startup: /IP not honored after /K Support 1
MickeyF TCC crashing when copying multiple files (now resolved) Support 6
C COMSPEC constantly reset to TCC.EXE Support 6
rconn News Take Command / TCC / CMDebug / TCC-RT v28 Released Support 0
C How to? starting TCC/TCMD v25 Support 2
CWBillow TCC and TCMD in Powershell Support 6
rconn News Take Command / TCC / CMDebug / TCC-RT 27.01.24 uploaded Support 0
rconn News Take Command / TCC / CMDebug / TCC-RT 27.01.23 uploaded Support 0
Alpengreis Fixed Crash after copy dialog with big TCC.exception.log Support 5

Similar threads