Praktikum 2: Difference between revisions
No edit summary |
No edit summary |
||
| (31 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
'''Create bootable Windows PE media''' |
'''Create bootable Windows PE media''' |
||
Install into the shared folder with your name (shared), created in the previous practical ([[Praktikum_1]]) two programs, ADK.zip and ADKWINPE.zip, which can be found in the public folder of the class or downloaded on your own "[https://go.microsoft.com/fwlink/?linkid=2196127 Windows Assessment and Deployment Kit (ADK) deployment tools]" and "[https://go.microsoft.com/fwlink/?linkid=2196224 ADK Windows PE Add-ons]". Only the Deployment Tools need to be installed in the ADK. |
|||
Скачайте в папку общего доступу с вашим именем (далее просто shared), созданную в предыдущем практикуме ([[Praktikum_1]]) две программы ADK.zip и ADKWINPE.zip из общедоступной папки по предмету или скачайте их самостоятельно "[https://go.microsoft.com/fwlink/?linkid=2196127 Windows Assessment and Deployment Kit (ADK) deployment tools]" и "[https://go.microsoft.com/fwlink/?linkid=2196224 ADK Windows PE Add-ons]" |
|||
Install |
Install programs |
||
Make sure your PC has the ADK and ADK Windows PE add-on installed. |
Make sure your PC has the ADK and ADK Windows PE add-on installed. |
||
| Line 10: | Line 10: | ||
Start the Deployment and Imaging Tools Environment as an administrator. |
Start the Deployment and Imaging Tools Environment as an administrator. |
||
[[File:Praktikum 2 pilt 1.JPG| |
[[File:Praktikum 2 pilt 1.JPG|400px]] |
||
Run 'copype' to create a working copy of the Windows PE files. |
|||
Run ''copype'' to create a working copy of the Windows PE files. |
|||
<pre>copype amd64 C:\WinPE_amd64 </pre> |
<pre>copype amd64 C:\WinPE_amd64 </pre> |
||
| Line 27: | Line 25: | ||
attach vdisk |
attach vdisk |
||
create partition primary |
create partition primary |
||
assign letter= |
assign letter=F |
||
format fs=ntfs quick |
format fs=ntfs quick |
||
exit |
|||
</pre> |
</pre> |
||
| Line 35: | Line 33: | ||
Prepare the drive by using MakeWinPEMedia: |
Prepare the drive by using MakeWinPEMedia: |
||
<pre> |
|||
MakeWinPEMedia /UFD C:\WinPE_amd64 V: |
|||
MakeWinPEMedia /UFD C:\WinPE_amd64 F: |
|||
</pre> |
|||
Detach the drive with diskpart or use Computer Management: |
|||
Запустите команду от имени администратора, которая создает рабочую копию файлов Windows PE: <pre>copype amd64 C:\WinPE_amd64</pre> |
|||
<pre> |
|||
Установите среду предустановки Windows на, созданный ранее виртуальный диск (виртуальную флешку), указав правильную букву диска |
|||
diskpart |
|||
select vdisk file="C:\shared\WinPE.vhd" |
|||
detach vdisk |
|||
exit |
|||
</pre> |
|||
Move the resulting WinPE.vhd file (do not copy) to a '''real PC''' in a folder with your lastname |
|||
<pre>MakeWinPEMedia /UFD C:\WinPE_amd64 <буква диска>: </pre> |
|||
Delete all files and folders (ADK) from the public folder on the virtual machine |
|||
Подтвердите решение о перезаписи диска и убедитель, что диск содержит каталоги и файлы |
|||
Shut down with Windows Start > Shut Down |
|||
Корректно отключите диск из ОС (правой кнопкой мыши по иконке диска > eject) и переместите файл (не копируйте) на '''реальный''' ПК в папку с вашей фамилией |
|||
Attach the virtual disk in VirtualBox via Settings > Storage > Add New Storage Attachment (icon with a plus) > Add New Hard Disk > Choose existing Disk |
|||
Удалите все файлы и папки (ADK) из общедоступной папки на виртуальной машине |
|||
[[File:Praktikum2_1.JPG|400px]] |
|||
Завершите работу с Windows Start > Shut Down |
|||
Start the Windows virtual machine again and when prompted for a password, press and hold the Shift key, then select the Restart button |
|||
Подсоедините виртуальный диск в программе VirtualBox через меню Settings > Storage > Add New Storage Attachment (иконка с плюсом) > Add New Hard Disk > Choose existing Disk |
|||
In the window that appears select "Use a device" and then the last UEFI disk |
|||
[[File:Praktikum2_1.JPG]] |
|||
[[File:Praktikum2_pilt_2.JPG|400px]] |
|||
Запустите снова виртуальную машину с Windows и как только появится меню выбора загрузки, нажмите клавишу F12 для выбора дисков |
|||
Выберите диск 2 (Slave) |
|||
Start from the WinPE virtual disk |
|||
Запуститесь с виртуального диска (флешки) с WinPE |
|||
When the command prompt appears, type ''exit'' and reboot back into the OS |
|||
Настройте сеть (если у сетевого интерфейса отсутствует IP адрес), используя команды. |
|||
Start Windows and configure the local group policy so that you are only able to run the program mspaint.exe |
|||
<pre> |
|||
netsh interface ip show config |
|||
netsh int ip set address "<Interface>" static <IP adress> <Subnet Mask> |
|||
</pre> |
|||
1. Open 'gpedit' |
|||
Проверьте доступность компьютера-хоста с помощью команды ping |
|||
2. In 'User configuration' select 'Administrative templates' |
|||
Наберите команду exit и перезагрузитесь снова в ОС |
|||
3. Double click on the 'System' |
|||
Запустите Windows и настройте локальную групповую политику т.о. чтобы была возможность запускать только программу mspaint.exe |
|||
(1. Open 'gpedit', 2. In 'User configuration' select 'Administrative templates', 3. Double click on the 'System', 4. In the window on the right double click 'Run only specified Windows applications', 5. Choose Enable and write "mspaint.exe" in the list of button 'Show') |
|||
4. In the window on the right double click 'Run only specified Windows applications' |
|||
Убедитесь, что теперь вы не можете запускать большинство программ (например, cmd). Покажите результат преподавателю! |
|||
5. Choose Enable and write "mspaint.exe" in the list of button 'Show') |
|||
Перезагрузитесь снова в среду WinPE и запустите редактор реестра regedit |
|||
Выделите ветку реестра HKEY_USERS, выберите из меню File > Load Hive... |
|||
[[File:Prakikum_2_pilt_3.JPG|400px]] |
|||
Найдите из списка тот виртуальный диск на котором установлена Windows и укажите путь к папке администратора (например, E:\Users\user-PC) |
|||
Make sure you can't run most programs now (like cmd). Show the result to your teacher! |
|||
Reboot again to the WinPE environment (Shift + restart) |
|||
Run ''diskpart'' and run the commands to assign a letter to the volume with Windows installed |
|||
<pre> |
|||
list disk |
|||
select Disk 0 |
|||
list volume |
|||
select Volume 1 |
|||
assign letter=E |
|||
exit |
|||
</pre> |
|||
[[File:Praktikum2_pilt_4.JPG|400px]] |
|||
В поле ввода имени файла напишите ntuser.dat |
|||
Launch the registry editor ''regedit''. |
|||
Дайте название подключаемой ветке, например user-PC_ntuser.dat |
|||
Highlight the HKEY_USERS registry branch, from the menu select File > Load Hive.... |
|||
Разверните HKEY_USERS и найдите подключаемую ветку с указанным вами названием из предыдущего пункта |
|||
From the list find the virtual disk on which Windows is installed and specify the path to the administrator folder (for example, E:\Users\user) |
|||
Найдите ключ "RestrictRun" в ветке .\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\ и поменяйте значение с 1 на 0 (или удалите ключ полностью) |
|||
In the file name input field, write ntuser.dat |
|||
Выделите снова подключаемую вами ветку (user-PC_ntuser.dat) и в меню файл выберите Unload Hive... > yes |
|||
[[File:Praktikum_2_pilt_5.JPG|400px]] |
|||
Закройте regedit и запустите команду exit для перезагрузки |
|||
Give a name to the connected branch, for example user_ntuser.dat |
|||
Удостовертесь, что снова можете запускать программы |
|||
Expand HKEY_USERS and find the pluggable branch with the name you specified previously |
|||
Покажите результат преподавателю |
|||
Find the "RestrictRun" key in the .\user_ntuser\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\ branch and change the value from 1 to 0 |
|||
Select the branch you are connecting again (user_ntuser.dat) and from the File menu choose Unload Hive... > yes |
|||
---- |
|||
Close regedit and run ''exit'' command to reboot |
|||
Make sure you can run programs again |
|||
'''Мне_скучно_сделал_бы_чего_еще''' |
|||
Show the result to the teacher |
|||
Добавьте поддержку в среду WinPE: |
|||
* Русского и эстонского языка [https://technet.microsoft.com/ru-ru/library/cc749248(v=ws.10).aspx] |
|||
[https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-create-usb-bootable-drive?source=recommendations&view=windows-11 Source] |
|||
Latest revision as of 12:19, 9 September 2025
Create bootable Windows PE media
Install into the shared folder with your name (shared), created in the previous practical (Praktikum_1) two programs, ADK.zip and ADKWINPE.zip, which can be found in the public folder of the class or downloaded on your own "Windows Assessment and Deployment Kit (ADK) deployment tools" and "ADK Windows PE Add-ons". Only the Deployment Tools need to be installed in the ADK.
Install programs
Make sure your PC has the ADK and ADK Windows PE add-on installed.
Start the Deployment and Imaging Tools Environment as an administrator.
Run copype to create a working copy of the Windows PE files.
copype amd64 C:\WinPE_amd64
Create a virtual hard drive (.vhd)
diskpart create vdisk file="C:\shared\WinPE.vhd" maximum=1000 attach vdisk create partition primary assign letter=F format fs=ntfs quick
Prepare the drive by using MakeWinPEMedia:
MakeWinPEMedia /UFD C:\WinPE_amd64 F:
Detach the drive with diskpart or use Computer Management:
diskpart select vdisk file="C:\shared\WinPE.vhd" detach vdisk exit
Move the resulting WinPE.vhd file (do not copy) to a real PC in a folder with your lastname
Delete all files and folders (ADK) from the public folder on the virtual machine
Shut down with Windows Start > Shut Down
Attach the virtual disk in VirtualBox via Settings > Storage > Add New Storage Attachment (icon with a plus) > Add New Hard Disk > Choose existing Disk
Start the Windows virtual machine again and when prompted for a password, press and hold the Shift key, then select the Restart button
In the window that appears select "Use a device" and then the last UEFI disk
Start from the WinPE virtual disk
When the command prompt appears, type exit and reboot back into the OS
Start Windows and configure the local group policy so that you are only able to run the program mspaint.exe
1. Open 'gpedit'
2. In 'User configuration' select 'Administrative templates'
3. Double click on the 'System'
4. In the window on the right double click 'Run only specified Windows applications'
5. Choose Enable and write "mspaint.exe" in the list of button 'Show')
Make sure you can't run most programs now (like cmd). Show the result to your teacher!
Reboot again to the WinPE environment (Shift + restart)
Run diskpart and run the commands to assign a letter to the volume with Windows installed
list disk select Disk 0 list volume select Volume 1 assign letter=E exit
Launch the registry editor regedit.
Highlight the HKEY_USERS registry branch, from the menu select File > Load Hive....
From the list find the virtual disk on which Windows is installed and specify the path to the administrator folder (for example, E:\Users\user)
In the file name input field, write ntuser.dat
Give a name to the connected branch, for example user_ntuser.dat
Expand HKEY_USERS and find the pluggable branch with the name you specified previously
Find the "RestrictRun" key in the .\user_ntuser\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\ branch and change the value from 1 to 0
Select the branch you are connecting again (user_ntuser.dat) and from the File menu choose Unload Hive... > yes
Close regedit and run exit command to reboot
Make sure you can run programs again
Show the result to the teacher