diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-07-25 16:34:35 +0200 |
---|---|---|
committer | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-07-29 15:07:22 +0200 |
commit | adbf02d170701d418ea47b73b442183bb2131099 (patch) | |
tree | 34f1ccaf167472325501a5a9c110eff59df6d1f6 /src/live | |
parent | 567fea276e16902be01f80cfb7be335f8d414622 (diff) |
utils: add set_windows_hostname
Add function to redefine the hostname of a Windows install.
Windows hostnames can't be larger than 15 characters due to
legacy heritage.
Hostname modification is done by modifying 3 registry values in
the ControlSetXXX entry of the SYSTEM hive. ControlSet001 is
generally the entry to be edited but one must query the value
of the 'Current' key in the 'Select' entry of the SYSTEM hive
to retrieve the active ControlSet.
The hostname has to be introduced in the following entries:
path = 'ControlSetXX/Control/ComputerName/ComputerName'
key = 'ComputerName'
path = 'ControlSetXXX/Services/Tcpip/Parameters'
key = 'HostName'
key = 'NV Hostname'
The value to store in those keys is of tipe SZ and has to be
encoded in UCS-2 Little Endian (utf-16-le).
Diffstat (limited to 'src/live')
0 files changed, 0 insertions, 0 deletions