我修改过后重起一下机器啊
关键要修改哪些注册表的键值,分别对应哪个的,
我只找到了ip,网关,掩码的,其他的不知道在哪
Reg.RootKey := HKEY_LOCAL_MACHINE;
Reg.OpenKey('/SOFTWARE/Microsoft/Windows NT/CurrentVersion/NetworkCards/1', False);
ss:=Reg.ReadString('ServiceName');
Reg.OpenKey('/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters/Interfaces/'+ss, False);
ss:='192.168.235.112'+#0#0;
RegSetValueEx(reg.CurrentKey, PChar('IPAddress'), 0, REG_MULTI_SZ , @ss[1], length(ss));
ss:='192.168.0.1'+#0#0;
RegSetValueEx(reg.CurrentKey, PChar('DefaultGateway'), 0, REG_MULTI_SZ , @ss[1], length(ss));
ss:='255.255.0.0'+#0#0;
RegSetValueEx(reg.CurrentKey, PChar('SubnetMask'), 0, REG_MULTI_SZ , @ss[1], length(ss));