PC Review


Reply
Thread Tools Rate Thread

Can changed username in User Accounts be set as environment variab

 
 
=?Utf-8?B?dGhlR2Vlaw==?=
Guest
Posts: n/a
 
      31st Jul 2005
In Control Panel -> User Accounts, XP gives users the option to change their
username. After changing names, the user can then use this name for logon,
as well as use their original name as specified in the Documents and Settings
folder (both usernames direct to the same user account settings).

Now for the details of my question. There is an environment variable
%username% that is set on the original name of the user (the one in Docs and
Settings). Is there a variable that is set to the new name of the user
(changed in User Accounts) that I can access? If not, how and where can I
find this username specifically and set it as a variable? Note that the value
of this variable is different for each user, just as the variable %username%
is.

Any Suggestions?
 
Reply With Quote
 
 
 
 
Ramesh, MS-MVP
Guest
Posts: n/a
 
      31st Jul 2005
theGeek,

See "ProfileImagePath" part in this article section "To move only
user-specific data".

http://support.microsoft.com/kb/314843/

Read the "WARNING" statement as well, and take a full system backup using
ERUNT.

From "Registry Hives" MSDN article:

"The supporting file for the user profile hive for a particular user is
located in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\
CurrentVersion\ProfileList\SID\ProfileImagePath, and is named Ntuser.dat.
The value of ProfileImagePath is a binary representation of the directory
name of the user's profile, which includes the user's name. Use the Registry
Editor to display this binary value as a string."

Alternately, you may create a new user account, and then use the "Copy To"
option to create a duplicate account in your prefered name.

--
Ramesh, Windows XP MVP
http://windowsxp.mvps.org


"theGeek" <(E-Mail Removed)> wrote in message
news:971925D7-1AB2-43D2-8B2A-(E-Mail Removed)...
> In Control Panel -> User Accounts, XP gives users the option to change
> their
> username. After changing names, the user can then use this name for
> logon,
> as well as use their original name as specified in the Documents and
> Settings
> folder (both usernames direct to the same user account settings).
>
> Now for the details of my question. There is an environment variable
> %username% that is set on the original name of the user (the one in Docs
> and
> Settings). Is there a variable that is set to the new name of the user
> (changed in User Accounts) that I can access? If not, how and where can I
> find this username specifically and set it as a variable? Note that the
> value
> of this variable is different for each user, just as the variable
> %username%
> is.
>
> Any Suggestions?


 
Reply With Quote
 
=?Utf-8?B?dGhlR2Vlaw==?=
Guest
Posts: n/a
 
      1st Aug 2005
Thanks for the suggestion. I believe I found an alternate solution to my
question.

I do not mind having my original username in Docs and Settings, I just want
a variable that refered to my new username that I set in User Accounts. I
found out why my new username was not showing up when I accessed Run ->
control userpasswords2. I checked out the properties associated with my
username, looked in the General Tab and found out that the Username box
contained my original username (Docs and Settings) and the Full Name box
contained my new username (set in User Accounts). So, I flipped the names
and put them where I wanted them to be. After checking that I was still in
the proper users group as a safety, I rebooted. Found out that that what is
listed in the Full Name box appears in the Start Menu and Windows Logon
Screen. As for what is in the Username box, the environment variable
%username% shows my new name as I wanted it to.

Again, thanks for your comment.


"theGeek" wrote:

> In Control Panel -> User Accounts, XP gives users the option to change their
> username. After changing names, the user can then use this name for logon,
> as well as use their original name as specified in the Documents and Settings
> folder (both usernames direct to the same user account settings).
>
> Now for the details of my question. There is an environment variable
> %username% that is set on the original name of the user (the one in Docs and
> Settings). Is there a variable that is set to the new name of the user
> (changed in User Accounts) that I can access? If not, how and where can I
> find this username specifically and set it as a variable? Note that the value
> of this variable is different for each user, just as the variable %username%
> is.
>
> Any Suggestions?

 
Reply With Quote
 
Ramesh, MS-MVP
Guest
Posts: n/a
 
      2nd Aug 2005
No problem, theGeek. Thanks for posting back.

--
Ramesh, Windows XP MVP
http://windowsxp.mvps.org


"theGeek" <(E-Mail Removed)> wrote in message
news:A4F7615B-A30B-474E-A242-(E-Mail Removed)...
> Thanks for the suggestion. I believe I found an alternate solution to my
> question.
>
> I do not mind having my original username in Docs and Settings, I just
> want
> a variable that refered to my new username that I set in User Accounts. I
> found out why my new username was not showing up when I accessed Run ->
> control userpasswords2. I checked out the properties associated with my
> username, looked in the General Tab and found out that the Username box
> contained my original username (Docs and Settings) and the Full Name box
> contained my new username (set in User Accounts). So, I flipped the names
> and put them where I wanted them to be. After checking that I was still
> in
> the proper users group as a safety, I rebooted. Found out that that what
> is
> listed in the Full Name box appears in the Start Menu and Windows Logon
> Screen. As for what is in the Username box, the environment variable
> %username% shows my new name as I wanted it to.
>
> Again, thanks for your comment.
>
>
> "theGeek" wrote:
>
>> In Control Panel -> User Accounts, XP gives users the option to change
>> their
>> username. After changing names, the user can then use this name for
>> logon,
>> as well as use their original name as specified in the Documents and
>> Settings
>> folder (both usernames direct to the same user account settings).
>>
>> Now for the details of my question. There is an environment variable
>> %username% that is set on the original name of the user (the one in Docs
>> and
>> Settings). Is there a variable that is set to the new name of the user
>> (changed in User Accounts) that I can access? If not, how and where can
>> I
>> find this username specifically and set it as a variable? Note that the
>> value
>> of this variable is different for each user, just as the variable
>> %username%
>> is.
>>
>> Any Suggestions?


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Outlook could not create work file. Check temp environment variab Gerry Microsoft Outlook Discussion 0 14th Mar 2008 07:28 PM
Can changed username in User Accounts be set as environment variab =?Utf-8?B?dGhlR2Vlaw==?= Windows XP Customization 0 31st Jul 2005 07:55 AM
How to: User Form to assign a user defined range to a macro variab =?Utf-8?B?VHJldlRyYXY=?= Microsoft Excel Programming 1 22nd Mar 2005 07:57 PM
Changed user accounts programs don't run =?Utf-8?B?am9zaA==?= Windows XP New Users 1 29th May 2004 07:48 AM
Limiting user accounts on certain computers In AD environment Sean Microsoft Windows 2000 Active Directory 1 25th May 2004 11:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:18 PM.