1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Strange error: unset /s

Discussion in 'Support' started by jabelli, Dec 7, 2010.

  1. jabelli

    Joined:
    Oct 29, 2008
    Messages:
    83
    Likes Received:
    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.)
     
  2. Jim Cook

    Joined:
    May 20, 2008
    Messages:
    605
    Likes Received:
    0
    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:




    --
    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.
     
  3. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,726
    Likes Received:
    80
    Not reproducible here.

    Do you have any aliases for SET and/or UNSET?
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,726
    Likes Received:
    80
    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.
     
  5. jabelli

    Joined:
    Oct 29, 2008
    Messages:
    83
    Likes Received:
    0
    Well, it's not an alias, it's something in my .ini. Please find it attached here.
     

    Attached Files:

  6. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,726
    Likes Received:
    80
    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.
     
  7. jabelli

    Joined:
    Oct 29, 2008
    Messages:
    83
    Likes Received:
    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.
     

    Attached Files:

  8. jabelli

    Joined:
    Oct 29, 2008
    Messages:
    83
    Likes Received:
    0
    It's when "Update Environment on System Change" / SettingChange is on that I get the error.
     
  9. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,726
    Likes Received:
    80
    Still not reproducible here, regardless of the value of that setting.

    Do you have any plugins loaded?
     
  10. jabelli

    Joined:
    Oct 29, 2008
    Messages:
    83
    Likes Received:
    0
    No plugins. This is the 32-bit version; I will try 64 when I get home tonight.
     
  11. jabelli

    Joined:
    Oct 29, 2008
    Messages:
    83
    Likes Received:
    0
    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.
     
  12. jabelli

    Joined:
    Oct 29, 2008
    Messages:
    83
    Likes Received:
    0
    Same results on 64-bit.
     
  13. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,726
    Likes Received:
    80
    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).
     
  14. jabelli

    Joined:
    Oct 29, 2008
    Messages:
    83
    Likes Received:
    0
    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?
     
  15. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,726
    Likes Received:
    80
    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.
     

Share This Page