Praktikum 2: Difference between revisions

From TÜ Narva Kolledži Wiki
Jump to navigation Jump to search
Content deleted Content added
No edit summary
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''Create bootable Windows PE media'''
'''Create bootable Windows PE media'''


Скачайте в папку общего доступа с вашим именем (далее просто 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]". В программе ADK необходимо установить только Deployment Tools.
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.




Line 25: Line 25:
attach vdisk
attach vdisk
create partition primary
create partition primary
assign letter=V
assign letter=F
format fs=ntfs quick
format fs=ntfs quick

exit
</pre>
</pre>


Line 34: Line 34:


<pre>
<pre>
MakeWinPEMedia /UFD C:\WinPE_amd64 V:
MakeWinPEMedia /UFD C:\WinPE_amd64 F:
</pre>
</pre>


Line 47: Line 47:
</pre>
</pre>


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
Переместите полученный файл WinPE.vhd (не копируйте) на '''реальный''' ПК в папку с вашей фамилией


⚫
Shut down with Windows Start > Shut Down
Удалите все файлы и папки (ADK) из общедоступной папки на виртуальной машине


⚫
Attach the virtual disk in VirtualBox via Settings > Storage > Add New Storage Attachment (icon with a plus) > Add New Hard Disk > Choose existing Disk
⚫
Завершите работу с Windows Start > Shut Down

⚫
Подсоедините виртуальный диск в программе VirtualBox через меню Settings > Storage > Add New Storage Attachment (иконка с плюсом) > Add New Hard Disk > Choose existing Disk


[[File:Praktikum2_1.JPG|400px]]
[[File:Praktikum2_1.JPG|400px]]


Start the Windows virtual machine again and when prompted for a password, press and hold the Shift key, then select the Restart button
Запустите снова виртуальную машину с Windows и когда появится приглашение для ввода пароля, нажмите и удерживайте клавишу Shift, затем выберите кнопку Restart


В появившемся окне выберите "Use a device", а затем последний диск UEFI
In the window that appears select "Use a device" and then the last UEFI disk


[[File:Praktikum2_pilt_2.JPG|400px]]
[[File:Praktikum2_pilt_2.JPG|400px]]


Запуститесь с виртуального диска WinPE


Start from the WinPE virtual disk
Когда появится командная строка наберите команду ''exit'' и перегрузитесь снова в ОС


When the command prompt appears, type ''exit'' and reboot back into the OS
Запустите Windows и настройте локальную групповую политику т.о. чтобы была возможность запускать только программу mspaint.exe

Start Windows and configure the local group policy so that you are only able to run the program mspaint.exe


1. Open 'gpedit'
1. Open 'gpedit'
Line 83: Line 83:
[[File:Prakikum_2_pilt_3.JPG|400px]]
[[File:Prakikum_2_pilt_3.JPG|400px]]


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)
Убедитесь, что теперь вы не можете запускать большинство программ (например, cmd). Покажите результат преподавателю!


Run ''diskpart'' and run the commands to assign a letter to the volume with Windows installed
Перегрузитесь снова в среду WinPE (Shift + restart)

Запуститте ''diskpart'' и выполните команды для назначения буквы тому с установленной Windows


<pre>
<pre>
Line 101: Line 100:
[[File:Praktikum2_pilt_4.JPG|400px]]
[[File:Praktikum2_pilt_4.JPG|400px]]


Launch the registry editor ''regedit''.


Highlight the HKEY_USERS registry branch, from the menu select File > Load Hive....
Запустите редактор реестра ''regedit''.

Выделите ветку реестра HKEY_USERS, выберите из меню 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)
Найдите из списка тот виртуальный диск на котором установлена Windows и укажите путь к папке администратора (например, E:\Users\user)


В поле ввода имени файла напишите ntuser.dat
In the file name input field, write ntuser.dat


[[File:Praktikum_2_pilt_5.JPG|400px]]
[[File:Praktikum_2_pilt_5.JPG|400px]]


Give a name to the connected branch, for example user_ntuser.dat
Дайте название подключаемой ветке, например user_ntuser.dat


Expand HKEY_USERS and find the pluggable branch with the name you specified previously
Разверните HKEY_USERS и найдите подключаемую ветку с указанным вами названием из предыдущего пункта


Найдите ключ "RestrictRun" в ветке .\user_ntuser\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\ и поменяйте значение с 1 на 0
Find the "RestrictRun" key in the .\user_ntuser\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\ branch and change the value from 1 to 0


Выделите снова подключаемую вами ветку (user_ntuser.dat) и в меню файл выберите Unload Hive... > yes
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
Закройте regedit и запустите команду ''exit'' для перезагрузки


Make sure you can run programs again
Удостовертесь, что снова можете запускать программы


Show the result to the teacher
Покажите результат преподавателю




[https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-create-usb-bootable-drive?source=recommendations&view=windows-11 Источник]
[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


Source