Jump to content

Frustrating Image Problem


kingsc

Recommended Posts

I apologize, its just that editing ntuser.dat is a new area for me. What would be the cleanest way of doing this?

Well most of the customizations were done to the OS already before installation on the reference machine so I guess all I really need to accomplish is making the My Docs, Pics, etc show up correctly. I did some desktop shortcuts, start menu modifications..... oh I wish I could remember now.

Link to comment
Share on other sites


You are asking for a world of hurt by trying to manually mess with the default user hive. The only way to properly do what you want is through a scripted installation, setting the registry at T-12.

The default user hive contains unique placeholders for SIDS, and other registry setting that get populated when a new user logs on. It also contains registry ACL's that won't transfer to another account properly if you use a hive from another user.

This is why good administrators don't deploy XP with images.

Link to comment
Share on other sites

You are asking for a world of hurt by trying to manually mess with the default user hive. The only way to properly do what you want is through a scripted installation, setting the registry at T-12.

The default user hive contains unique placeholders for SIDS, and other registry setting that get populated when a new user logs on. It also contains registry ACL's that won't transfer to another account properly if you use a hive from another user.

This is why good administrators don't deploy XP with images.

Wow..... this is why "good" administrators don't deploy XP with images? Are you kidding me? Maybe I'm misunderstanding you but I notice a bit of snobiness there? Good thing I'm not an administrator then, eh?

So what's your suggestion? Not use an image? Do an unattended install including installation and configurations of all programs? Imaging is just a small part of my job and I handle over 300 users. I think I would MUCH rather deal with an incorrectly named documents folder(Which isn't even used that often since all users are/should be saving their work on there home folders on network storage) that has had absolutely zero effect on any programs they use so far; and be able to re-image a computer in 14 minutes and it's ready to go.

Go ahead and try to tell my IT Manager you want to spend an hour plus setting up a computer. You wouldn't have a job for long.

EDIT - Long story short - I don't have time to learn scripted unattended installations, how RunOnceEx works with that, and to sit there and wait for a computer to the OS installed, setup, programs installed, setup, added to the domain, etc etc..

EDIT #2 - And don't tell me that's the only way, you can do ANYTHING with the right know-how. Acronis told me I couldn't create a universal image without paying them for an Universal Restore license for every seat we deploy due to hardware differences, and now I saved the company money and got a pay-raise to boot.

Edited by kingsc
Link to comment
Share on other sites

Well.... in my Virtual Machine in the default user profile I edited the desktop.ini to read:

[DeleteOnCopy]
Owner=%userprofile%
Personalized=5
PersonalizedName=My Documents

Works perfectly. Doesn't work when applied to my problem however. Bummer.

I guess the answer lies in ntuser.dat somewhere...

EDIT - Curious.... in the desktop.ini file..... why doesn't the [DeleteOnCopy] section get deleted when a new profile is created?? Hmm...

Edited by kingsc
Link to comment
Share on other sites

Kingsc, I've been in your shoes before!!

The [DeleteonCopy] only works if you actually copy the folder to another location.

My resolution was to create a user account and set it up as I like, copy the profile to the "Default User" profile. Browse to all the desktop.ini files and delete the Owner=**** section. I'd rather have it show "My Documents" then they all say "TestUsers's Documents"

Link to comment
Share on other sites

???

My Profile "My Documents" DESKTOP.INI looks as you've shown.

In other User-type Profiles they say "userx's Documents" and DESKTOP.INI looks as you've shown.

In All Users profile it shows as "Shared Documents" and the contents of DESKTOP.INI is

[.ShellClassInfo]

LocalizedResourceName=@shell32.dll,-21785

In Default Profile, there is NO DESKTOP.INI, but the folder shows as "My Documents". One may safely assume that since this profile is normally not "displayed" (hidden) that when a new User Profile is created that the DESKTOP.INI file is created inserting the new User Name and "My Documents" (the name of the folder in the Default Profile) information. The actual "setup" of the New User will not occur until they actually sign on. My bet is that it's "hard-wired" in some code and you're trying to defeat it.

That said, it's probably pointless to have a DESKTOP.INI in the Default folder. And you may also notice that all of the other folders (My Music, My Pictures, etc.) just don't exist in that folder when initial install is done. A "Dummy" folder, if you will, to allow creation of New Users, after which (when they sign on) everything is "created" for them. And each one of those "My Something" folders has a DESKTOP.INI in it and they all work the same. I believe these additional folders are created when for example Media Player is first started (only my profile has the additionals; this is a one-user plaything; never use the other profiles except to "test").

As was said before, all other info is in the NTUSER.DAT and there are unique SID's for each and every user. You can "Load Hive" the Default one and fiddle with it (dangerous!) if you really want certain things to happen when New created.

And you never did say what customizations you were going for. It may be that some of those things are more of a Policy issue.

Just tellin' ya what I have/what I "think".

Edited by submix8c
Link to comment
Share on other sites

???

My Profile "My Documents" DESKTOP.INI looks as you've shown.

In other User-type Profiles they say "userx's Documents" and DESKTOP.INI looks as you've shown.

In All Users profile it shows as "Shared Documents" and the contents of DESKTOP.INI is

[.ShellClassInfo]

LocalizedResourceName=@shell32.dll,-21785

In Default Profile, there is NO DESKTOP.INI, but the folder shows as "My Documents". One may safely assume that since this profile is normally not "displayed" (hidden) that when a new User Profile is created that the DESKTOP.INI file is created inserting the new User Name and "My Documents" (the name of the folder in the Default Profile) information. The actual "setup" of the New User will not occur until they actually sign on. My bet is that it's "hard-wired" in some code and you're trying to defeat it.

That said, it's probably pointless to have a DESKTOP.INI in the Default folder. And you may also notice that all of the other folders (My Music, My Pictures, etc.) just don't exist in that folder when initial install is done. A "Dummy" folder, if you will, to allow creation of New Users, after which (when they sign on) everything is "created" for them. And each one of those "My Something" folders has a DESKTOP.INI in it and they all work the same. I believe these additional folders are created when for example Media Player is first started (only my profile has the additionals; this is a one-user plaything; never use the other profiles except to "test").

As was said before, all other info is in the NTUSER.DAT and there are unique SID's for each and every user. You can "Load Hive" the Default one and fiddle with it (dangerous!) if you really want certain things to happen when New created.

And you never did say what customizations you were going for. It may be that some of those things are more of a Policy issue.

Just tellin' ya what I have/what I "think".

You are pretty much spot-on. Thank you and others for your replies. There's gotta be something coded somewhere that takes care of this outside of desktop.ini and maybe even ntuser.dat. Let me see if I can summarize clearly, I'm troubleshooting a strange rdp app issue and about to start testing VMWare View with thin clients so my mind is in a million places right now.

So... in a fresh install of XP... or should I say "unmodified", in the default user profile, it is as you describe submix8c.

However, upon following a Microsoft KB article... they say to create a master profile, customize it as you like, then copy it to the default user profile. This works perfectly, EXCEPT for the issue I currently have, which I didn't notice for what... 3 months?

If you have VMWare, or some other VM you can utilize, try it yourself and see. Create a test profile, write down the name of that test profile; i.e. "testuser". Then customize as you like. In my case, I guess in the big picture I didn't really do much, just configured the start menu and desktop icons(At least thats all I can remember). Now, log out of that profile, log into another admin profile, go into System Properties and click the advanced tab, then click user profiles. Copy that profile you just made to the default user profile(You need to enable showing hidden folders), and make sure you set the "Permitted to use" to "Everyone"(There is a KB article about how to do this whole thing). Once you're done, go into control panel > users and delete that profile you just made.

-- EDIT - This is where you effectively break the OS. --

Now, when you create a new user, it uses the "new" default user profile. Which is nice. I've customized it so the user has everything they'd ever need right there for them. That way I don't have to spend the extra 10 mins per computer, and alleviate any dumb questions like "where's my email?" because the icon isn't on the desktop.

Now, log into that new user. Browse to my documents. Everything looks ok. However, if you log out of that profile, and into another admin profile, manually browse to c:\documents and settings\ to the user, and you'll see the problem.... everything will show as "testusers docs, pics, etc."

All efforts to repair this has failed. Even if I try to revert the default user's my docs folder to what it would look like in an "unmodified" situation doesn't fix it.

There's something in the registry I'm missing. It's not really causing a problem now, but when I start working on the next step to improving the image, which is going to deal with partitioning and redirecting my docs, etc., I'm afraid this will become a serious issue.

Edited by kingsc
Link to comment
Share on other sites

Kingsc, I've been in your shoes before!!

The [DeleteonCopy] only works if you actually copy the folder to another location.

My resolution was to create a user account and set it up as I like, copy the profile to the "Default User" profile. Browse to all the desktop.ini files and delete the Owner=**** section. I'd rather have it show "My Documents" then they all say "TestUsers's Documents"

That would be a good temporary fix, I agree. I'd really like to make this perfect however. I'm afraid that even doing temporary fix will be a problem later on in future modification plans.

Link to comment
Share on other sites

You could have a logon script that's run first time they logon to make the file.

Something like this would work

@echo off
echo [DeleteOnCopy] >"%userprofile%\My Documents\desktop.ini"
echo Owner=%username% >>"%userprofile%\My Documents\desktop.ini"
echo Personalized=5 >>"%userprofile%\My Documents\desktop.ini"
echo PersonalizedName=My Documents >>"%userprofile%\My Documents\desktop.ini"
attrib +h +s "%userprofile%\My Documents\desktop.ini"

and then change the default user profile HKCU\%username%\Software\Microsoft\Windows\CurrentVirsion\RunOnce

and put a key in there to run the batch script

Link to comment
Share on other sites

  • 3 weeks later...
You could have a logon script that's run first time they logon to make the file.

Something like this would work

@echo off
echo [DeleteOnCopy] >"%userprofile%\My Documents\desktop.ini"
echo Owner=%username% >>"%userprofile%\My Documents\desktop.ini"
echo Personalized=5 >>"%userprofile%\My Documents\desktop.ini"
echo PersonalizedName=My Documents >>"%userprofile%\My Documents\desktop.ini"
attrib +h +s "%userprofile%\My Documents\desktop.ini"

and then change the default user profile HKCU\%username%\Software\Microsoft\Windows\CurrentVirsion\RunOnce

and put a key in there to run the batch script

That's a very good idea, thank you. I'd have to do that for the music, pics, etc as they are all incorrectly named as well, I would think?

I'd really like to identify the issue and correct it though, as I write documentation for everything I do. So the cleaner, the better.

Edited by kingsc
Link to comment
Share on other sites

This is why I strongly recommend NOT copying whole profiles, and only the NTUSER.DAT file - which is the registry, which is going to hold HKCU, which is really all you need.

I copied the ntuser.dat file to the default user profile inside of a VM and it didn't work. When I created a new account and logged in, some stuff was transferred over but the my docs folder was empty; there was no my pics or my music folders. EDIT - And the docs folder was still incorrectly labeled.

Is there a cleaner way where you just make a few edits to registry entries (the same that would be inside of ntuser.dat) to achieve the desired results?

Edited by kingsc
Link to comment
Share on other sites

So I exported the .DEFAULT hives from a computer that had not been imaged, and one that has, and used windiff to compare the two.reg files.

I really couldn't find much, except for entries in

HKU\.DEFAUL\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

Editing these appears to do nothing to resolve the issue however.

I'm bummed, I may have to resort to a batch file and entry in RunOnce after all. :}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...