Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Setting %USERNAME% in windows 7

15 Nov 2011   #1
Gekitotsu

Windows 7 Professional x64
 
 
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 System SpecsSystem Spec
.
15 Nov 2011   #2
Dave Atkin

Windows 7 Ultimate x64
 
 

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 System SpecsSystem Spec
15 Nov 2011   #3
Sedril

Windows 7 Ultimate SP1 x64
 
 

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 System SpecsSystem Spec
.

16 Nov 2011   #4
Gekitotsu

Windows 7 Professional x64
 
 

Quote   Quote: Originally Posted by Dave Atkin View Post
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 System SpecsSystem Spec
Reply

 Setting %USERNAME% in windows 7




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
windows 7 sysprep keep asking for username
i created an answer key with windows system image manager for windows 7 professional 64 bit. everything works fine. but when i run sysprep with it keeps asking me for a username is there a way to not ask for username during sysprep and only ask for computer name. i created a local profile on there...
General Discussion
Windows 7: Can't change setting System Properties > network ID setting
I am trying to add a refurbished HP system to my menagerie. It had Windows 7 Pro (64bit) installed when I got it. I went through the setup without any problems, created a user account for myself (Lewis), set the system name to TestPC and started installing and testing some software. Simple...
Network & Sharing
cant find username in windows.old
so my wife got some kind of virus or something on our old laptop which had vista, turn it on and it would say windows can't start. So we bought another laptop. I wanted to get it going again that way my daughter could watch her mickey on it, so I did some reading and got a windows 7 disc and...
General Discussion
How to change Uac setting to hide username
hi how do you hide my username when uac comes up i have added a picture. This is mine looks like but it shows my username amd we cant show it due its a business http://cdn-static.zdnet.com/i/story/60/80/007752/uac_windows.jpg This is what it needs to look like
General Discussion
Is there a way to change Windows 7 username?
I pretty much forgot the "D" after the "E" in powered Can i rectify that or if not Np
Chillout Room
Change windows username (ComputerName/Username
I set up my computer a long time ago with a stupid username, and I wanna know how to change it. I can change my logon username, but not the actual username (COMPUTERNAME/Username) or the user directory (C:/Users/USERNAME).
Software


Our Sites

Site Links

About Us

Find 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 15:31.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App