Quantcast
Channel: Windows PE Latest Topics
Viewing all articles
Browse latest Browse all 69

How to read computer name from hard disk from WinPE

$
0
0

 

->Need to retrieve PC name and later change back to the original name

Boot to Win PE (for Win 10 v1809 32bit)

Need a script that will run in WinPE and do the following:

Load the registry hive of the computer into WinPE

Get the computer name from the registry (probably HKLM\System\CurrentControlSet\Control\ComputerName\ComputerName)

Save the computer name to a temporary folder on the USB

Partion & format the drive then install the image (my process).

After Windows setup is complete, a new PC name will be generated, so  need an additional script to:

change the computer name back to the original name.

NOTES:

An underline will be used in the original name, so a warning about non-standard characters will be likely and a restart required for the name to change. 

When manually changing the name, the older process (like Win7) from Control Panel / System / Advanced System Settings / Computer Name tab / [Change] button works... but the simplified Windows 10 way (Setting / System / About / [Rename this PC]) does not allow the use of the underline in the PC name.

 


Viewing all articles
Browse latest Browse all 69

Trending Articles