На чтение 3 мин Опубликовано Обновлено
Defprof exe — это инструмент командной строки, предоставляемый Microsoft, который позволяет настроить профиль пользователя в операционной системе Windows 10. Этот инструмент позволяет копировать настройки и данные пользователя на другой компьютер или профиль, что может быть полезным, например, при установке обновлений или при создании образов компьютеров.
Использование Defprof exe довольно просто. Для начала, вам нужно скачать и сохранить исполняемый файл на вашем компьютере. Затем, при необходимости, вы можете создать резервную копию текущего профиля пользователя, чтобы восстановить его позже. После этого, вы можете запустить Defprof exe и ввести имя и путь к исходному профилю пользователя, а также имя и путь к целевому профилю.
Однако перед использованием Defprof exe важно учитывать некоторые моменты. Во-первых, компания Microsoft не предоставляет поддержку Defprof exe, поэтому использование этого инструмента может быть связано с определенными рисками. Во-вторых, Defprof exe может не правильно обрабатывать некоторые типы данных или настройки пользователя, поэтому всегда рекомендуется создавать резервные копии и тестировать изменения перед применением их на реальных системах.
Установка Defprof.exe
Для начала работы с Defprof.exe в Windows 10 необходимо выполнить процедуру установки. Вот как это сделать:
- Проверьте, что вы выполняете вход в систему с учетными данными администратора. Неадминистративные учетные записи не могут установить Defprof.exe.
- Скачайте архив Defprof.zip с официального сайта Defprof.
- Распакуйте содержимое архива в любую удобную папку на вашем компьютере. Например, в папку с установленными программами.
- Откройте командную строку от имени администратора. Для этого щелкните правой кнопкой мыши по иконке «Командная строка» и выберите пункт «Запуск от имени администратора».
- Перейдите в папку, в которую вы распаковали архив Defprof.zip, с помощью команды «cd [путь_к_папке]». Например, «cd C:\Program Files\Defprof».
- Теперь вы можете использовать Defprof.exe для создания профилей пользователей в Windows 10.
Поздравляем, теперь вы готовы использовать Defprof.exe в Windows 10! Обратите внимание, что для корректной работы программы необходимо выполнять процедуру установки и использовать учетную запись администратора.
Использование Defprof.exe
Для использования Defprof.exe в Windows 10, выполните следующие шаги:
| Шаг | Описание |
|---|---|
| 1 | Скачайте Defprof.exe с официального сайта Microsoft. |
| 2 | Сохраните файл Defprof.exe в удобном для вас месте. |
| 3 | Откройте командную строку от имени администратора. |
| 4 | Перейдите в каталог, в котором сохранен файл Defprof.exe. |
| 5 | Введите команду defprof.exe /activate, чтобы активировать утилиту. |
| 6 | Введите команду defprof.exe /basepath:<путь к базовому профилю>, чтобы указать путь к базовому профилю пользователя, на основе которого будут создаваться новые профили. |
| 7 | Введите команду defprof.exe /defaultuser, чтобы установить созданный профиль пользователя как профиль по умолчанию для новых пользователей. |
После выполнения этих шагов Defprof.exe применит настройки базового профиля пользователя ко всем новым профилям, которые будут созданы на компьютере.
Сегодня я рассмотрю крайне интересную тему, а конкретно перенос профиля локального пользователя, в профиль доменного пользователя.
Зачем это нужно?
В основном, это нужно в ситуации, когда в компании внедряется доменная сеть и необходимо компьютеры пользователей подключать к домену. Но, тут возникает следующая проблема, все сотрудники привыкли к своему рабочему пространству и не особо хотят, чтобы что-то менялось. А оно изменится, так как работать они уже будут под новыми доменными учетными записями.
Регистрируйся на следующий вебинар по системному администрированию!
>> Подробнее о вебинаре <<
И вроде, не такая уж большая проблема скопировать документы пользователя на другой рабочий стол и все. Но есть определенные настройки, которые не так просто перенести, допустим вкладки в браузере, сохраненные пароли, настройки специфического ПО, активация софта и т.д.)
В общем, ему придется заново все настраивать, а учитывая, что далеко не все пользователи дружат с компьютерами, то количество обращений по подобного рода вопросам увеличится в разы, пока в течении определенного времени все настройки не будут произведены.
Но, есть одно классное решение, которое позволяет в несколько кликов избавиться от данных проблем.
Называется оно User Profile Wizard от компании Forensit https://www.forensit.com . Очень греет душу, что она бесплатная, по крайней мере для наших нужд достаточно бесплатной версии.
Собственно, что она делает, а она переносит профиль локального пользователя в доменный. Но, если быть точным, то она не переносит, а связывает доменную учетку с нужным нам локальным профилем. В результате чего, пользователь так же работает в привычном для себя окружении, но уже в домене. Возможно по началу не особо понятно, но сейчас я все покажу на практике!
Кстати, помимо этой классной программки у разработчиков есть еще две интересных софтинки Transwiz, предназначенная для именно переноса профиля и DefProf позволяющая настроить профиль по умолчанию, который будет применяться к новым учетным записям.
В дальнейшем, так же планирую рассмотреть работу этих программ.
Скачиваем User Profile Wizard Release 21, я буду все это демонстрировать на Windows 10, поэтому скачиваем соответствующий дистрибутив и устанавливаем на компьютере клиента (Profwiz.msi \ install)
Чтобы убедиться, что у нас действительно сохранятся все настройки, давайте добавим какой-нибудь сайт в избранное браузера и посмотрим какие базы подключены к 1С.
Приступаем к подключению доменного пользователя к локальному профилю (Profwiz.exe \ Далее \ Выбираем учетную запись, профиль которой нас интересует \ user \ отключить или удалить старую учетную запись после выполнения операции \ Далее \ Вводим название нашего домена \ Присоединить к домену, опять же, тут речь идет о компьютере, которая еще не состоит в домене и через данную утилиту мы его подключим \ office.loc \ Логин доменной учетной записи, под которой будет работать сотрудник \ buhgalter \ Далее \ имя пользователя и пароль имеющий право присоединять компьютеры к домену \ Дожидаемся завершения процесса настройки \ Готово \ Перезагрузка.
Выполняем вход под доменной учетной записью и видим, что все настройки сохранились как в браузере так и 1С. Если мы зайдем в свойства какого-либо документа на рабочем столе, то увидим, что он находится в папке с профилем прошлого пользователя. Т.е. папка с данным профилем была подключена к доменному пользователю.
Так же мы видим, что на рабочем столе появилась папка Обмен, а значит мы действительно в домене и данный ярлык прописался через групповую политику. Зайдем в эту папку и посмотрим, что видит сервер, под какой учетной записью мы подключились к общедоступному ресурсу.
Зайдем в Управление компьютером и видим, что у нас открывается данная оснастка запускается, а значит у данного пользователя права администратора. Хотя, при подключении под доменным пользователем он лишен администраторских прав. Получается, что программа добавила нашу учетную запись в группу администраторы на данной машине. Если вам это не нужно, то удаляем его из группы администраторы.
Благодаря данной программе можно очень быстро перевести компанию в доменную сеть без каких-либо проблем!
What is DefProf exe?
DefProf 1.11 DefProf updates the default user window profile with court documents and settings from another user panel you specify. Is defprof a kind of portable MSI that we don’t often find out about. Like any portable application, frankly, DefProf delete.exe on completion.
How to use defprof in Windows 7 user profile?
You can use DefProf on Windows 7 where the “Copy to” button is not available in the “User Profiles” dialog box. Just copy DefProf to the executable path and sort “defprof”.
Is there a Windows 10 version of defprof?
How can I? DefProf 1.10, Prevent support for Windows 10, is now available.
Where do I find defprof in Windows 10?
When you log on as a Windows installation, it typically creates a profile folder C:\\Users\\setup. Set the default profile to “setup”, just type defprof setup on the command line. DefProf 1.10 adds support for Windows 10.
How does defprof work on Windows 7 and 10?
It works on Windows 7-10, administrators can set up a default profile and control the amount of work involved in setting up new accounts. While Information Technology uses the MSI installer, the program simply extracts the executable from the same folder, which is its utility that you use to create your own default profile.
How do you run DefProf?
DefProf updates the default Windows user profile with entries, documents, and settings from another user array that you specify. You can even use DefProf on Windows 7, where most of the “Copy to” buttons are greyed out in the User Profiles dialog. Just copy the path to the exe file into defprof and type “defprof”.
What is DefProf?
Note: Count (5 votes) DefProf updates the default Windows User Profile with Documents, not to mention any other user profile settings you specify. DefProf is a fully portable msi that we don’t see very often. It looks like DefProf is installed, but actually DefProf is installed on your desktop.
Where do I put defprof on my computer?
When your organization logs on as a setup, Windows creates a profile folder in C:\\Users\\setup. Make the default profile in “setup”, you just need to activate the defprof configuration in time by command.
Douglas is a technology journalist and editor who has been covering the beat for over a decade. He has a passion for translating complex technology into easy-to-understand language for average consumers, and his work has been featured in some of the most well-known tech publications on the web, and he is a regular contributor to iconremover.com.
Mandatory user profile. First, you create a default user profile with the customizations that you want, run Sysprep with CopyProfile set to True in the answer file, copy the customized default user profile to a network share, and then you rename the profile to make it mandatory.
What is a mandatory profile Windows 10?
A mandatory user profile is a special pre-configured type of roaming user profile than can be changed only by administrators. Users who have been assigned a mandatory profile can work in Windows as usual during the login session, but no changes are saved to the profile after user logoff.
How do you run DefProf?
DefProf updates the Default Windows User Profile with the documents and settings from another user profile that you specify. You can use DefProf on Windows 7 where the “Copy To” button is greyed out in the “User Profiles” dialog box. Just copy DefProf onto your executable path, and type “defprof”.
What does mandatory profile do?
A mandatory user profile is a special type of pre-configured roaming user profile that administrators can use to specify settings for users. With mandatory user profiles, a user can modify his or her desktop, but the changes are not saved when the user logs off.
What is the meaning of default profile?
The default profile is a template profile that is used when a user logs on to a Windows computer for the first time. The default profile can be customized by the image creator. Windows 7 and Windows Server 2008. Enable Desktop Background.
Does DefProf work on Windows 10?
To make ‘setup’ the default profile, you just type defprof setup at a command prompt. DefProf 1.10 adds support for Windows 10.
How to make a default user profile mandatory?
How to create a mandatory user profile. First, you create a default user profile with the customizations that you want, run Sysprep with CopyProfile set to True in the answer file, copy the customized default user profile to a network share, and then you rename the profile to make it mandatory.
When to sign in with a mandatory profile?
When the server that stores the mandatory profile is unavailable, such as when the user is not connected to the corporate network, users with mandatory profiles can sign in with the locally cached copy of the mandatory profile, if one exists.
Where do I find the mandatory profile in Active Directory?
Open Active Directory Users and Computers (dsa.msc). Navigate to the user account that you will assign the mandatory profile. Right-click the user name and open Properties. On the Profile tab, in the Profile path field, enter the path to the shared folder without the extension.
Can a system administrator change a mandatory profile?
Only system administrators can make changes to mandatory user profiles. When the server that stores the mandatory profile is unavailable, such as when the user is not connected to the corporate network, users with mandatory profiles can sign in with the locally cached copy of the mandatory profile, if one exists.
What is mandatory profile Windows?
What is Mandatory User Profile? A user profile in a network based on Microsoft Windows NT or Windows 2000 that is stored on a network share on a server and that the user cannot modify. Because a mandatory user profile is on a server, users can access their personal desktop settings from any machine on the network.
What is DefProf?
Rating: 5 (5 votes) DefProf updates the Default Windows User Profile with the documents and settings from another user profile that you specify. DefProf is a portable MSI, something we don’t see frequently. DefProf appears to install, but all that happens is DefProf is be placed on your Desktop.
Have a read here Opens a new window and there Opens a new window
the second link links to a microsoft how to page.
Was this post helpful?
thumb_up
thumb_down
We do not sysprep our computers. With defprof and windows_enabler we didn’t need to and don’t want to start now. Any other suggestions? Is there something that will work like defprof did for Windows 8??
Was this post helpful?
thumb_up
thumb_down
Maybe I’m missing something but there already is a default profile. Just copy what you want to it and you’re done. You will have to change your view to include «Hidden items» to see it or just browse to C:\Users\Default
0 of 1 found this helpful
thumb_up
thumb_down
Here is what we do: load a computer with the OS (in this case Windows 10), create a local user account that has admin privileges, install all the apps, run updates, do tweaking of the apps, then when done with the image I log in as the administrator and copy this local user profile over the default user profile. This is done so that whoever logs into the computer will get everything the way we set it as the local user. This is important in an educational setting. With Windows 7 we used windows_enabler to unhide the ability to copy the local profile over the default, with Windows 8 we used a utility called defprof to accomplish this task — neither of these work with Windows 10. I tried using defprof but when I login using a new account the screen is black with just the cursor arrow showing. We do not sysprep our images. This method has worked for years and I am sure someone will come up with another utility like defprof if it doesn’t already exist — I am hoping it is out there somewhere and someone will be able to tell me where. Thanks for the suggestions so far but still not an answer that will help.
Was this post helpful?
thumb_up
thumb_down
We do not sysprep our images. This method has worked for years…
Help me understand… why do you not sysprep? Is there a particular reason why building an image in audit mode, sysprepping, and deploying doesn’t work over building a local profile, and then using a third-party utility to copy a local profile to the default profile? It sounds like you would accomplish the same (if not more) by customizing in audit mode.
Was this post helpful?
thumb_up
thumb_down
I have found a solution to my query. One of my counterparts on a different campus provided a .bat file that does just what I want. Thanks for all your input!
Was this post helpful?
thumb_up
thumb_down
Hi Kathleen,
I would like to know more about your solution.
Here at our school, we have the same problem.
Was this post helpful?
thumb_up
thumb_down
I to would love to hear your answer, I work for a school district and am in the same boat as you Kathleen!
Was this post helpful?
thumb_up
thumb_down
I wish I could take credit for the creation of this file but not my brainwork on this one.
Below is the content of the .bat file we run and it works for Windows 8 and 10. Copy all the text into a file and name it what you like using a .bat extension. The only thing you need to do is enter the name of the profile you will use to copy over the default profile at the end of the line: set PROFILE=
@echo off
rem 00000000000000000000000000000000000000000000000000000000000000000000000000
rem SCRIPT NAME: Update Default User Profile.cmd
rem VERSION: 3.0
rem DISCRIPTION: Copies the chosen profile to the default user profile then
rem removes printers from defautl user’s registry in Windows 7.
rem Must right click script and run as administrator!
rem AUTHOR: Ben Stefan, John McFadden, Karolyn Hannam, Christine Schilling
rem DATE: 4/4/2013
rem 00000000000000000000000000000000000000000000000000000000000000000000000000
:selectprofile
cls
echo / / / / / / / / / / / / / / / / / / / / / / / / / / / /
echo Win8 Profile Copy Script
echo / / / / / / / / / / / / / / / / / / / / / / / / / / / /
echo Press 1 to continue
echo Press 2 to cancel
echo.
set PROFILE=
choice /c 12
if errorlevel 3 set PROFILE=localuser
if errorlevel 2 goto enderror
if not exist «C:\Users\%PROFILE%» echo ERROR — The Selected Profile Does Not Exist! && goto enderror
:confirmprofile
cls
echo / / / / / / / / / / / / / / / / / / / / / / / / / / / /
echo Win8 Profile Copy Script
echo / / / / / / / / / / / / / / / / / / / / / / / / / / / /
echo Copy C:\Users\%PROFILE%\ to C:\Users\Default\ ?
echo.
choice /c YN
if errorlevel 2 goto enderror
if errorlevel 1 goto backupdefaultprofile
:backupdefaultprofile
attrib -h «C:\Users\Default»
if exist «C:\Users\Default_Backup» rmdir /s /q «C:\Users\Default_Backup»
ping 127.0.0.1 -n 6 -w 1000 > nul
if exist «C:\Users\Default_Backup» rmdir /s /q «C:\Users\Default_Backup»
ping 127.0.0.1 -n 6 -w 1000 > nul
if exist «C:\Users\Default_Backup» echo ERROR — Removal of old Backup Folder Failed! && goto enderror
rename «C:\Users\Default» «Default_Backup»
if not exist «C:\Users\Default_Backup» echo ERROR — Backup Failed! && goto enderror
echo.
echo Existing Default Profile Successfully Backed Up
echo.
ping 127.0.0.1 -n 6 -w 1000 > nul
:copyinstallerprofile
md «C:\Users\Default»
xcopy «C:\Users\%PROFILE%\*.*» «C:\Users\Default» /e /c /h /k /y
if exist «C:\Users\Default\AppData\Local\Packages» rmdir /s /q «C:\Users\Default\AppData\Local\Packages»
if exist «C:\Users\Default\AppData\Local\microsoft\Windows\Temporary Internet Files» rmdir /s /q «C:\Users\Default\AppData\Local\microsoft\Windows\Temporary Internet Files»
if exist «C:\Users\Default\AppData\Local\Temp» Del /s /q «C:\Users\Default\AppData\Local\temp»\*.*
if exist «C:\Users\Default\AppData\Local\microsoft\Windows\UsrClass.dat» del /s /q /aa «C:\Users\Default\AppData\Local\microsoft\Windows\UsrClass.dat»
:end
echo.
echo Script Completed Successfully . . .
echo.
pause
goto endnow
:enderror
echo.
echo Script Terminated with Errors . . .
echo.
pause
goto endnow
:endnow
exit
1 found this helpful
thumb_up
thumb_down
Thanks for this. I had a similar issue needing to have the computers on the domain. It worked great. Except the group policy printers stopped working. I’m not sure if they’re related to the importing on the default profile. I also use Deep Freeze. And a windows update followed the new default profile. Both could have interfered with the printers. I’m not looking for a solution right now. The default profile was a bell and a whistle for our lab computers. So unless someone has a ‘this happened to me’ and I solved it, I just wanted to put out there a complication I noticed that could be universal or unique to my environment.
Was this post helpful?
thumb_up
thumb_down
Kathleen6671 wrote:
I wish I could take credit for the creation of this file but not my brainwork on this one.
Below is the content of the .bat file we run and it works for Windows 8 and 10. Copy all the text into a file and name it what you like using a .bat extension. The only thing you need to do is enter the name of the profile you will use to copy over the default profile at the end of the line: set PROFILE=
@echo off
rem 00000000000000000000000000000000000000000000000000000000000000000000000000
rem SCRIPT NAME: Update Default User Profile.cmd
rem VERSION: 3.0
rem DISCRIPTION: Copies the chosen profile to the default user profile then
rem removes printers from defautl user’s registry in Windows 7.
rem Must right click script and run as administrator!
rem AUTHOR: Ben Stefan, John McFadden, Karolyn Hannam, Christine Schilling
rem DATE: 4/4/2013
rem 00000000000000000000000000000000000000000000000000000000000000000000000000:selectprofile
cls
echo / / / / / / / / / / / / / / / / / / / / / / / / / / / /
echo Win8 Profile Copy Script
echo / / / / / / / / / / / / / / / / / / / / / / / / / / / /
echo Press 1 to continue
echo Press 2 to cancelecho.
set PROFILE=
choice /c 12
if errorlevel 3 set PROFILE=localuser
if errorlevel 2 goto enderrorif not exist «C:\Users\%PROFILE%» echo ERROR — The Selected Profile Does Not Exist! && goto enderror
:confirmprofile
cls
echo / / / / / / / / / / / / / / / / / / / / / / / / / / / /
echo Win8 Profile Copy Script
echo / / / / / / / / / / / / / / / / / / / / / / / / / / / /
echo Copy C:\Users\%PROFILE%\ to C:\Users\Default\ ?
echo.
choice /c YN
if errorlevel 2 goto enderror
if errorlevel 1 goto backupdefaultprofile:backupdefaultprofile
attrib -h «C:\Users\Default»
if exist «C:\Users\Default_Backup» rmdir /s /q «C:\Users\Default_Backup»
ping 127.0.0.1 -n 6 -w 1000 > nul
if exist «C:\Users\Default_Backup» rmdir /s /q «C:\Users\Default_Backup»
ping 127.0.0.1 -n 6 -w 1000 > nul
if exist «C:\Users\Default_Backup» echo ERROR — Removal of old Backup Folder Failed! && goto enderror
rename «C:\Users\Default» «Default_Backup»
if not exist «C:\Users\Default_Backup» echo ERROR — Backup Failed! && goto enderror
echo.
echo Existing Default Profile Successfully Backed Up
echo.
ping 127.0.0.1 -n 6 -w 1000 > nul:copyinstallerprofile
md «C:\Users\Default»
xcopy «C:\Users\%PROFILE%\*.*» «C:\Users\Default» /e /c /h /k /y
if exist «C:\Users\Default\AppData\Local\Packages» rmdir /s /q «C:\Users\Default\AppData\Local\Packages»
if exist «C:\Users\Default\AppData\Local\microsoft\Windows\Temporary Internet Files» rmdir /s /q «C:\Users\Default\AppData\Local\microsoft\Windows\Temporary Internet Files»
if exist «C:\Users\Default\AppData\Local\Temp» Del /s /q «C:\Users\Default\AppData\Local\temp»\*.*
if exist «C:\Users\Default\AppData\Local\microsoft\Windows\UsrClass.dat» del /s /q /aa «C:\Users\Default\AppData\Local\microsoft\Windows\UsrClass.dat»
:end
echo.
echo Script Completed Successfully . . .
echo.
pause
goto endnow:enderror
echo.
echo Script Terminated with Errors . . .
echo.
pause
goto endnow:endnow
exit
This script is awesome and works with Windows 10 Pro!!!!
Was this post helpful?
thumb_up
thumb_down
Script worked great! Just want to point out that you will most likely need to run this from a different user profile than the one you are using as a reference for your default. and 2. This will not edit NTUSER.DAT in any way so it will not truly be a default profile but it works well enough.
1 found this helpful
thumb_up
thumb_down
windows 10 anniversary update 1607:
-when trying to copy default profile (made by this .bat script) to local disk, windows just pop up warning:
Failed to set Security on the Destination Profile. Error — The system cannot find the file specified
Any ideas?
Was this post helpful?
thumb_up
thumb_down
pbowen
This person is a verified professional.
Verify your account
to enable IT peers to see that you are a professional.
sonora
Hello,
I wanted to ask for a little help on this script since I’m a newbie as far as Windows 10 and Scripts go. So I have Windows 10 Education 1703 installed on a laptop, I only setup the initial account and called it «user», so in order to make this script work, what would I need to change? Do I copy the entire script from beginning to end? Do I need to create an additional account and make it a standard user account so it doesn’t have any admin properties like the initial local account that is setup? Or does it not matter if the account is a standard user or a local administrator?
I really appreciate the help ahead of time.
Was this post helpful?
thumb_up
thumb_down
It works great with the newest version of win10 17..
I used account with admin right to copy over to default profile. Worked like a charm
thanks so much
Was this post helpful?
thumb_up
thumb_down
Well, for starters, it is quite common that you need to move a user to a new system but want that person’s «personality» to move to that new computer. Second, once a machine has been deployed, it is too late to use «Sysprep». This situation is very common, and is 1 that all «REAL» administrator’s have come across, especially after taking on a new administrative position, where 1 or more computers are already setup in a «common area» (i.e. used by more than 1 person, and usually many). In this scenario, «roaming» users want EVERY system they sit down at to look a certain way and to be tweaked for speed and functionality, and you need to get a handle on what their default desktops look and function like, so you:
1. Setup a new user on that or another machine
2. Customize the look and feel your users need
3. Copy that look and feel (via DefProf, User Profile Manager or User Profile Wizard, all by Forensit) of the desired profile to the default user or over a specific user profile
4. Delete all other existing profiles … to force the users to pick up the new look and feel the next time they log in
This can be used AFTER a desktop has already been deployed. and is extremely useful when a certain look and feel is desired, and to correct previously desktops that fail to meet your (or your users’) expectation … as well as when you don’t have to time or desire to setup or re-setup new, existing or FUTURE profiles for every user that might sit down there.
With «User Profile Manager», you can even define the look and feel of different «sets» of users, and assign them to standard Active Directory related «groups», setting them up with a «default» and/or «mandatory» look and feel. Incidentally, the mentioned programs are all freeware and are updated every so often to keep up with current standards. All of the mentioned programs have been updated recently to work with all versions of Windows, including Windows 10.
Was this post helpful?
thumb_up
thumb_down
Creating a custom default profile is a good way to streamline a Windows 10 deployment. How do you achieve this?
Note:- this article refers to the default profile creation process on Windows 10 version 1803, fully patched as of 05/07/2018. Further servicing updates (Windows patches) or feature updates (OS upgrades) will possibly invalidate this, although I will strive to keep this article as up-to-date as humanly possible.
The best way to set up a custom default user profile is to run from Audit Mode. This is a special mode of Windows that is invoked during the build process. The original purpose of it was for corporations to complete installation tasks before shipping them to users who could then complete the installation in the usual fashion. In Audit Mode, the device is logged on as the local Administrator account (which will be disabled afterwards) and allows changes to be made to the device prior to sysprep. However, if sysprep is run with the /copyprofile switch, the local user profile will then be copied into the default user profile and then become the default profile for the image.
Be aware that you can only run Audit Mode a specified number of times if you reach the stage of running sysprep when you’re finished – four times will be your limit, unless you use the /skiprearm switch. I find it easy simply to take a VM snapshot of the reference image prior to running sysprep and restoring if necessary.
In order to invoke Audit Mode, start a Windows 10 build and wait until you reach the point shown in the image below, then press Ctrl Shift and F3.
The machine will then boot into Audit Mode, where it will automatically log on as the built-in Administrator account.
Click on Cancel on the sysprep dialog box. Now, you can set about making any changes you want on a device or user level. Normally at this point I remove UWP apps as specified in this article. However, as this post is merely about the user perspective, here are some of the things I tend to do here:-
- Set background and branding
- Set Explorer to show file extensions
- Set File Explorer to open at “my PC” instead of “Quick Access”
- Set the Start Tiles as required
- Set desktop icons as required (add My Computer and Control Panel)
- Set Taskbar Pinned Items as required
- Set browser homepage and search options
After this, we just need to do a quick bit of tidying up. Simply run this command to grab a copy of the Start Tiles layout to deploy to new users. Run it from an elevated PowerShell session
Export-StartLayout -Path $ENV:LOCALAPPDATA\Microsoft\Windows\Shell\LayoutModification.xml
Once you’ve got this done, you need to create an answer file for sysprep to read to tell it what to do. You can either create one using Windows tools, or simply steal the pre-canned one I have prepared here 🙂 If you’re just interested in running with the pre-determined version, skip ahead to the section marked “Pre-canned answer file”
If you want to do this manually, download and install the Windows ADK, the 1803 version is currently available from this link. Next, install the Deployment Tools option from the ADK only.
Make sure you’ve got your Windows 10 source files available. You will need read/write access to the source files for Windows , so take a copy of the install.wim file from the \sources folder and put it somewhere you can access it with Read/Write permissions.
Once this has completed, run Windows System Image Manager from the Start Menu. From the File menu, choose New Answer File. Click on Yes and locate the install.wim file from your Windows image. Click on Yes to create a catalog file.
Now, we can go to work to customize the answer file as required. Under Components in the bottom left pane, select the folder that starts with amd64_Microsoft-Windows_Shell-Setup (or x86_Microsoft-Windows_Shell-Setup if you’re on a 32-bit platform), select it and choose Add Setting to Pass 4 specialize
Next you will see this is now added to the Answer File section in the middle pane. Expand this out and set the CopyProfile flag on the right-hand pane to True
You can set any of the other options within the answer file as you wish, but this one is the only one we actually need. Once finished, validate the answer file by using Tools | Validate answer file, then save it somewhere as an .xml file. In this case, we are just saving to c:\unattend.xml.
You can then open the file up in a text editor if required and check it.
Pre-canned answer file
If you want to avoid all this mess, here’s a pre-made answer file I use on a regular basis 🙂 Items highlighted in bold you may need to check to match your environment, but otherwise you should just be able to copy and paste into an text file and use it with impunity!
<?xml version=”1.0″ encoding=”utf-8″?><unattend xmlns=”urn:schemas-microsoft-com:unattend”>
<settings pass=”specialize”>
<component name=”Microsoft-Windows-Shell-Setup” processorArchitecture=”amd64” publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>
<CopyProfile>true</CopyProfile>
</component>
</settings>
<cpi:offlineImage cpi:source=”wim:D:/sources/install.wim#Windows 10 Enterprise” xmlns:cpi=”urn:schemas-microsoft-com:cpi” />
</unattend>
Watch out – these lines may wrap.
So once you’ve created your answer file, either manually or using the one above, you now need to run sysprep. Open up an elevated command prompt and run this command
c:\windows\system32\sysprep\sysprep.exe /oobe /generalize /shutdown /unattend:c:\unattend.xml
Naturally, replacing the correct path to your own answer file.
An interesting aside – sometimes I get an error here that directs me to the sysprep log (setupact.log), and I commonly find this happens when I have been removing UWP apps at this stage. If you have removed a provisioned app that still exists in the user profile, sysprep will fail. You need to make sure any provisioned apps removed using Remove-AppxProvisionedPackage have also been removed from the active user account using Remove-AppxPackage. Also it is possible to get an error here if the Windows Media Player Network Sharing Service is running.
Once this is run, sysprep will do its stuff and then shut down the image
The system is now shut down and ready for image deployment with your custom default profile baked-in, but what I usually find is that the default profile will be a bit bloated and contain some references that are not necessary (like PowerShell command history, for instance). To get around this, I run the following script either during imaging or post-imaging just to ensure that the default profile is fully tidied up and as streamlined as possible. There are batch commands in here but they will run from PowerShell without issue, it does however need to run elevated.
takeown /f c:\users\default\appdata\local\Microsoft\WindowsApps /r /a /d Y
icacls c:\users\default\appdata\local\Microsoft\WindowsApps /grant Administrators:F /T /C /L
get-childitem C:\Users\Default\AppData\LocalLow -force | foreach ($_) {remove-item $_.fullname -force -recurse -confirm:$false}
get-childitem C:\Users\Default\AppData\Local\Microsoft\Windows -exclude “Shell”,”WinX” -Force | foreach ($_) {remove-item $_.fullname -force -recurse -confirm:$false}
get-childitem C:\Users\Default\AppData\Local\Microsoft -exclude “Windows” -Force | foreach ($_) {remove-item $_.fullname -force -recurse -confirm:$false}
get-childitem C:\Users\Default\AppData\Local -exclude “Microsoft” -Force | foreach ($_) {remove-item $_.fullname -force -recurse -confirm:$false}
get-childitem C:\Users\Default\AppData\Roaming\Microsoft\Windows -exclude “Start Menu”,”SendTo” -Force | foreach ($_) {remove-item $_.fullname -force -recurse -confirm:$false}
get-childitem C:\Users\Default\AppData\Roaming\Microsoft -exclude “Windows” -Force | foreach ($_) {remove-item $_.fullname -force -recurse -confirm:$false}
get-childitem C:\Users\Default\AppData\Roaming -exclude “Microsoft” -Force | foreach ($_) {remove-item $_.fullname -force -recurse -confirm:$false}
Get-ChildItem c:\users\default -Filter “*.log*” -Force | Remove-Item -Force
Get-ChildItem c:\users\default -Filter “*.blf*” -Force | Remove-Item -Force
Get-ChildItem c:\users\default -Filter “*.REGTRANS-MS” -Force | Remove-Item -Force
This script will strim your default profile from around 125MB to about 4MB. Now, you are ready to deploy the image fully using your default profile that you have customized!
Summary
Setting up the default profile is an easy way to make general customizations, improve logon times, and make the whole user experience a lot more slick. It also cuts down on the amount of baseline policies that are required for the user environment, as they can be baked in. Ideally, this process should be repeated for each new iteration of Windows 10 feature releases.
You can also, if you wanted to, centralize the deployment of your default profile by copying the profile you created into a folder in the NETLOGON share and calling this folder Default User.v6 (for Windows 10 1703 and above, prior Windows 10 versions use the suffix .v5). In this situation, you could make changes in one location and have them reflected everywhere (assuming that DC connectivity is available for the client).












