I'm setting up a WIM to image a set of laptops. I have setup a computer which I have sysprep'ed and then captured the image to the WDS server. I have deleted all the local user accounts using the control panel. However when I image a computer from the WIM there are 3 or 4 local user accounts already on the system. How can I get rid of them, or ideally not include them in the image capture in the first place?
Asked
Active
Viewed 6,631 times
2 Answers
2
Before you run your final sysprep to prep the image for capture, put the machine into audit mode with sysprep/audit
and clean out the profiles you don't want in there. Then run your final sysprep and the machine will shut down and you can image it.
You can also do other administrative things in audit mode. You can read more about it here.

BoxerBucks
- 1,374
- 1
- 9
- 19
-2
While I would suggest dealing with this around the SysPrep stage of the image, I think you can indeed do a dirty if circumstances demand it...
- Backup your WIM, in case you mess the below up
- Mount the WIM with DISM:
DISM /Mount-WIM /WimFile:<C:\path\tomy\file.wim> /index:1 /MountDir:<Empty folder to populate with WIM files>.
- Remove user profiles as below:
- Remove user profile folders from
C:\users
- Open regedit on your local machine, select
HKEY_LOCAL_MACHINE
and then select File: Load Hive. - Open
<Path to WIM Mount Dir>\Windows\System32\Config\SOFTWARE
. Give the opened Hive a name, as directed. - Navigate to
HKLM\<WIM Hive Name>\Software\Microsoft\Windows NT\ProfileList
- Look through the
ProfileList
subkeys for the profiles you want to delete and note theGUID
value. - Remove the matching
GUID
subkey from theProfileGUID
key situated directly above theProfileList
key - Proceed to then remove the
ProfileList
subkeys for each user that you want to remove. - Click
File : Unload Hive
and then close Regedit - Open Properties of the
Windows\System32\Config
folder, select the Security tab and remove the current user account from the List of permissioned accounts. - Make sure nothing is open in the WIM mount directory, including explorer folders
- Commit the changes to the WIM with DISM:
DISM /Unmount-WIM /MountDir:<Empty folder to populate with WIM files> /Commit
- Remove user profile folders from
After that, your WIM will no longer have those user accounts... I'd be interested to see feedback on this method, as there are likely insidious problems with it.

Pres
- 21
- 1
- 5