Setting %USERNAME% in windows 7


  1. Posts : 2
    Windows 7 Professional x64
       #1

    Setting %USERNAME% in windows 7


    I have a laptop with a company that uses a domain server.
    There are no local accounts on the company laptops, but you can still log in using previous credentiails.

    My problem:
    When I log in without the domain present (Example: Network cable unplugged) to get on the company wireless or VPN from home, the %USERNAME% variable is set to upper case.
    This wouldn't be a huge issue, except that some programs/scripts rely on the username variable being lowercase.

    My question: Is there a way to force the username lowercase, when logging in to a system without the domain present?

    I've tried changing it in the registry (HKCU\Volitale Environment) tried setting it in Environment Variables and tried setx USERNAME xxx /m

    Any other ideas?
      My Computer


  2. Posts : 543
    Windows 7 Ultimate x64
       #2

    Hello,

    Wouldnt it be easier to change the scripts?

    In Windows the username shouldnt matter if it is in upper case or not.


    Dave
      My Computer


  3. Posts : 109
    Windows 7 Ultimate SP1 x64
       #3

    Would they let you add the user account as a local admin? That's what I do sometimes for our users at work, they can have rights on their local computer but not on my domain...
      My Computer


  4. Posts : 2
    Windows 7 Professional x64
    Thread Starter
       #4

    Dave Atkin said:
    Wouldnt it be easier to change the scripts?
    I wish it were easier. Working on it that way, too.

    And users can make local accounts, but then again, certian software will not work correctly if they are not <domain>\<user>.

    Its a big hassle.

    After a few tests, I've noticed setx can change variables for the system, but username seems to be read only. Anytime I try to set it, it will stay uppercase unless I'm connected to the domain.

    We are working on changing things over for these vpn users.. but if we could have a way to just.. run a little script on startup, or on demand that can set the username to lowercase for us, it would solve our issues much easier than trying to get all the different departments to check case in their scripts.

    Any ideas would be helpful!
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:54.
Find Us