Windows 7 Sysprep Default User

sysprepwindows 7

I seem to be having a problem with implementing my sysprep.

I have been playing with Windows 7, WAIK, Server 2008 R2 and various other things. I managed to create a WIM with everything I need installed and I have worked out the autounattend.xml. I now have a Windows 7 64-bit complete unattended install from a USB device. It has all my programs, setting and everything done except one thing – the default profile set up 100% correctly.

I have created a mostly set up default profile. I booted into audit mode, customized the Administrator account (mostly anyway) and then used sysprep with an unattend.xml file containing the copyprofile=true command. The file was set up with the WSIM and does not contain any extra info.

This all works wonderfully. I recreated the WIM and all was good. I then decided to move the default location of the visible stuff in the user profile (Documents, Music, Pictures etc.) without changing the location of Appdata or other hidden folders. This is where things went a little… wrong.

I went to the user folder (generally has the User name) with all the other folders in it. I right clicked on My Documents, found the location tab and changed it to M:\Documents. Now if I run sysprep /generalize /oobe /reboot /unattend:unattend.xml it starts the generalise… then spits out a fatal error and goes no further.

The setuperr.log contains the following errors:

2011-08-18 23:21:43, Error      [0x0f0043] SYSPRP WinMain:The sysprep dialog box returned FALSE
2011-08-18 23:31:57, Error      [0x0f0082] SYSPRP LaunchDll:Failure occurred while executing 'C:\Windows\System32\slc.dll,SLReArmWindows', returned error code -1073425657
2011-08-18 23:31:57, Error      [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = -1073425657
2011-08-18 23:31:57, Error      [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep generalize internal providers; hr = 0xc004d307

Does anyone have any ideas how I can redirect My Documents and other items in a user file to a second drive in the default profile so it affects each person logging in?

Best Answer

I'm fairly certain you can't manage the My Documents folder that way. You'll need to either edit the local security policy/local group policy, build a script to re-map it, or use Group Policy for after the computer is set up and joined to the domain.

In certain instances, where some networks don't have Active Directory to use Group Policy, using the local group policy should work.

Here's an example

More info