Thanks, I should have searched first...
Thanks, I should have searched first...
There is a decided lack of anything-to-do-with-Profile-folders in the sysprep log. Further, sysprep is over and done in a mere 4 seconds - not really enough time to be copying userprofile data between drives. I really do think that for some reason it is not processing the directive in the unattend.xml file, even though it says that it found the file.
To that end, would it be possible to post the relevant portion of a successful sysprep run, so that I can compare it with my logs and see which entries are missing in my environment? I note that at least one other user (who also has a PC which is OEM'd ... mine is Lenovo) appears to have a similar issue to me. Thanks.
I don't know if it's relevant, but "net user Blah /enable:foo" is not working for me in some cases (it reports success but achieves nothing), and I'm having to enable/disable profiles through Computer Management > System Tools > Local users and Groups. It looks very much like those two methods of accomplishing enablement/disablement of profiles keep score of whether a profile is enabled or not, in very different ways. Let me know if you would like me to start a new thread on this (for curiosity's sake, not that it's stopping me from doing anything).
I am starting to suspect that some pre-installed OEM systems have some kind of security features in place, to keep the system as manufacturer has intended. I have no factual knowledge of this, it just seems weird that a few OEM systems simply do not "obey" the answer file. Sysprep works, no error messages, drive assignments correct, just the relocation part (ProfilesDirectory tags) will be ignored.
Your system specs show you have the PRO edition, meaning you have Hyper-V available. You could easily test if your answer file works, exactly as it is and was used on your Lenovo, on a virtual machine. No additional product key needed.
Hyper-V virtualization - Setup and Use in Windows 10 - Windows 10 Forums
Anyway, my suggestion is as always: create a system image backup, download Windows 10 ISO, burn it to DVD or make a bootable USB flash drive, do a clean install wiping everything and follow instructions for Method One. Alternatively forgot relocating Users and manually change storage location of your docs, pics and such (tutorial).
this guy says that using the /unattend switch "will cache the sysprep.xml file as \windows\panther\unattend.xml". But that latter location is not the file I supplied ... it's the one prepared earlier by Lenovo. So we can narrow our problem down to: either sysprep fails to actually copy the file there, or between the time when it does and the time when 'Panther' is wanting to process it, Lenovo's version gets dumped there instead. (The file modification time-stamp would seem to suggest the latter ... sigh).
When sysprep is run, it looks if the folder C:\Windows\System32\Sysprep contains an answer file. Sysprep can only look, find and use the file in this location if it is named as unattend.xml (exactly like that!). If unattend.xml is found, it will be used in sysprep process and no /unattend:X:\MyAnswerFile.xml switch is needed.
If a valid answer file is not found in said folder, or if one is found but it has any other name than unattend.xml, the /unattend:X:\MyAnswerFile.xml switch is needed to tell sysprep where to find the answer file.
OK, that being said you could test changing your answer file's name to unattend.xml and run sysprep without /unattend:X:\MyAnswerFile.xml switch, simply with this command:
Code:sysprep.exe /oobe /reboot
This should bypass any unattended answer files set in place by Lenovo.
This article (which the previous guy mentioned referred to) tells us the search path for Unattend.xml. Incredibly, C:\Windows\Panther (the location where answer files get cached) is only the 3rd most powerful location! I'll be back in a minute ...
- That article is already bit outdated
- The article is about answer files being used with setup.exe, not with sysprep.exe
- My suggestion about where to put answer file and how to name it is based on the method and purpose of this tutorial: only one configuration pass is used, OobeSystem; if valid answer file is found in location I told you, it bypasses other possible answer files with configuration pass OobeSystem
In my case, I achieved my own aims by hacking the Lenovo-supplied version and adding the <FolderLocation /> section into their already-present section for the windows shell component. It should also have worked if I had renamed C:\Windows\Panther\Unattended\Unattend.xml to any other name, and then followed your instructions. (But I really wanted to avoid following the directions a ninth time).
The computer is now either:
- copying the user profiles files from C: to H: and I'm regretting not cleaning out my Downloads folder first; or
- stuck in some kind of endless loop because I got the XML syntax wrong, and I'll need to re-install in the morning; or
But I'm pretty sure it's the first option. :-)
One interesting thing I discovered was that after setup completes, it actually re-writes C:\Windows\Panther\unattend.xml and puts attributes in the <settings /> elements to say that the directive was processed.
Not sure who owes who a beer now. Probably I should get all the beers from people with OEM'd machines. Sound fair?
Please do not forget to post about how it went. Anyway, no beer for me, I don't drink alcohol. Only whisky, occasionally cognac and brandy, a good port or sherry. But no alcohol.
Well, for some of us, problems with Windows stop us doing productive work, which makes it difficult to buy good single-malt on a very regular basis. Thanks for writing this article, I am very happy to take the pressure of my new (and rather small) SSD, and I look forward to getting on with using my system.