Setting %USERNAME% in windows 7

Gekitotsu

New member
Local time
9:11 AM
Messages
2
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

OS
Windows 7 Professional 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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 7 Ultimate x64
CPU
Intel Core i7 2600K (O/C 4.7GHz)
Motherboard
Asus ROG Maximus IV Extreme-Z - Intel Z68 Chipset
Memory
8GB Corsair Vengeance LP, DDR3, 1600Mhz
Graphics Card(s)
Nvidia GTX 460 Graphics Card
Sound Card
Onboard
Monitor(s) Displays
Dell E228WFP
Hard Drives
2 x 500GB Samsung SpinPoint Drives (1 for OS, 1 for Data and Apps)
PSU
CoolerMaster 1000W
Case
CoolerMaster HAF
Cooling
Air
Internet Speed
Fibre - 60MB Down, 30MB Up
Antivirus
ESET NOD32 Antivirus
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

Computer Manufacturer/Model Number
Custom build
OS
Windows 7 Ultimate SP1 x64
CPU
i7 950 4ghz
Motherboard
EVGA x58 FTW3
Memory
6GB G.Skill pc12800
Graphics Card(s)
EVGA GTX 580 SC
Sound Card
Xfi Titanium
Monitor(s) Displays
Samsung 24"
Screen Resolution
1920x1200
Hard Drives
Vertex 3 SSD 120Gb x2 RAID 0
4 x 1TB WD Black RAID 0
PSU
Thermaltake 850
Case
Mountain Mods U2-UFO Horizon
Cooling
Custom watercooling
Internet Speed
100 down 5 up
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

OS
Windows 7 Professional x64
Back
Top