registry edit

  • Thread starter Thread starter tech
  • Start date Start date
T

tech

I need to change the default gateway on a bunch of systems. I was thinking
an easy way to do this would be to export the registry key that has the
gateway information to a file on a shared drive. Edit the file to remove
all values except the new gateway address and have users to run this file to
update their system. Problem is, the registry key is not the same on all
systems. The key is:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interf
aces\{29822AAF-E4A7-4CFA-AECB-26F519206976}. The last part of the key, the
"long number", is different on some systems. Is there a way to use a "wild
card" character in the path to the key so that whatever the number is the
gateway value will get changed?
 
Doesn't sound like a great approach to me.

I take it you're not using DHCP then?

Have you thought about using the following command?

netsh interface ip add address "Local Area Connection" gateway=192.168.1.1

I haven't tested this, but it looks like it might be a better method than
mucking around in the registry.

Oli
 
Thanks for the suggestion. I tried the netsh approach. After several
attempts trying to get the correct syntax, I was able to change the gateway
and not the static ip of the system which is what we were after. Thanks.
 
Well, in your original question you asked how to change the default gateway.
Mind-reading is not yet one of my skills, although I've been taking evening
classes. :-)

Incidentally, I think you can change the static IP with netsh.

Cheers

Oli
 
if you have to ask about that...your NOT qualified to get into the
registry...not by a LONG shot...
 
Back
Top