怎么样编程修改机器的ip地址和 计算机名?
清指教!!!! 问题点数:20、回复次数:4Top
1 楼gpo2002(永吹不休)回复于 2002-03-03 20:21:43 得分 10
ip地址:
reset吧:)
计算机名:
Declare Function SetComputerName Lib "kernel32" Alias "SetComputerNameA" (ByVal lpComputerName As String) As Long
Private Declare Function SetComputerName Lib "kernel32" Alias "SetComputerNameA" (ByVal lpComputerName As String) As Long
Private Sub Form_Load()
'KPD-Team 1999
'E-Mail: KPDTeam@Allapi.net
Dim sNewName As String
'Ask for a new computer name
sNewName = InputBox("Please enter a new computer name.")
'Set the new computer name
SetComputerName sNewName
MsgBox "Computername set to " + sNewName
End SubTop
2 楼shuwork(袋鼠)回复于 2002-03-03 20:24:23 得分 0
注册表Top
3 楼shuwork(袋鼠)回复于 2002-03-03 21:16:06 得分 10
IP地址:
HKEY_LOCAL_MACHINE\System\Cu\rrentControlSet\Services\Class\NetTrans,在此目录中可以看到多个名为0000、0001、0002…的目录,它们用于记录协议的安装情况。在它们中间找到DriverDesc为“TCP/IP”的目录,修改IPAddress和IPMask两个键。其中IPAddress为用逗号隔开的多个IP地址,I PMask是对应的掩Top
4 楼shuwork(袋鼠)回复于 2002-03-03 21:34:32 得分 0
计算机名:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerNameTop




