| On Wed, 3 Nov 2010 14:52:54 -0400, "E. S. Fabian"
| <***@comcast.net> wrote Re Re: %SystemRoot% not being
|| No problems here using either TCC 9.02.157 (just a bit later
|| than your B151, available as a free download) or in TCC 12.00.32.
|| From either version the defragmenter is invoked. However, using the
|| same filename as the parameter to the SHORTCUT command ("shortcut
|| dfrg.msc") does result in the same error message. I think this
|| issue shoud be brought up in the JPsoft TC suport forum.
| Thanks Steve. I found a thread here
| that is analagous to my problem, but the solution seems to be
| specific to VBSfiles and I don't know enough about described
| solution to adapt it to solving my problem.
| Any suggestions?
Basically an imitation of the thread you mentioned. The issue is NOT
specific to VBSfiles. As that thread implies, whenever the VALUE of a
registry entry contains an environment variable, such as %SystemRoot%, the
entry TYPE must be REG_EXPAND_SZ, not REG_SZ (if the variable needs to be
expanded, i.e., its value and not its name are used). To determine what's in
my system, I first used the ASSOC command to determine the "filetype" the
.msc extension implies, and found it to be MSCFile. I then used REGEDIT to
search my registry for all occurrences of MSCFILE (the search is case
insensitive) and related subkeys. There were many with %SystemRoot%, but all
were the REG_EXPAND_SZ type, hence no problem on my system. I suggest you
follow the same method and check the entry types, and change them if
necessary. BTW, using the command "FTYPE mscfile" displayed
mscfile=C:\WINDOWS\system32\mmc.exe "%1" %*
which results from expanding the value
%SystemRoot%\mmc.exe "%1" %*
found in the registry, with type REG_EXPAND_SZ.