Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

File association problem in TCC

Jun
223
0
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
 
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
 
> 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
 

Similar threads

Back
Top