使用SetComputerName 无效,而且没有办法改变工作组或者域
我已经搜索了2001年到现在的数据,没有找到解决办法
请大家提供解决方法
1 改变机器名
2 改变工作组
3 改变域

解决方案 »

  1.   

    Do you check the function return values?This is the info from MSDN:The SetComputerName function stores a new NetBIOS name for the local computer. The name is stored in the registry and takes effect the next time the user restarts the computer. If the local computer is a node in a cluster, SetComputerName sets NetBIOS name of the local computer, not that of the cluster. Windows 2000: To set the DNS host name or the DNS domain name, call the SetComputerNameEx function.
      

  2.   

    返回值是1
    而且重新启动还是不变
    更改网络标识使用SetComputerName对么?
      

  3.   

    (为什么我的帖子在帖子列表上没有?)
    (还得从专家门诊进)
    是系统出现了问题,还是CSDN本来就这样?
      

  4.   


    俄找到的api,不行别怪我  ^_^]
    【操作系统】
    Win9X:Yes
    WinNT:Yes
    【说明】
      设置新的计算机名 
    【返回值】
      Long,非零表示成功,零表示失败。会设置GetLastError 
    【其它】
      windows95会将任何非法字符自动转换到标准的字符集里。windows
      nt则会报告出错
    【参数表】
      lpComputerName -  String,新的计算机名称。最多可有MAX_COMPUTERNAME_LENGTH个字符Private Declare Function SetComputerName Lib "kernel32" Alias "SetComputerNameA" (ByVal lpComputerName As String) As Long
    Private Sub Form_Load()
        Dim sNewName As String
        sNewName = InputBox("Please enter a new computer name.")
        SetComputerName sNewName
        MsgBox "Computername set to " + sNewName
    End Sub
      

  5.   

    return 1, it should succeed.
    (搞不定.NET)
      

  6.   

    问题是-----的确无效
    不信您在Win2k下试试
      

  7.   

    so, i say: 搞不定.NEThehe
      

  8.   

    摆脱,我阅读理解一向得分不高
    您的 So 代表的是Me too ,还是 Success ?
    我现在在线等呀
      

  9.   

    我明白了
    setcomputername 更改的computername 是环境变量里面的LOGONSERVER=\\Text1
    COMPUTERNAME=Text1
    网络标识看来不是用Setcomputername改的
    ==========================
    问题来了:怎么改网络标识?
    这才是我的目的
      

  10.   

    用api改注册表,需要重起计算机,需要修改:
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet004\Control\ComputerName\ComputerName\ComputerNameHKEY_LOCAL_MACHINE\SYSTEM\ControlSet004\Services\Tcpip\Parameters\NV HostnameHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerNameHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\NV Hostname可能还需要改其他的地方,你用regshot自己比较一下吧。