Welcome!

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

SignUp Now!

%systemroot% doesn't expand

Nov
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
 
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.
 
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?
 
---- 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
 
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.
 
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" %*
 
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.
 
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.
 
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!
 
----- Original Message -----
From: Kachupp
To: [email protected]
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
 
>
> 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

Back
Top