%USERNAME% does not get set

  • Thread starter Thread starter Ted Lind
  • Start date Start date
T

Ted Lind

I have an XP workstation and am on the domain of a MS SBS2003 server. The
"My Documents" folder of all users has been redirected to the server. A
couple of days ago I found that when I clicked on my My Documents folder, I
got an error message that the folder could not be found. When I look at the
path name it tried to use, it is correct except were my username should be
is the environment variable %USERNAME%. This must get set at logon but
apparently is no longer being initialized. I suspect there is a place on the
local machine where this variable gets set to the username of the person who
is logging on to the computer.

All other aspects of both the server and my workstation appear to be normal.
I also did not install software or made any changes I know of. Everything
was working fine and then a few hours later, were not. I did a system
restore to several days before the occurance of the problem with no effect.

Other observations: If I log in at a different workstation, I am able to
access the My Documents (on the server) folder and the path name is set
correctly. If someone else logs in at my workstation, they cannot access
their My Documents (on the server) folder.

I would appreciate any ideas on how to resolve this problem. Right now the
only thing I can think of is to set myself up as a new user and see if I can
access the redirected my documents on the new account. If so, migrate
everything to the new account and hope it still works. Beyond that,
completly reset up the computer from scratch.

Thanks.
 
Ted Lind said:
I have an XP workstation and am on the domain of a MS SBS2003 server. The
"My Documents" folder of all users has been redirected to the server. A
couple of days ago I found that when I clicked on my My Documents folder, I
got an error message that the folder could not be found. When I look at the
path name it tried to use, it is correct except were my username should be
is the environment variable %USERNAME%. This must get set at logon but
apparently is no longer being initialized. I suspect there is a place on the
local machine where this variable gets set to the username of the person who
is logging on to the computer.

All other aspects of both the server and my workstation appear to be normal.
I also did not install software or made any changes I know of. Everything
was working fine and then a few hours later, were not. I did a system
restore to several days before the occurance of the problem with no effect.

Other observations: If I log in at a different workstation, I am able to
access the My Documents (on the server) folder and the path name is set
correctly. If someone else logs in at my workstation, they cannot access
their My Documents (on the server) folder.

I would appreciate any ideas on how to resolve this problem. Right now the
only thing I can think of is to set myself up as a new user and see if I can
access the redirected my documents on the new account. If so, migrate
everything to the new account and hope it still works. Beyond that,
completly reset up the computer from scratch.

Thanks.

Open a Command Prompt, then type the command
user {Enter}

What do you get?
 
Typing in "useer" at the command prompt does nothing. It is not a valid
command for that environment. If I type "set" instead all the environment
variables show. in the list is username = tedlind which is as it should be.
Unfortunately when I try to click on "My Documents" it fails because the
path does not contain my username. It is replaced by
\%USERNAME%\
and cannot find the folder on the server.
I actually tried resetting the variable in the cmd screen with no luck. I
also went to My Computer (properties), Advanced, Environment Variables and
tried to set it there without any sucess.

I tried restoring the system to an earler time ( a few days) with no luck.

The only way I have been able to resolve the problem is to set up a new
account for myself on the server and migrate everything to the new account.
The old account still cannot find "My Documents" the new account works fine.
I have no idea what caused it. There were no software installations or
changes. I know it was working properly about 9 in the morning an by noon I
had the problem. Only normal data entry and word processing was done in that
interval. \
 
Good to see that you solved your problem.

The underlying cause is that the registry value that refers
to "%UserName%" is of the wrong type. It should be
REG_EXPAND_SZ, not REG_SZ. I suspect that something
you or someone else installed on your PC modified it.
 
Back
Top