Environment variable USERNAME on windows 2008 SP2
Hi all, Just a little question, why the environment variable is define to USERNAME=SYSTEM Can i delete this variable, we have trouble with a service that start with a user profil but keep this variable Why this variable is here ? What is the reason ?
July 9th, 2010 8:35pm

Hi, username should be set to the user name of the currently logged on user. Is the service running as the local system account instead of a user account? This can be checked by going to start -> control panel -> administrative tools -> services. Here the service properties -> logon tab should show the user that the service is running as. If the user logs on interactively, is the variable set correctly? The easiest way to check this is to open a command prompt and type set and press enter. This variable is meant to hold the user name of the currently logged on user, http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx?mfr=true -- Mike Burr
Free Windows Admin Tool Kit Click here and download it now
July 10th, 2010 2:08am

Hi, The service is launch with a user, when i logon with this user, the variable is OK, but in non interactive session (when the service launch a command) i made a set command and th result is : ...... USERNAME=SYSTEM USERNAME=testuser ...... Very strange, but when i made a echo %USERNAME% after the set command the result is USERNAME=SYSTEM So USERNAME=testuser do not replace the system variable. To correct the problem i need to delete the system environment variable USERNAME=SYSTEM My question is why this variable is put by default on windows VISTA/2008/7 system (not on 2000/XP/2003) ? Can i delete ?
July 10th, 2010 10:05am

Hi, I went ahead and tried this and I didn't notice any immediate effect and I could not find documentation that describes any potential problems; however I would be uncomfortable with removing the variable without more extensive testing. If there is a workaround available, I would still go that route first. If I might ask, why is this variable causing problems? When I logged in after removing the variable, the %username% variable was still set to my username (presumably a user variable instead of a system variable). I read some old documentation going back to Windows 2000 that the environment variables for the system are not actually changed until the system is restarted and the environment variables for a user are set when the user logs on.-- Mike Burr
Free Windows Admin Tool Kit Click here and download it now
July 10th, 2010 9:56pm

Hi, I'm not the only one with this problem, this is the same that this one : https://fogbugz.bitvise.com/default.asp?WinSSHD.1.12003 So... ?
July 11th, 2010 12:48am

Hi, I'm not the only one with this problem, this is the same that this one : https://fogbugz.bitvise.com/default.asp?WinSSHD.1.12003 So... ? Hello, and if i read that article correct, the solution is included.Best regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
July 11th, 2010 1:15am

Yes, but my question is why the environment variable is define to USERNAME=SYSTEM by default and not in XP/2000/2003 ?
July 11th, 2010 11:36pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics