Link to home
Start Free TrialLog in
Avatar of or1969
or1969

asked on

How to determine if a user profile created on a terminal server is temporary

When a user loges on to a 2008 terminal server, how can I determine that the created profile is temporary?
Is there somewhere in the registry a key or value that will point if the profile is temporary?
Avatar of joyofsharing
joyofsharing
Flag of India image

Dear or1969,

Temporary profile are created as "Temp.<username>" so if we access the profile path of the system. i.e. %SystemDrive%\Documents and Settings.

While accessing the above profile path, we can easily identify the which user profile is created as temporary profile.


joyofsharing
Avatar of or1969
or1969

ASKER

joyofsharing,

I appreciate your reply.

My problem is that it is not always clear when the folder is temp or not. and here's an example:

When a user loges on to his machine for the first time, a folder with his name will be created (C:\USERS\USERNAME). When he logs on to the same machine with the same name but to his account on the domain the following folder will be created, C:\USERS\USERNAME.DOMAIN.

A temp folder will be (in this situation) TEMP, TEMP.001, TEMP.002

On the other hand, when the user loges on to a machine using his domain account for the first time a folder with his name will be created (C:\USERS\USERNAME).

A temp folder in this case can be TEMP, TEMP.001 but it also can be USERNAME.DOMAIN, USERNAME.DOMAIN.001 and so on.

As USERNAME.DOMAIN might be both normal or temporary, what is the know?
Also, when you open System Properties>User Profiles, The system shows all profiles on current machine and if the profile is local, roaming or temp. Is there a location in the registry or (other place) I can see this list? or get the profile type? Or maybe a WMI or VBS or C# code that can get these values?

OR
ASKER CERTIFIED SOLUTION
Avatar of joyofsharing
joyofsharing
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial