%systemroot% doesn't expand

Nov 3, 2010
9
0
Hello,

I'm running TCC on WinXP

C:\WINDOWS\system32>ver
TCC 9.02.151 Windows XP [Version 5.1.2600]

If I try to execute a .msc form the TCC command prompt I get an error:

C:\WINDOWS\system32> dfrg.msc
TCC: (Sys) The system cannot find the path specified.
"%SystemRoot%\system32\mmc.exe"

If I try the same thing in cmd.exe, I don't get the error:

C:\WINDOWS\system32>cmd.exe
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\WINDOWS\system32> dfrg.msc

Here the dfrg gui executes properly.

Can someone suggest a fix for this or why it works in CMD but not TCC?

Thanks
 

dim

Dimitry Andric
May 31, 2008
205
1
Netherlands
On 2010-11-09 14:49, CaesarR wrote:

> C:\WINDOWS\system32>ver
> TCC 9.02.151 Windows XP [Version 5.1.2600]
>
> If I try to execute a .msc form the TCC command prompt I get an error:
>
> C:\WINDOWS\system32> dfrg.msc
> TCC: (Sys) The system cannot find the path specified.
> "%SystemRoot%\system32\mmc.exe"
>
> If I try the same thing in cmd.exe, I don't get the error:

Does the following print 2 (e.g. REG_EXPAND_SZ):

echo %@regtype[HKCR\MSCFile\Shell\Open\Command\]

? And what does this print:

echo %@regquery[HKCR\MSCFile\Shell\Open\Command\]

? On my system, it results in:

%SystemRoot%\system32\mmc.exe "%1" %*

and running a .msc file from the command line works fine.
 
Nov 3, 2010
9
0
Hello dim,

On Tue, 09 Nov 2010 09:05:29 -0500, dim <> wrote
Re RE: [Support-t-2412] %systemroot% doesn't expand:


>Does the following print 2 (e.g. REG_EXPAND_SZ):
>
> echo %@regtype[HKCR\MSCFile\Shell\Open\Command\]
>
>? And what does this print:
It prints "1"


> echo %@regquery[HKCR\MSCFile\Shell\Open\Command\]
>
>? On my system, it results in:
>
> %SystemRoot%\system32\mmc.exe "%1" %*
It prints C:\WINDOWS\system32\mmc.exe ""


>and running a .msc file from the command line works fine.

So there is a difference between what my system prints for the above
two items, and what your system prints. That may be the problem.

But then I wonder why can I run a .msc file in CMD, but not TCC?
 
May 20, 2008
3,515
4
Elkridge, MD, USA
---- Original Message ----
From: CaesarR
...
| So there is a difference between what my system prints for the above
| two items, and what your system prints. That may be the problem.

You can use the method described in the old thread you already discovered - which relates to VBS - on how to fix the registry entries. BTW, is your XP up to SP3? If not, you ought to update it first.

| But then I wonder why can I run a .msc file in CMD, but not TCC?

This is just a guess: TCC uses the DOCUMENTED method, CMD uses an undocumented method.
--
Steve
 

dim

Dimitry Andric
May 31, 2008
205
1
Netherlands
On 2010-11-09 18:45, CaesarR wrote:

>> echo %@regquery[HKCR\MSCFile\Shell\Open\Command\]
>>
>> ? On my system, it results in:
>>
>> %SystemRoot%\system32\mmc.exe "%1" %*
> ---End Quote---
> It prints C:\WINDOWS\system32\mmc.exe ""

Aha, so it seems the %1 and the %* are missing from the command line. Try running this:

echo %@regset[HKCR\MSCFile\Shell\Open\Command\,2,%%SystemRoot%%\system32\mmc.exe "%%1" %%*]

which should echo 0 if it succeeds.
 
May 20, 2008
11,400
99
Syracuse, NY, USA
On Tue, 09 Nov 2010 14:05:58 -0500, dim <> wrote:

|On 2010-11-09 18:45, CaesarR wrote:
|
|
|---Quote---
|>> echo %@regquery[HKCR\MSCFile\Shell\Open\Command\]
|>>
|>> ? On my system, it results in:
|>>
|>> %SystemRoot%\system32\mmc.exe "%1" %*
|> ---End Quote---
|> It prints C:\WINDOWS\system32\mmc.exe ""
|---End Quote---
|Aha, so it seems the %1 and the %* are missing from the command line. Try running this:
|
| echo %@regset[HKCR\MSCFile\Shell\Open\Command\,2,%%SystemRoot%%\system32\mmc.exe "%%1" %%*]
|
|which should echo 0 if it succeeds.

If he's going to do that, he should also change the type to 2 (REG_EXPAND_SZ).
He said it was 1 (REG_SZ). I'd use RegEdit ... clear the "(Default)" value,
change its type to REG_EXPAND_SZ, and give it the value:

%SystemRoot%\system32\mmc.exe "%1" %*
 

dim

Dimitry Andric
May 31, 2008
205
1
Netherlands
On 2010-11-09 23:34, vefatica wrote:

> If he's going to do that, he should also change the type to 2 (REG_EXPAND_SZ).
> He said it was 1 (REG_SZ). I'd use RegEdit ... clear the "(Default)" value,
> change its type to REG_EXPAND_SZ, and give it the value:

There's no need, %@regset[] can change the type and the value in one fell swoop.
 
Jun 3, 2008
27
0
On Tue, 09 Nov 2010 17:58:14 -0500, dim <> wrote
Re RE: [Support-t-2412] %systemroot% doesn't expand:


>On 2010-11-09 23:34, vefatica wrote:
>
>
>---Quote---
>> If he's going to do that, he should also change the type to 2 (REG_EXPAND_SZ).
>> He said it was 1 (REG_SZ). I'd use RegEdit ... clear the "(Default)" value,
>> change its type to REG_EXPAND_SZ, and give it the value:
>---End Quote---
>There's no need, %@regset[] can change the type and the value in one fell swoop.

How would I use regset[] to do that? I don't know enough about regset
or the registry to attempt it.
 
Aug 9, 2009
229
1
dim


> On 2010-11-09 23:34, vefatica wrote:
>
>
> ---Quote---
> > If he's going to do that, he should also change the type to 2 (REG_EXPAND_SZ).
> > He said it was 1 (REG_SZ). I'd use RegEdit ... clear the "(Default)" value,
> > change its type to REG_EXPAND_SZ, and give it the value:
> ---End Quote---
> There's no need, %@regset[] can change the type and the value in one fell swoop.

Using @regset[] leaves it open to TYPO's using the GUI doesn't
It has its advantages but for simplicity the GUI is damn near perfect all the time!
 
May 20, 2008
3,515
4
Elkridge, MD, USA
----- Original Message -----
From: Kachupp
To: ESFabian@comcast.net
Sent: Tuesday, 2010. November 9. 19:25
Subject: RE: [Support-t-2412] %systemroot% doesn't expand


dim



Quote:
> On 2010-11-09 23:34, vefatica wrote:
>
>
> ---Quote---
> > If he's going to do that, he should also change the type to 2 (REG_EXPAND_SZ).
> > He said it was 1 (REG_SZ). I'd use RegEdit ... clear the "(Default)" value,
> > change its type to REG_EXPAND_SZ, and give it the value:
> ---End Quote---
> There's no need, %@regset[] can change the type and the value in one fell swoop.

Using @regset[] leaves it open to TYPO's using the GUI doesn't
It has its advantages but for simplicity the GUI is damn near perfect all the time!


Really? You still need to type things, e.g., the name, value and type of a key, etc. - I presume you NEVER mistype into a GUI interface, only into a text-mode interface!
--
Steve
 
Aug 9, 2009
229
1
>
> dim
>
>
>
> Quote:
> > On 2010-11-09 23:34, vefatica wrote:
> >
> >
> > ---Quote---
> > > If he's going to do that, he should also change the type to 2 (REG_EXPAND_SZ).
> > > He said it was 1 (REG_SZ). I'd use RegEdit ... clear the "(Default)" value,
> > > change its type to REG_EXPAND_SZ, and give it the value:
> > ---End Quote---
> > There's no need, %@regset[] can change the type and the value in one fell swoop.
>
> Using @regset[] leaves it open to TYPO's using the GUI doesn't
> It has its advantages but for simplicity the GUI is damn near perfect all the time!
>
>
> Really? You still need to type things, e.g., the name, value and type of a key, etc. - I presume
> you NEVER mistype into a GUI interface, only into a text-mode interface!
> --
> Steve

TYPO errors in the @regset[HIVE KEY NAMES] those silly little typos that SLIP IN
 
Similar threads
Thread starter Title Forum Replies Date
vefatica Setting array variable ignores leading spaces (and @execarray doesn't) Support 4
MickeyF Why doesn't my python program get executed without specifying its path? Support 2
gworley Virtual network drive filename completion doesn’t get directories Support 0
vefatica Win10's ANSI doesn't like 2>NUL Support 10
vefatica Win10, alternative screen buffer, cursor doesn't blink Support 11
M Trying to use ffind with a @file.lst doesn't work Support 4
Charles Dye Ctrl-Shift-Up doesn't update directory history Support 1
gschizas Take Command (Environment) doesn't show v2 ANSI colors Support 30
vefatica Fixed JOBS /K doesn't work Support 2
E Fixed SHRALIAS doesn't work / SHRALIAS.EXE is missing in v20.11.35 Support 2
D WAD Reboot doesn't shutdown or restart Support 13
M Documentation Q.Search doesn't support selection? Support 1
R Fixed 7ZIP Compression Method Option Doesn't Work Support 1
T Regex engine doesn't recognize native DOS line endings Support 2
E Fixed DEDUPE doesn't handle filenames with whitespace properly when symlinking Support 1
D Docking doesn't persist Support 5
E WAD DESCRIBE under TCC 19 doesn't work with diacritics Support 14
C VIEW PRINT /Wrap doesn't work Support 0
D CD doesn't always find everything Support 8
M View doesn't recognize Ctrl+End and Ctrl+Pos1 Support 2
M Ctrl-End doesn't work. DelToEnd is not executed Support 13
B Fixed FFIND doesn't find last character in file without CR/LF at EOF Support 1
G .BTM association doesn't work anymore Support 1
jadaml Documentation Is COPY realy doesn't work for any HTTP and FTP? Support 3
D do /s doesn't recurse Support 1
D WAD Alt-Left doesn't work, but Alt-Shift-Left does Support 1
I How to? Bat Works but BTM Doesn't Support 6
B %@lines doesn't count last line without cr/lf at eof Support 1
williamleara WAD ribbon doesn't remember expand/collapse setting Support 3
vefatica Why doesn't "IDE %_ININAME" work? Support 4
M How to? /Elevated doesn't do it for me... Support 8
D Why doesn't ffind find directory? Support 3
Phileosophos TPIPE doesn't work at all with v16 Support 3
D ejectmedia doesn't work in v16 Support 2
Phileosophos Fixed Register for all users doesn't register for all users Support 10
T "Checking for a newer version" doesn't complete Support 18
vefatica Doesn't IDE auto-indent? Support 3
C FFind /w works but FFind /= doesn't? Support 2
noahcoad WAD cmd.exe under tcc doesn't find apps Support 4
vefatica Fixed TPIPE doesn't /SPLIT at characters Support 0
M Site doesn't recognise cookies Support 0
D What's New doesn't mention copydir movedir Support 25
D TIMER OFF doesn't work Support 21
M @Files sure doesn't work the way I would have assumed it did! Support 4
M Why doesn't this @Field function work? Support 0
M Why doesn't this work? Support 12
vefatica ON BREAK doesn't always work Support 23
K_Meinhard Fixed ? TCMD 14.02 doesn't start here Support 4
Stefano Piccardi 14.01.33 unset doesn't complain about undefined variables Support 8
J VIEW doesn't work again Support 16

Similar threads