Change Computer Name

  • Thread starter Thread starter Jon Burt
  • Start date Start date
J

Jon Burt

I am interested to hear what way people change the computer name of their
XPe image once it is built.

Regards Jon
 
Hi Jon,
I am interested to hear what way people change the computer name of their
XPe image once it is built.

Some API functions:

NetWkstaSetInfo
SetComputerNameEx

Regards,
Slobodan
 
I use a VBScript to set the computer name, IP Address,
Subnet Mask, Default Gateway, and Time Zone. This Script
launches the first time the box is booted after ghosting
the image to it.

Robert
 
I use the following within a VB program.

Dim szComputerName As String
Public Declare Function SetComputerName Lib "kernel32"
Alias "SetComputerNameA" (ByVal lpComputerName As String)
As Long

Then use...

szComputername="MyServer"

It works fine for setting the name. I just wish it was as
easy to set the IP address.


SetComputerName (szComputerName)
 
We deploy hundreds of the NTE & XPE in the field. Each embedded runtime has
its own computer name and ip address. To accomplish this we use an ini file
which we have entries like computer name, wep encryption for wireless,
controlled device port settings, static ip address per device configuration.
On boot our custom software service start and read the ini file. If setting
in the ini does not match with the registry entries then the registry is
updated with the new entry, an then reboot. After the initial setup from
the ini file, the software is capable of receiving remote commands from
server and all setting on the runtime can be reconfigured futher.


Steve
 
Hi David,
It works fine for setting the name. I just wish it was as
easy to set the IP address.


This is not exactly what you want but close enough.
API: AddIPAddress not persistent.

or,

netsh interface ip set address ?
netsh interface ip set address local static ...


Best regards,
Slobodan
 
I have just remembered,

If you have a death wish then you can try to use this :-)

Win32_NetworkAdapterConfiguration Class
EnableStatic Method

Hope this helps,
Slobodan
 
Back
Top