reboot clear registry hostname setting

M

Mick

Hi,

I want to change my hostname programmatically.
I change the registery key Hotname under
"SYSTEM\\CurrentControlSet\\Services\\TcpIp\\Parameters\\"

It works fine, I close my app and reopen it, the changes are made. If
I open the registry, the changes are made.

But when I reboot, the hostname is not changed and when I open the
registry, the changes are lost.

Someone told lme that CurrentControlSet was rewritten on boot. But
the hostname is not changed either when I modify ControlSet001. I have
verified before rebooting that the key was changed in the ControlSet001
registry key.

Why is that ?
Thanks for any reply.

Mickael.
 
P

Pegasus \(MVP\)

Mick said:
Hi,

I want to change my hostname programmatically.
I change the registery key Hotname under
"SYSTEM\\CurrentControlSet\\Services\\TcpIp\\Parameters\\"

It works fine, I close my app and reopen it, the changes are made. If
I open the registry, the changes are made.

But when I reboot, the hostname is not changed and when I open the
registry, the changes are lost.

Someone told lme that CurrentControlSet was rewritten on boot. But
the hostname is not changed either when I modify ControlSet001. I have
verified before rebooting that the key was changed in the ControlSet001
registry key.

Why is that ?
Thanks for any reply.

Mickael.

I suspect that the host name is stored in many other places in the
registry too. On my own PC I found 75 occurences.

You could locate the relevant ones by changing the host name via
the Control Panel to something unlikely such as "supercali", then
rebooting, then scanning the registry for all occurences of "supercali".

Keep in mind that what you're doing is an unsupported operation.
You could end up with a crippled machine.
 
M

Mick

Pegasus \(MVP\) said:
Keep in mind that what you're doing is an unsupported operation.
You could end up with a crippled machine.


Thank you for your reply,

What should be the appropriate and supported method to change the hostname
programmatically ?

Mickael.
 
P

Pegasus \(MVP\)

Mick said:
Thank you for your reply,

What should be the appropriate and supported method to change the hostname
programmatically ?

Mickael.

I am not aware of any tool that lets you do this from a Command
Prompt. Perhaps you can find something on Google.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top