Strange error: unset /s

Oct 29, 2008
88
0
(Elevated prompt under Windows 7)

Code:
129G C:\Users\johnb# set /s foo=foo

129G C:\Users\johnb# unset /s foo

TCC: (Sys) The system cannot find the file specified.
129G C:\Users\johnb# unset /s foo
TCC: Not in environment "foo"

129G C:\Users\johnb# ver

TCC  12.00.41   Windows 7 [Version 6.1.7600]
(The variable is removed the first time, but gives an error message.)
 
May 20, 2008
603
0
Sammamish, WA
Running elevated in a stand-alone TCC prompt, I do not see your behavior.
TCC 12.00.41 Windows 7 [Version 6.1.7600]
TCC Build 41 Windows 7 Build 7600



On Tue, Dec 7, 2010 at 07:31, jabelli <> wrote:


> (Elevated prompt under Windows 7)
>
>
> Code:
> ---------
> 129G C:\Users\johnb# set /s foo=foo
>
> 129G C:\Users\johnb# unset /s foo
>
> TCC: (Sys) The system cannot find the file specified.
> 129G C:\Users\johnb# unset /s foo
> TCC: Not in environment "foo"
>
> 129G C:\Users\johnb# ver
>
> TCC 12.00.41 Windows 7 [Version 6.1.7600]
> ---------
> (The variable is removed the first time, but gives an error message.)
>
>
>
>
>



--
Jim Cook
2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Monday.
 

rconn

Administrator
Staff member
May 14, 2008
12,344
149
(Elevated prompt under Windows 7)

Code:
129G C:\Users\johnb# set /s foo=foo
 
129G C:\Users\johnb# unset /s foo
 
TCC: (Sys) The system cannot find the file specified.
129G C:\Users\johnb# unset /s foo
TCC: Not in environment "foo"
 
129G C:\Users\johnb# ver
 
TCC  12.00.41   Windows 7 [Version 6.1.7600]
(The variable is removed the first time, but gives an error message.)

Not reproducible here.

Do you have any aliases for SET and/or UNSET?
 
Oct 29, 2008
88
0
I traced the code and the only way I can see to get that error message is if you somehow passed a /R to the UNSET command.
Well, it's not an alias, it's something in my .ini. Please find it attached here.
 

Attachments

  • TCMD.INI.txt
    1.8 KB · Views: 94

rconn

Administrator
Staff member
May 14, 2008
12,344
149
Well, it's not an alias, it's something in my .ini. Please find it attached here.

I tried it with your TCMD.INI, and still can't reproduce it here.

Are you saying that when you removed/renamed your TCMD.INI, the problem went away?

I can't think of anything in TCMD.INI that would be relevant; TCSTART would be more likely.
 
Oct 29, 2008
88
0
I tried it with your TCMD.INI, and still can't reproduce it here.

Are you saying that when you removed/renamed your TCMD.INI, the problem went away?

I can't think of anything in TCMD.INI that would be relevant; TCSTART would be more likely.
Yes. That's exactly what I did. I renamed TCSTART.btm to TCSTART.btm.disabled. All it does anyway is load SHRALIAS and fill up the alias/function/histories, establish a function required by the prompt/titleprompt if it wasn't loaded, and set the prompts. The error persists. Rename TCMD.ini and there's no problem. I will comment out bits and see what happens.
 

Attachments

  • tcstart.btm.txt
    1.6 KB · Views: 89
Oct 29, 2008
88
0
Yes. That's exactly what I did. I renamed TCSTART.btm to TCSTART.btm.disabled. All it does anyway is load SHRALIAS and fill up the alias/function/histories, establish a function required by the prompt/titleprompt if it wasn't loaded, and set the prompts. The error persists. Rename TCMD.ini and there's no problem. I will comment out bits and see what happens.
It's when "Update Environment on System Change" / SettingChange is on that I get the error.
 
Oct 29, 2008
88
0
No plugins. This is the 32-bit version; I will try 64 when I get home tonight.
More information: I run as a standard user, and use a different account to elevate. If I log in as the admin account and elevate from there, I do not get the error message.
 

rconn

Administrator
Staff member
May 14, 2008
12,344
149
This turns out to be a known Windows bug (since Vista -- apparently Microsoft isn't in any tearing hurry to fix it).

It doesn't have anything to do with UNSET.

It doesn't have anything to do with SET.

It doesn't even have anything to do with the System environment.

It's because of the WM_SETTINGCHANGE message. TCC is trying to update its local environment when it gets the message and before displaying the prompt. But when you are logged on as a normal user and running TCC as an administrator with another user's credentials, Windows returns an error when trying to access the Volatile environment -- but only if that other user is not currently logged on (or sometimes, if they've never been logged on since the last reboot).

Not much I can do about it other than just ignore the error result (though that may have some other undesirable results -- like if you were expecting an update from the Volatile environment, and wondered why it kept going to the Great Bit Bucket in the Sky).
 
Oct 29, 2008
88
0
This turns out to be a known Windows bug (since Vista -- apparently Microsoft isn't in any tearing hurry to fix it).

It doesn't have anything to do with UNSET.

It doesn't have anything to do with SET.

It doesn't even have anything to do with the System environment.

It's because of the WM_SETTINGCHANGE message.

Yeah, I was thinking WM_SETTINGCHANGE once i found out exactly which entry was causing the problem. Thanks for checking this. Since it's a Windows bug, I'll just ignore it, and not expect any volatile environment updates unless I log in the other user.

Perhaps this might be a good thing to put in the help file?
 

rconn

Administrator
Staff member
May 14, 2008
12,344
149
Perhaps this might be a good thing to put in the help file?

IMO really obscure Windows bugs that pop up once in 10 years don't really merit inclusion in the help. I don't even know how I could describe it that wouldn't generate more confusion, and require more documentation!

And the chances that (1) somebody else will ever run into this, (2) and actually look for a reference to it in the help file seem vanishingly remote.
 
Similar threads
Thread starter Title Forum Replies Date
M Strange error messages from TCC in FTP copy Support 7
vefatica REGDIR, strange error message Support 7
A strange error in alias Support 9
J ASSOC / FTYPE strange error message Support 3
R strange bug? Support 7
Jesse Heines Strange Line Wrapping Behavior Support 14
F strange results Support 9
M Another possibly strange remote registry issue Support 5
forbin Strange handling of [nonbright] magenta background (v22) Support 2
N Fixed Strange dir behavior Support 6
T WAD Strange Unexpected "features" in the Debugger Support 2
P Strange mouse behavior with list Support 2
vefatica Strange tcc.exception.log Support 7
vefatica A strange one Support 0
D Strange DO behavior with /O Support 5
Glenn Bowes Strange text at startup Support 5
Steve Pitts WAD Strange output from DEL of a non-existent directory Support 7
vefatica Big numbers, strange errors Support 1
aedthuio Strange... lpksetup Support 4
CWBillow dir /4 strange Support 2
D Strange issue with FOR loop Support 15
MikeBaas Strange prob with %@replace.. Support 4
vefatica OT: strange files in %TEMP Support 10
Dan Glynhampton Documentation v15 help: Strange links in @INT topic Support 0
R WAD Strange output from "memory" command Support 1
M Yet another strange something re something called "@TCONVERT" Support 8
Roedy How to? Strange colours Support 9
M WAD Strange "Start" misbehavior... Support 10
vefatica Very strange console font corruption Support 3
Steve Pitts Strange problem with FREE Support 10
newgeekorder Debugger IDE - strange tab and parameter behaviour Support 1
Exolon Strange Prompt. Support 6
vefatica Strange folders Support 1
T Strange CPU value Support 3
M Strange behavior... Support 2
CWBillow Strange happenings Support 2
B Strange handling of a .BAT file Support 5
vefatica Strange behavior reloading SHRALIAS sav files. Support 1
D Strange crashes in @CRC32 and @MD5 Support 9
Charles Dye Strange output, here-doc redirection, TYPE, //UnicodeOutput=Yes Support 6
S Strange CHKDSK behavior Support 6
vefatica Strange results with CP 1252 Support 12
S Strange REN problem - non-English characters Support 3
dcantor Strange status in ACTIVATE command Support 0
C Copy (sys) error Support 3
T Error: This page can’t be displayed Make sure the web address //ieframe.dll/dnserrordiagoff.htm# is correct. Support 8
kb6ojs How to? "Specified Account Already Exists" error installing TCMD v27 Support 12
samintz How to? Abort on error DO loop Support 10
mfarah Fixed The DATE command produces the wrong error message. Support 1
vefatica ON ERROR terminates DO loop. Support 0

Similar threads