Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clean user profiles

Status
Not open for further replies.

Leozack

MIS
Oct 25, 2002
867
GB
Hi all
Sometimes our win7 citrix users get problems that seem to relate to just them aka profile related so we redo them.
They reside on a \\server\share$\username\win7_x86 basis
I found myself creating a win7_x86.bak folder, copying contents of win7_x86 into there (rather than renaming original, this means you keep the properties of the original folder aka user is owner and has full access), getting the user to login to generate a new profile, log out, then I'd copy back in their desktop icons, then they'd log in again and I'd configure their outlook etc.

This got boring so I thought I'd write a script to do it - and since it was scripted it could also pull things out of the registry if needed.
So now I've made a script that :
Asks questions as to the type of profile being done and which things you want to restore
Renames the win7_x86 folder to win7_x86-dd-mm-yyyy
Tells you to wait while the user logs on then off
If selected it copies back the desktop icons, the outlook signatures, chrome bookmarks, and sticky notes
If selected it rips the outlook profile info from the ntuser.dat and imports it into the new one
If selected it rips the windows theme info from the ntuser.dat and imports it into the new one (newly created profiles seemed broken/ugly)

What I wanted to do was remove the awkward part of getting the user logon/logoff so instead I've tried to get it to
Copies the "default user" folder from \\domain\netlogon share to \\server\share\username\win7_x86
But I've had issues with permissions and on my final tests before leaving late today I found that a profile I did that with for some reason didn't seem to load the desktop icons or outlook profile even if it was copied in etc :|

I guess I was just curious if someone's already wasted the time to get something like this to work or can "ahah" what I would need to do faster than I do! I've not had much concentrated time to fiddle/test it which doesn't help :( I know as with making mandatory profiles and the like people are often left to hack away however they can to make what should be obvious work (thanks MS).

_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
First of all, keep in mind that the "Default" user profile in Windows is just a template that doesn't contain all the necessary components/settings that a working profile requires. When a new user signs in, the missing pieces are created or filled in. The problem with your approach is that you are providing some of those pieces, but it's not nearly enough, and therefore the profile doesn't behave as expected.

If the number of Citrix users in your environment is a relatively small amount, then an alternative approach might be to make a backup of each user's profile when it's in a working state (keep in a backup location for future restores). Then the next time there's an issue, configure your script to simply rename the corrupt profile at "\\server\share$", pull out data from the corrupt profile like you did before, restore the backed up profile by copying it from the backup location into "\\server\share$", then have the script finish by overwriting older files/shortcuts/registry settings with the data you just pulled out of the corrupt profile. I can't think of another way to script it without customizing the default user profile.



-Carl
"The glass is neither half-full nor half-empty: it's twice as big as it needs to be."

[tab][navy]For this site's posting policies, click [/navy]here.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top