3

I'm looking for a way to change the hostname and IP address of a Windows XP system that is mounted via a loop-back image on a Linux system. So basically I have access to the Windows XP system on a file level, but I cannot execute any programs on it. A way similar to editing the /etc/hostname and whatever network configuration file under Linux.

The only ways I've found so far would include running a tool after boot, e.g. MS sysprep or use a solution like Acronis Snap Deploy.

raven
  • 18,004
  • 16
  • 81
  • 112
Elmar Weber
  • 2,683
  • 28
  • 28

1 Answers1

5

You can use chntpw tool to edit Windows registry offline. Here's an example of how to use it.

The keys you're looking for are these:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ComputerName\ComputerName

HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\
Services\Tcpip\Parameters\Interfaces\{<Interface GUID>}

Under your interface's GUID you'll find many keys, the ones you need are:

IPAddress (REG_MULTI_SZ) = x.x.x.x

SubnetMask (REG_MULTI_SZ) = x.x.x.x

DefaultGateway (REG_MULTI_SZ) = x.x.x.x

Do take a look at the rest of they keys in there, you might find some interesting information.

Paul Fenney
  • 1,656
  • 1
  • 14
  • 17
rami
  • 1,586
  • 12
  • 13