Error in TCC/LE when succeed smoothly in native windows cmd.exe

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Nov 8, 2015
24
1
#1
I made a flle assiociation of .pml extension. So I have in shell\open\command key registry:

z:\tcc /h/c "reg add "HKCU\Software\Sysinternals\Process Monitor" /v MainWindow /t REG_BINARY /d 2c000000 /f&z:\Procmon.exe /quiet /openlog "%v""

then get into TCC/LE console and type:
App.pml <enter>

it failed an error:
TCC: (Sys) The system cannot find the path specified.
"z:\tcc /h/c reg add HKCU\Software\Sysinternals\Process Monitor /v MainWindow /t REG_BINARY /d 2c000000000 /f&z:\Procmon.exe"

while in windows cmd.exe prompt it flawlessly run it and smoothly launch the Procmon.exe with App.pml as parameter

How to solve this ?
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,426
40
Albuquerque, NM
prospero.unm.edu
#2
That registry key is really for use by Explorer. To create file associations in TCC, I would suggest an environment variable:
Code:
set .pml=command....
This way also causes filename completion to pick up on .PML files.
 
#4
Using your command with appropriate paths, with CMD.EXE.

1515639588505.png

The default shell\open\command (shown below) works in bot CMD and TCC/LE.
Code:
V:\> reg query HKEY_CLASSES_ROOT\.pml

HKEY_CLASSES_ROOT\.pml
    (Default)    REG_SZ    ProcMon.Logfile.1

HKEY_CLASSES_ROOT\.pml\PersistentHandler

V:\> reg query HKEY_CLASSES_ROOT\ProcMon.Logfile.1\shell\open\command

HKEY_CLASSES_ROOT\ProcMon.Logfile.1\shell\open\command
    (Default)    REG_SZ    "G:\processmonitor\procmon.exe" /OpenLog "%1"
 
#6
I was mistaken. I thought it worked because after being successful from CMD, procmon.exe resets the shell\open\command to the default.

With this command,

Code:
g:\tccle14\tcc.exe /c reg add "HKCU\Software\Sysinternals\Process Monitor" /v MainWindow /t REG_BINARY /d 2c000000 /f & g:\processmonitor\Procmon.exe /quiet /openlog "%v"
and trying only with TCC/LE, I see that the reg command succeeded and then I get a rather inexplicable error (below).

1515648284947.png

However, a small change fixed that ... change "%v" to "%l". I don't know why "%v" works in CMD and not in TCC

This one worls in TCC/LE.

Code:
g:\tccle14\tcc.exe /c reg add "HKCU\Software\Sysinternals\Process Monitor" /v MainWindow /t REG_BINARY /d 2c000000 /f & g:\processmonitor\Procmon.exe /quiet /openlog "%l"
But, as I said above, when it does work (once) procmon.exe resets that command back to the default.