不能在XP下修改IP,主机名和DNS?

levinknight 2004-06-22 03:08:39
请问怎么实现?给出源代码,详细点,谢谢~!
...全文
401 20 打赏 收藏 转发到动态 举报
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
lr2000 2004-08-12
  • 打赏
  • 举报
回复
UP
levinknight 2004-07-11
  • 打赏
  • 举报
回复
我就是烦这个啦,我改成功过的,但是拿到别的机子上试有的就可以,有的就不可以,烦
Rex_love_Burger 2004-07-11
  • 打赏
  • 举报
回复
改注册表的方法还未成功过!!
levinknight 2004-07-11
  • 打赏
  • 举报
回复
如果要通过修改注册表实现,请问怎么做?
54993699 2004-07-01
  • 打赏
  • 举报
回复
晕,用winshell就成了。

netsh interface ip set address 本地连接 static 192.168.0.1 255.255.255.0 192.168.0.10 1
[ 新 ip ] [ 掩码 ] [ 网关 ]

2000的DNS可以用
netsh interface ip set dns "本地连接" static 192.9.201.1
你直接用wiexec调吧
Behard 2004-06-28
  • 打赏
  • 举报
回复
试一试
PostMessage(HWND_BROADCAST, WM_SETTINGCHANGE, NULL, NULL);
levinknight 2004-06-27
  • 打赏
  • 举报
回复
???我没有$啊~!!!!!!!!!!!
Rex_love_Burger 2004-06-24
  • 打赏
  • 举报
回复
光改注册表是没有用的,大哥,我早就试过了!不过此功能还是可以实现的,网上有个国外的WMI控件,就是专门做这个的,不过是收费的!不过考虑试一下aiirii(ari-爱的眼睛) 所说的方法也不错!
Rex_love_Burger 2004-06-24
  • 打赏
  • 举报
回复
用VC是可以实现的,我已经验证过,不过delphi就很麻烦!但是肯定的一点是:这个问题是绝对可以实现的!以下是delphi中用控件实现的例子:
procedure TForm1.ShowProperties(Index: Integer);
begin

//Anzeige löschen
ValueListEditor1.Strings.Clear;

//Informationen aus NetworkAdapter
ValueListEditor1.InsertRow('AdapterType',
NetworkAdapter.Win32_NetworkAdapterCollection.Items[Index].AdapterType,
true);
ValueListEditor1.InsertRow('Availability',
NetworkAdapter.Win32_NetworkAdapterCollection.Items[Index].Availability,
true);
ValueListEditor1.InsertRow('Caption',
NetworkAdapter.Win32_NetworkAdapterCollection.Items[Index].Caption, true);
ValueListEditor1.InsertRow('Description',
NetworkAdapter.Win32_NetworkAdapterCollection.Items[Index].Description,
true);
ValueListEditor1.InsertRow('Manufacturer',
NetworkAdapter.Win32_NetworkAdapterCollection.Items[Index].Manufacturer,
true);
ValueListEditor1.InsertRow('NetConnectionStatus',
NetworkAdapter.Win32_NetworkAdapterCollection.Items[Index].NetConnectionStatus, true);
ValueListEditor1.InsertRow('StatusInfo',
NetworkAdapter.Win32_NetworkAdapterCollection.Items[Index].StatusInfo,
true);

//Informationen aus NetworkAdapterCfg
ValueListEditor1.InsertRow('IPAddress',
NetworkAdapterCfg.Win32_NetworkAdapterConfigurationCollection.Items[Index].IPAddress,
true);
ValueListEditor1.InsertRow('IPSubnet',
NetworkAdapterCfg.Win32_NetworkAdapterConfigurationCollection.Items[Index].IPSubnet,
true);
ValueListEditor1.InsertRow('DHCPEnabled',
NetworkAdapterCfg.Win32_NetworkAdapterConfigurationCollection.Items[Index].DHCPEnabled,
true);
ValueListEditor1.InsertRow('DHCPLeaseExpires',
NetworkAdapterCfg.Win32_NetworkAdapterConfigurationCollection.Items[Index].DHCPLeaseExpires,
true);
ValueListEditor1.InsertRow('DefaultIPGateway',
NetworkAdapterCfg.Win32_NetworkAdapterConfigurationCollection.Items[Index].DefaultIPGateway,
true);
ValueListEditor1.InsertRow('MACAddress',
NetworkAdapterCfg.Win32_NetworkAdapterConfigurationCollection.Items[Index].MACAddress,
true);

end;

不过这个控件需要60多美圆!!
levinknight 2004-06-24
  • 打赏
  • 举报
回复
怎么没有人来拿分啊?
aiirii 2004-06-23
  • 打赏
  • 举报
回复
http://hub.myrice.com/delphizt/wlyy/001.htm

http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=193103
levinknight 2004-06-23
  • 打赏
  • 举报
回复
我是要编程实现修改,不是禁止别人修改!不好意思,我表达得不清楚。
aiirii 2004-06-23
  • 打赏
  • 举报
回复
回答我的问题啊
levinknight 2004-06-23
  • 打赏
  • 举报
回复
有哪位高人能指点一下呢,Delphi下如何读写xp注册表里的多字符串值(REG_MULTI_SZ类型)的键值?结果定义为string类型,则使用readstring运行时提示读取的数据类型类型不对。结果定义为TstringList类型,则使用readstring,编译时提示类型不匹配?请问,如何读写?
levinknight 2004-06-23
  • 打赏
  • 举报
回复
有人吗?
levinknight 2004-06-23
  • 打赏
  • 举报
回复
大哥,你上面的说的文章我都看过了啊,但是不顶用啊,能详细点吗,谢了
hthunter 2004-06-22
  • 打赏
  • 举报
回复
源代码……呃……我没有
levinknight 2004-06-22
  • 打赏
  • 举报
回复
我是想编程实现!哪位能给出源代码?谢谢!
aiirii 2004-06-22
  • 打赏
  • 举报
回复
>>不能在XP下修改IP,主机名和DNS?

什麼意思??? 你是想找段修改的代碼??

還是想禁止別人不能修改??
levinknight 2004-06-22
  • 打赏
  • 举报
回复
自己UP

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧