File association problem in TCC

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
Hi,

today I noticed a discrepancy between CMD and TCC when I tried to start a JavaScript file from the command line (TCC). Although having set the default script host to cscript, TCC would call wscript.exe to process the file. The same command in CMD worked as intended. I checked several MS KB articles and I'm sure that my Registry settings are correct.
Also, tracing the call with a Registry Monitor shows that the following location is directly accessed to find the "server": HKCR\JSFile\SHELL\OPEN\COMMAND\@. However, MS introduced the following mechanism (at least for WSH 5.x):
1) Look up HKEY_CLASSES_ROOT\<script_ext>\Shell\@ => "Open2"
2) Use the "server" specified at HKCR\<script_ext>\Shell\Open2\command\@ to process the command.

I'm aware that there are workarounds for this problem, but I'd like to see the behavior in both engines be identical.

Greetings

nickles
 
#4
TCC TakeCommand is thr GUI version so its going to call wscript if you open a
tc/4nt does it behave as you expected.


----- Original Message -----
| Hi,
|
| today I noticed a discrepancy between CMD and TCC when I tried to start a
JavaScript file from the command line (TCC). Although having set the default
script host to cscript, TCC would call wscript.exe to process the file. The same
command in CMD worked as intended. I checked several MS KB articles and I'm sure
that my Registry settings are correct.
| Also, tracing the call with a Registry Monitor shows that the following
location is directly accessed to find the "server":
HKCR\JSFile\SHELL\OPEN\COMMAND\@. However, MS introduced the following mechanism
(at least for WSH 5.x):
| 1) Look up HKEY_CLASSES_ROOT\<script_ext>\Shell\@ => "Open2"
| 2) Use the "server" specified at HKCR\<script_ext>\Shell\Open2\command\@ to
process the command.
|
| I'm aware that there are workarounds for this problem, but I'd like to see the
behavior in both engines be identical.
|
| Greetings
|
| nickles
 

rconn

Administrator
Staff member
May 14, 2008
10,162
86
#5
> today I noticed a discrepancy between CMD and TCC when I tried to start a
> JavaScript file from the command line (TCC). Although having set the
> default script host to cscript, TCC would call wscript.exe to process the
> file. The same command in CMD worked as intended. I checked several
MS KB
> articles and I'm sure that my Registry settings are correct.

> Also, tracing the call with a Registry Monitor shows that the following
> location is directly accessed to find the "server":
> HKCR\JSFile\SHELL\OPEN\COMMAND\@. However, MS introduced the following
> mechanism
> (at least for WSH 5.x):
> | 1) Look up HKEY_CLASSES_ROOT\\Shell\@ => "Open2"
> | 2) Use the "server" specified at HKCR\\Shell\Open2\command\@ to
> process the command.
> |
> I'm aware that there are workarounds for this problem, but I'd like to
> see the behavior in both engines be identical.
This is undocumented CMD behavior. I've made a change for TCC v10 to
look at the (undocumented) Open2 key; in the meantime change the
(documented) Open key to point to the command you want.

Rex Conn
JP Software