added a neat context menu option to their backup solution, a command that will perform a full backup of a selected partition
with pre-selected parameters (target path etc.).
The new image file will also be named accordingly such as C system.root - 2016-09-07 @1310.TBI
, I included the partition label system.root
To make it a distinct name I'd like to also add the hostname of the Windows system of that partition - if existing.
As in a PE %computername%
holds e.g. Win81SE
, an approach could be:
- Check a partition for an offline Windows installation
- Search for and load offline SYSTEM (huge!) as Registry hive
- Read out a particular Registry value, cf. here
- Put the value in a new environment variable HostOScsname
- Make use of the variable for Image for Windows
Scripting all this in AutoIt should be possible but is time consuming.
Is there a simpler/quicker way to read out the hostname of an offline Windows installation?